diff --git a/.eslintignore b/.eslintignore index d3c328e2c1..5fc1d90432 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,8 +12,8 @@ jsconfig.json app/middleware/walletrpc/api_pb.js app/middleware/walletrpc/api_grpc_pb.js app/middleware/ln/google/api -app/middleware/ln/rpc_grpc_pb.js -app/middleware/ln/rpc_pb.js +app/middleware/ln/lightning_grpc_pb.js +app/middleware/ln/lightning_pb.js app/middleware/ln/walletunlocker_grpc_pb.js app/middleware/ln/walletunlocker_pb.js app/middleware/ln/wtclient_grpc_pb.js diff --git a/app/actions/LNActions.js b/app/actions/LNActions.js index 74a208463a..1fd1837f13 100644 --- a/app/actions/LNActions.js +++ b/app/actions/LNActions.js @@ -323,7 +323,10 @@ const connectToLNWallet = } catch (error) { // An unimplemented error here probably means dcrlnd was just unlocked // and is currently starting up the services. Wait a bit and try again. - if (error.code !== 12 && error.toString().indexOf("in the process of starting up") == -1) { + if ( + error.code !== 12 && + error.toString().indexOf("in the process of starting up") == -1 + ) { // 12 === UNIMPLEMENTED. throw error; } diff --git a/app/middleware/ln/client.js b/app/middleware/ln/client.js index d08e095a67..65cf63e887 100644 --- a/app/middleware/ln/client.js +++ b/app/middleware/ln/client.js @@ -4,7 +4,7 @@ const grpc = require("@grpc/grpc-js"); import fs from "fs"; import { trackClient } from "middleware/grpc/clientTracking"; -const proto = require("./rpc_grpc_pb.js"); +const proto = require("./lightning_grpc_pb.js"); const services = grpc.loadPackageDefinition(proto).lnrpc; const wuProto = require("./walletunlocker_grpc_pb.js"); diff --git a/app/middleware/ln/invoices.proto b/app/middleware/ln/invoices.proto index e3314358ba..28bc590d25 100644 --- a/app/middleware/ln/invoices.proto +++ b/app/middleware/ln/invoices.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -import "rpc.proto"; +import "lightning.proto"; package invoicesrpc; @@ -35,6 +35,12 @@ service Invoices { settled, this call will succeed. */ rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp); + + /* + LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced + using either its payment hash, payment address, or set ID. + */ + rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice); } message CancelInvoiceMsg { @@ -98,11 +104,26 @@ message AddHoldInvoiceRequest { message AddHoldInvoiceResp { /* - 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 = 1; + + /* + 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 = 2; + + /* + The payment address of the generated invoice. This value should be used + in all payments for this invoice as we require it for end to end + security. + */ + bytes payment_addr = 3; } message SettleInvoiceMsg { @@ -120,3 +141,32 @@ message SubscribeSingleInvoiceRequest { // Hash corresponding to the (hold) invoice to subscribe to. bytes r_hash = 2; } + +enum LookupModifier { + // The default look up modifier, no look up behavior is changed. + DEFAULT = 0; + + /* + Indicates that when a look up is done based on a set_id, then only that set + of HTLCs related to that set ID should be returned. + */ + HTLC_SET_ONLY = 1; + + /* + Indicates that when a look up is done using a payment_addr, then no HTLCs + related to the payment_addr should be returned. This is useful when one + wants to be able to obtain the set of associated setIDs with a given + invoice, then look up the sub-invoices "projected" by that set ID. + */ + HTLC_SET_BLANK = 2; +} + +message LookupInvoiceMsg { + oneof invoice_ref { + bytes payment_hash = 1; + bytes payment_addr = 2; + bytes set_id = 3; + } + + LookupModifier lookup_modifier = 4; +} diff --git a/app/middleware/ln/invoices_grpc_pb.js b/app/middleware/ln/invoices_grpc_pb.js index 4dd061a06c..55b2af7f47 100644 --- a/app/middleware/ln/invoices_grpc_pb.js +++ b/app/middleware/ln/invoices_grpc_pb.js @@ -2,7 +2,7 @@ 'use strict'; var invoices_pb = require('./invoices_pb.js').invoicesrpc; -var rpc_pb = require('./rpc_pb.js'); +var lightning_pb = require('./lightning_pb.js'); function serialize_invoicesrpc_AddHoldInvoiceRequest(arg) { if (!(arg instanceof invoices_pb.AddHoldInvoiceRequest)) { @@ -48,6 +48,17 @@ function deserialize_invoicesrpc_CancelInvoiceResp(buffer_arg) { return invoices_pb.CancelInvoiceResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_invoicesrpc_LookupInvoiceMsg(arg) { + if (!(arg instanceof invoices_pb.LookupInvoiceMsg)) { + throw new Error('Expected argument of type invoicesrpc.LookupInvoiceMsg'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_LookupInvoiceMsg(buffer_arg) { + return invoices_pb.LookupInvoiceMsg.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_invoicesrpc_SettleInvoiceMsg(arg) { if (!(arg instanceof invoices_pb.SettleInvoiceMsg)) { throw new Error('Expected argument of type invoicesrpc.SettleInvoiceMsg'); @@ -82,14 +93,14 @@ function deserialize_invoicesrpc_SubscribeSingleInvoiceRequest(buffer_arg) { } function serialize_lnrpc_Invoice(arg) { - if (!(arg instanceof rpc_pb.Invoice)) { + if (!(arg instanceof lightning_pb.Invoice)) { throw new Error('Expected argument of type lnrpc.Invoice'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_Invoice(buffer_arg) { - return rpc_pb.Invoice.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.Invoice.deserializeBinary(new Uint8Array(buffer_arg)); } @@ -105,7 +116,7 @@ subscribeSingleInvoice: { requestStream: false, responseStream: true, requestType: invoices_pb.SubscribeSingleInvoiceRequest, - responseType: rpc_pb.Invoice, + responseType: lightning_pb.Invoice, requestSerialize: serialize_invoicesrpc_SubscribeSingleInvoiceRequest, requestDeserialize: deserialize_invoicesrpc_SubscribeSingleInvoiceRequest, responseSerialize: serialize_lnrpc_Invoice, @@ -154,5 +165,19 @@ settleInvoice: { responseSerialize: serialize_invoicesrpc_SettleInvoiceResp, responseDeserialize: deserialize_invoicesrpc_SettleInvoiceResp, }, + // +// LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced +// using either its payment hash, payment address, or set ID. +lookupInvoiceV2: { + path: '/invoicesrpc.Invoices/LookupInvoiceV2', + requestStream: false, + responseStream: false, + requestType: invoices_pb.LookupInvoiceMsg, + responseType: lightning_pb.Invoice, + requestSerialize: serialize_invoicesrpc_LookupInvoiceMsg, + requestDeserialize: deserialize_invoicesrpc_LookupInvoiceMsg, + responseSerialize: serialize_lnrpc_Invoice, + responseDeserialize: deserialize_lnrpc_Invoice, + }, }; diff --git a/app/middleware/ln/invoices_pb.js b/app/middleware/ln/invoices_pb.js index ccca0935b4..04beabcded 100644 --- a/app/middleware/ln/invoices_pb.js +++ b/app/middleware/ln/invoices_pb.js @@ -15,12 +15,15 @@ var jspb = require('google-protobuf'); var goog = jspb; var proto = {}; -var rpc_pb = require('./rpc_pb.js'); -goog.object.extend(proto, rpc_pb); +var lightning_pb = require('./lightning_pb.js'); +goog.object.extend(proto, lightning_pb); goog.exportSymbol('invoicesrpc.AddHoldInvoiceRequest', null, proto); goog.exportSymbol('invoicesrpc.AddHoldInvoiceResp', null, proto); goog.exportSymbol('invoicesrpc.CancelInvoiceMsg', null, proto); goog.exportSymbol('invoicesrpc.CancelInvoiceResp', null, proto); +goog.exportSymbol('invoicesrpc.LookupInvoiceMsg', null, proto); +goog.exportSymbol('invoicesrpc.LookupInvoiceMsg.InvoiceRefCase', null, proto); +goog.exportSymbol('invoicesrpc.LookupModifier', null, proto); goog.exportSymbol('invoicesrpc.SettleInvoiceMsg', null, proto); goog.exportSymbol('invoicesrpc.SettleInvoiceResp', null, proto); goog.exportSymbol('invoicesrpc.SubscribeSingleInvoiceRequest', null, proto); @@ -171,6 +174,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.displayName = 'proto.invoicesrpc.SubscribeSingleInvoiceRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.LookupInvoiceMsg = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_); +}; +goog.inherits(proto.invoicesrpc.LookupInvoiceMsg, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.invoicesrpc.LookupInvoiceMsg.displayName = 'proto.invoicesrpc.LookupInvoiceMsg'; +} @@ -474,7 +498,7 @@ proto.invoicesrpc.AddHoldInvoiceRequest.toObject = function(includeInstance, msg fallbackAddr: jspb.Message.getFieldWithDefault(msg, 6, ""), cltvExpiry: jspb.Message.getFieldWithDefault(msg, 7, 0), routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - rpc_pb.RouteHint.toObject, includeInstance), + lightning_pb.RouteHint.toObject, includeInstance), pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; @@ -545,8 +569,8 @@ proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader = function(m msg.setCltvExpiry(value); break; case 8: - var value = new rpc_pb.RouteHint; - reader.readMessage(value,rpc_pb.RouteHint.deserializeBinaryFromReader); + var value = new lightning_pb.RouteHint; + reader.readMessage(value,lightning_pb.RouteHint.deserializeBinaryFromReader); msg.addRouteHints(value); break; case 9: @@ -643,7 +667,7 @@ proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter = function(messa writer.writeRepeatedMessage( 8, f, - rpc_pb.RouteHint.serializeBinaryToWriter + lightning_pb.RouteHint.serializeBinaryToWriter ); } f = message.getPrivate(); @@ -854,7 +878,7 @@ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setCltvExpiry = function(value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getRouteHintsList = function() { return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, rpc_pb.RouteHint, 8)); + jspb.Message.getRepeatedWrapperField(this, lightning_pb.RouteHint, 8)); }; @@ -936,7 +960,9 @@ proto.invoicesrpc.AddHoldInvoiceResp.prototype.toObject = function(opt_includeIn */ proto.invoicesrpc.AddHoldInvoiceResp.toObject = function(includeInstance, msg) { var f, obj = { - paymentRequest: jspb.Message.getFieldWithDefault(msg, 1, "") + paymentRequest: jspb.Message.getFieldWithDefault(msg, 1, ""), + addIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + paymentAddr: msg.getPaymentAddr_asB64() }; if (includeInstance) { @@ -977,6 +1003,14 @@ proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader = function(msg, var value = /** @type {string} */ (reader.readString()); msg.setPaymentRequest(value); break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); + break; default: reader.skipField(); break; @@ -1013,6 +1047,20 @@ proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter = function(message, f ); } + f = message.getAddIndex(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; @@ -1034,6 +1082,66 @@ proto.invoicesrpc.AddHoldInvoiceResp.prototype.setPaymentRequest = function(valu }; +/** + * optional uint64 add_index = 2; + * @return {number} + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.invoicesrpc.AddHoldInvoiceResp} returns this + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.setAddIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes payment_addr = 3; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_addr = 3; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); +}; + + +/** + * optional bytes payment_addr = 3; + * 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.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.invoicesrpc.AddHoldInvoiceResp} returns this + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.setPaymentAddr = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + @@ -1443,4 +1551,386 @@ proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.setRHash = function(va }; + +/** + * 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.invoicesrpc.LookupInvoiceMsg.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase = { + INVOICE_REF_NOT_SET: 0, + PAYMENT_HASH: 1, + PAYMENT_ADDR: 2, + SET_ID: 3 +}; + +/** + * @return {proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getInvoiceRefCase = function() { + return /** @type {proto.invoicesrpc.LookupInvoiceMsg.InvoiceRefCase} */(jspb.Message.computeOneofCase(this, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.LookupInvoiceMsg.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.LookupInvoiceMsg} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.LookupInvoiceMsg.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + paymentAddr: msg.getPaymentAddr_asB64(), + setId: msg.getSetId_asB64(), + lookupModifier: 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.invoicesrpc.LookupInvoiceMsg} + */ +proto.invoicesrpc.LookupInvoiceMsg.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.LookupInvoiceMsg; + return proto.invoicesrpc.LookupInvoiceMsg.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.LookupInvoiceMsg} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.LookupInvoiceMsg} + */ +proto.invoicesrpc.LookupInvoiceMsg.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 {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSetId(value); + break; + case 4: + var value = /** @type {!proto.invoicesrpc.LookupModifier} */ (reader.readEnum()); + msg.setLookupModifier(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.LookupInvoiceMsg.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.LookupInvoiceMsg} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.LookupInvoiceMsg.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|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = message.getLookupModifier(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } +}; + + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.setPaymentHash = function(value) { + return jspb.Message.setOneofField(this, 1, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.clearPaymentHash = function() { + return jspb.Message.setOneofField(this, 1, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.hasPaymentHash = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes payment_addr = 2; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_addr = 2; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); +}; + + +/** + * optional bytes payment_addr = 2; + * 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.invoicesrpc.LookupInvoiceMsg.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.setPaymentAddr = function(value) { + return jspb.Message.setOneofField(this, 2, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.clearPaymentAddr = function() { + return jspb.Message.setOneofField(this, 2, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.hasPaymentAddr = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes set_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getSetId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes set_id = 3; + * This is a type-conversion wrapper around `getSetId()` + * @return {string} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getSetId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSetId())); +}; + + +/** + * optional bytes set_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSetId()` + * @return {!Uint8Array} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getSetId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSetId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.setSetId = function(value) { + return jspb.Message.setOneofField(this, 3, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.clearSetId = function() { + return jspb.Message.setOneofField(this, 3, proto.invoicesrpc.LookupInvoiceMsg.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.hasSetId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional LookupModifier lookup_modifier = 4; + * @return {!proto.invoicesrpc.LookupModifier} + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.getLookupModifier = function() { + return /** @type {!proto.invoicesrpc.LookupModifier} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.invoicesrpc.LookupModifier} value + * @return {!proto.invoicesrpc.LookupInvoiceMsg} returns this + */ +proto.invoicesrpc.LookupInvoiceMsg.prototype.setLookupModifier = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * @enum {number} + */ +proto.invoicesrpc.LookupModifier = { + DEFAULT: 0, + HTLC_SET_ONLY: 1, + HTLC_SET_BLANK: 2 +}; + goog.object.extend(exports, proto); diff --git a/app/middleware/ln/rpc.proto b/app/middleware/ln/lightning.proto similarity index 78% rename from app/middleware/ln/rpc.proto rename to app/middleware/ln/lightning.proto index c784538af4..2d48a1820e 100644 --- a/app/middleware/ln/rpc.proto +++ b/app/middleware/ln/lightning.proto @@ -32,8 +32,9 @@ service Lightning { rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse); /* lncli: `channelbalance` - ChannelBalance returns the total funds available across all open channels - in atoms. + ChannelBalance returns a report on the total funds across all open channels, + categorized in local/remote, pending local/remote and unsettled local/remote + balances. */ rpc ChannelBalance (ChannelBalanceRequest) returns (ChannelBalanceResponse); @@ -199,6 +200,16 @@ service Lightning { */ rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate); + /* lncli: `batchopenchannel` + BatchOpenChannel attempts to open multiple single-funded channels in a + single transaction in an atomic way. This means either all channel open + requests succeed at once or all attempts are aborted if any of them fail. + This is the safer variant of using PSBTs to manually fund a batch of + channels through the OpenChannel RPC. + */ + rpc BatchOpenChannel (BatchOpenChannelRequest) + returns (BatchOpenChannelResponse); + /* FundingStateStep is an advanced funding related call that allows the caller to either execute some preparatory steps for a funding workflow, or @@ -329,7 +340,14 @@ service Lightning { rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse); /* - DeleteAllPayments deletes all outgoing payments from DB. + DeletePayment deletes an outgoing payment from DB. Note that it will not + attempt to delete an In-Flight payment, since that would be unsafe. + */ + rpc DeletePayment (DeletePaymentRequest) returns (DeletePaymentResponse); + + /* + DeleteAllPayments deletes all outgoing payments from DB. Note that it will + not attempt to delete In-Flight payments, since that would be unsafe. */ rpc DeleteAllPayments (DeleteAllPaymentsRequest) returns (DeleteAllPaymentsResponse); @@ -364,6 +382,15 @@ service Lightning { */ rpc GetNodeInfo (NodeInfoRequest) returns (NodeInfo); + /* lncli: `enforcenodeping` + EnforceNodePing attempts to ping the specified peer. If the request is + canceled before a response is received from the remote peer, then this + forces lnd to disconnect from the peer (and potentially attempt to + reconnect). + */ + rpc EnforceNodePing (EnforceNodePingRequest) + returns (EnforceNodePingResponse); + /* 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 @@ -409,6 +436,12 @@ service Lightning { */ rpc DebugLevel (DebugLevelRequest) returns (DebugLevelResponse); + /* lncli: `calcpaymentstats` + CalcPaymentStats goes through the DB and generates a report on total + number of payments recorded. + */ + rpc CalcPaymentStats (CalcPaymentStatsRequest) returns (CalcPaymentStatsResponse); + /* lncli: `feereport` FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel. @@ -425,8 +458,9 @@ service Lightning { /* 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 - of the past 24 hrs of forwarding history are returned. + within that time range, for a maximum number of events. If no maximum number + of events is specified, up to 100 events will be returned. If no time-range + is specified, then events will be returned in the order that they occured. 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. @@ -513,6 +547,72 @@ service Lightning { */ rpc ListPermissions (ListPermissionsRequest) returns (ListPermissionsResponse); + + /* + CheckMacaroonPermissions checks whether a request follows the constraints + imposed on the macaroon and that the macaroon is authorized to follow the + provided permissions. + */ + rpc CheckMacaroonPermissions (CheckMacPermRequest) + returns (CheckMacPermResponse); + + /* + RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A + gRPC middleware is software component external to lnd that aims to add + additional business logic to lnd by observing/intercepting/validating + incoming gRPC client requests and (if needed) replacing/overwriting outgoing + messages before they're sent to the client. When registering the middleware + must identify itself and indicate what custom macaroon caveats it wants to + be responsible for. Only requests that contain a macaroon with that specific + custom caveat are then sent to the middleware for inspection. The other + option is to register for the read-only mode in which all requests/responses + are forwarded for interception to the middleware but the middleware is not + allowed to modify any responses. As a security measure, _no_ middleware can + modify responses for requests made with _unencumbered_ macaroons! + */ + rpc RegisterRPCMiddleware (stream RPCMiddlewareResponse) + returns (stream RPCMiddlewareRequest); + + /* lncli: `sendcustom` + SendCustomMessage sends a custom peer message. + */ + rpc SendCustomMessage (SendCustomMessageRequest) + returns (SendCustomMessageResponse); + + /* lncli: `subscribecustom` + SubscribeCustomMessages subscribes to a stream of incoming custom peer + messages. + */ + rpc SubscribeCustomMessages (SubscribeCustomMessagesRequest) + returns (stream CustomMessage); +} + +message SubscribeCustomMessagesRequest { +} + +message CustomMessage { + // Peer from which the message originates + bytes peer = 1; + + // Message type. This value will be in the custom range (>= 32768). + uint32 type = 2; + + // Raw message data + bytes data = 3; +} + +message SendCustomMessageRequest { + // Peer to send the message to + bytes peer = 1; + + // Message type. This value needs to be in the custom range (>= 32768). + uint32 type = 2; + + // Raw message data. + bytes data = 3; +} + +message SendCustomMessageResponse { } message Utxo { @@ -581,6 +681,9 @@ message GetTransactionsRequest { default to this option. */ int32 end_height = 2; + + // An optional filter to only include transactions relevant to an account. + string account = 3; } message TransactionDetails { @@ -665,7 +768,8 @@ message SendRequest { The maximum number of atoms 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 - send the payment. + send the payment. If not specified, lnd will use a default value of 100% + fees for small amounts (<=1k atoms) or 5% fees for larger amounts. */ FeeLimit fee_limit = 8; @@ -720,6 +824,11 @@ message SendRequest { fallback. */ repeated FeatureBit dest_features = 16; + + /* + The payment address of the generated invoice. + */ + bytes payment_addr = 17; } message SendResponse { @@ -795,6 +904,9 @@ message ChannelAcceptRequest { // A bit-field which the initiator uses to specify proposed channel // behavior. uint32 channel_flags = 13; + + // The commitment type the initiator wishes to use for the proposed channel. + CommitmentType commitment_type = 14; } message ChannelAcceptResponse { @@ -803,6 +915,58 @@ message ChannelAcceptResponse { // The pending channel id to which this response applies. bytes pending_chan_id = 2; + + /* + An optional error to send the initiating party to indicate why the channel + was rejected. This field *should not* contain sensitive information, it will + be sent to the initiating party. This field should only be set if accept is + false, the channel will be rejected if an error is set with accept=true + because the meaning of this response is ambiguous. Limited to 500 + characters. + */ + string error = 3; + + /* + The upfront shutdown address to use if the initiating peer supports option + upfront shutdown script (see ListPeers for the features supported). Note + that the channel open will fail if this value is set for a peer that does + not support this feature bit. + */ + string upfront_shutdown = 4; + + /* + The csv delay (in blocks) that we require for the remote party. + */ + uint32 csv_delay = 5; + + /* + The reserve amount in atoms that we require the remote peer to adhere to. + We require that the remote peer always have some reserve amount allocated to + them so that there is always a disincentive to broadcast old state (if they + hold 0 sats on their side of the channel, there is nothing to lose). + */ + uint64 reserve_atoms = 6; + + /* + The maximum amount of funds in milliatoms that we allow the remote peer + to have in outstanding htlcs. + */ + uint64 in_flight_max_matoms = 7; + + /* + The maximum number of htlcs that the remote peer can offer us. + */ + uint32 max_htlc_count = 8; + + /* + The minimum value in milliatoms for incoming htlcs on the channel. + */ + uint64 min_htlc_in = 9; + + /* + The number of confirmations we require before we consider the channel open. + */ + uint32 min_accept_depth = 10; } message ChannelPoint { @@ -851,6 +1015,13 @@ message EstimateFeeRequest { // The target number of blocks that this transaction should be confirmed // by. int32 target_conf = 2; + + // The minimum number of confirmations each one of your outputs used for + // the transaction must satisfy. + int32 min_confs = 3; + + // Whether unconfirmed outputs should be used as inputs for the transaction. + bool spend_unconfirmed = 4; } message EstimateFeeResponse { @@ -859,6 +1030,9 @@ message EstimateFeeResponse { // The fee rate in atoms/byte. int64 feerate_atoms_per_byte = 2; + + // Upstream, this is used for sat_per_vbyte. + reserved 3; } message SendManyRequest { @@ -875,6 +1049,17 @@ message SendManyRequest { // An optional label for the transaction, limited to 500 characters. string label = 6; + + // The account from which to send funds. If empty, funds are sent from the + // default account. + string account = 100; + + // The minimum number of confirmations each one of your outputs used for + // the transaction must satisfy. + int32 min_confs = 7; + + // Whether unconfirmed outputs should be used as inputs for the transaction. + bool spend_unconfirmed = 8; } message SendManyResponse { // The id of the transaction @@ -905,6 +1090,17 @@ message SendCoinsRequest { // An optional label for the transaction, limited to 500 characters. string label = 7; + + // The account from which to send funds. If empty, funds are sent from the + // default account. + string account = 100; + + // The minimum number of confirmations each one of your outputs used for + // the transaction must satisfy. + int32 min_confs = 8; + + // Whether unconfirmed outputs should be used as inputs for the transaction. + bool spend_unconfirmed = 9; } message SendCoinsResponse { // The transaction ID of the transaction @@ -917,6 +1113,9 @@ message ListUnspentRequest { // The maximum number of confirmations to be included. int32 max_confs = 2; + + // An optional filter to only include outputs belonging to an account. + string account = 3; } message ListUnspentResponse { // A list of utxos @@ -940,8 +1139,14 @@ enum AddressType { } message NewAddressRequest { - // The address type + // The type of address to generate. AddressType type = 1; + + /* + The name of the account to generate a new address for. If empty, the + default wallet account is used. + */ + string account = 2; } message NewAddressResponse { // The newly generated wallet address @@ -954,6 +1159,12 @@ message SignMessageRequest { base64. */ bytes msg = 1; + + /* + Instead of the default double-SHA256 hashing of the message before signing, + only use one round of hashing instead. + */ + bool single_hash = 2; } message SignMessageResponse { // The signature for the given message @@ -985,6 +1196,12 @@ message ConnectPeerRequest { /* If set, the daemon will attempt to persistently connect to the target * peer. Otherwise, the call will be synchronous. */ bool perm = 2; + + /* + The connection timeout value (in seconds) for this request. It won't affect + other requests. + */ + uint64 timeout = 3; } message ConnectPeerResponse { } @@ -1001,14 +1218,34 @@ message HTLC { int64 amount = 2; bytes hash_lock = 3; uint32 expiration_height = 4; + + // Index identifying the htlc on the channel. + uint64 htlc_index = 5; + + // If this HTLC is involved in a forwarding operation, this field indicates + // the forwarding channel. For an outgoing htlc, it is the incoming channel. + // For an incoming htlc, it is the outgoing channel. When the htlc + // originates from this node or this node is the final destination, + // forwarding_channel will be zero. The forwarding channel will also be zero + // for htlcs that need to be forwarded but don't have a forwarding decision + // persisted yet. + uint64 forwarding_channel = 6; + + // Index identifying the htlc on the forwarding channel. + uint64 forwarding_htlc_index = 7; } enum CommitmentType { + /* + Returned when the commitment type isn't known or unavailable. + */ + UNKNOWN_COMMITMENT_TYPE = 0; + /* A channel using the legacy commitment format having tweaked to_remote keys. */ - LEGACY = 0; + LEGACY = 1; /* A channel that uses the modern commitment format where the key in the @@ -1016,19 +1253,23 @@ enum CommitmentType { up and recovery easier as when the channel is closed, the funds go directly to that key. */ - STATIC_REMOTE_KEY = 1; + STATIC_REMOTE_KEY = 2; /* 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; + ANCHORS = 3; /* - Returned when the commitment type isn't known or unavailable. + A channel that uses a commitment type that builds upon the anchors + commitment format, but in addition requires a CLTV clause to spend outputs + paying to the channel initiator. This is intended for use on leased channels + to guarantee that the channel initiator has no incentives to close a leased + channel before its maturity date. */ - UNKNOWN_COMMITMENT_TYPE = 999; + SCRIPT_ENFORCED_LEASE = 4; } message ChannelConstraints { @@ -1156,6 +1397,18 @@ message Channel { // The commitment type used by this channel. CommitmentType commitment_type = 26; + /* + The total amount of time the remote peer has been online while NOT sending + a ChannelReestablish message. + */ + int64 chan_reestablish_wait_time_ms = 900; + + /* + The short channel id represented as a string, to ease log parsing. This is + the same as chan_id, but returned directly in the string representation. + */ + string short_chan_id = 901; + /* 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 @@ -1234,6 +1487,12 @@ message ChannelCloseSummary { // The outpoint (txid:index) of the funding transaction. string channel_point = 1; + /* + The short channel id represented as a string, to ease log parsing. This is + the same as chan_id, but returned directly in the string representation. + */ + string short_chan_id = 900; + // The unique channel ID for the channel. uint64 chan_id = 2 [jstype = JS_STRING]; @@ -1413,6 +1672,11 @@ message Peer { Denotes that we are not receiving new graph updates from the peer. */ PASSIVE_SYNC = 2; + + /* + Denotes that this peer is pinned into an active sync. + */ + PINNED_SYNC = 3; } // The type of sync we are currently performing with this peer. @@ -1429,6 +1693,25 @@ message Peer { spamming us with errors at no cost. */ repeated TimestampedError errors = 12; + + /* + The number of times we have recorded this peer going offline or coming + online, recorded across restarts. Note that this value is decreased over + time if the peer has not recently flapped, so that we can forgive peers + with historically high flap counts. + */ + int32 flap_count = 13; + + /* + The timestamp of the last flap we observed for this peer. If this value is + zero, we have not observed any flaps for this peer. + */ + int64 last_flap_ns = 14; + + /* + The last ping payload the peer has sent to us. + */ + bytes last_ping_payload = 15; } message TimestampedError { @@ -1614,6 +1897,9 @@ message CloseChannelRequest { to the upfront shutdown addresss. */ string delivery_address = 5; + + // Upstream, this is used for the sat_per_vbyte field. + reserved 6; } message CloseStatusUpdate { @@ -1650,7 +1936,88 @@ message ReadyForPsbtFunding { bytes psbt = 3; } +message BatchOpenChannelRequest { + // The list of channels to open. + repeated BatchOpenChannel channels = 1; + + // The target number of blocks that the funding transaction should be + // confirmed by. + int32 target_conf = 2; + + // A manual fee rate set in atoms/Byte that should be used when crafting the + // funding transaction. + int64 atoms_per_byte = 3; + + // The minimum number of confirmations each one of your outputs used for + // the funding transaction must satisfy. + int32 min_confs = 4; + + // Whether unconfirmed outputs should be used as inputs for the funding + // transaction. + bool spend_unconfirmed = 5; + + // An optional label for the batch transaction, limited to 500 characters. + string label = 6; +} + +message BatchOpenChannel { + // The pubkey of the node to open a channel with. When using REST, this + // field must be encoded as base64. + bytes node_pubkey = 1; + + // The number of satoshis the wallet should commit to the channel. + int64 local_funding_amount = 2; + + // The number of atoms to push to the remote side as part of the initial + // commitment state. + int64 push_atoms = 3; + + // Whether this channel should be private, not announced to the greater + // network. + bool private = 4; + + // The minimum value in milliatoms we will require for incoming HTLCs on + // the channel. + int64 min_htlc_m_atoms = 5; + + // 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 = 6; + + /* + 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. + + 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 = 7; + + /* + An optional, unique identifier of 32 random bytes that will be used as the + pending channel ID to identify the channel while it is in the pre-pending + state. + */ + bytes pending_chan_id = 8; + + /* + The explicit commitment type to use. Note this field will only be used if + the remote peer supports explicit channel negotiation. + */ + CommitmentType commitment_type = 9; +} + +message BatchOpenChannelResponse { + repeated PendingUpdate pending_channels = 1; +} + message OpenChannelRequest { + // Upstream, this is used for the sat_per_vbyte field. + reserved 1; + /* The pubkey of the node to open a channel with. When using REST, this field must be encoded as base64. @@ -1730,6 +2097,18 @@ message OpenChannelRequest { to the commitment transaction. */ uint32 remote_max_htlcs = 16; + + /* + Max local csv is the maximum csv delay we will allow for our own commitment + transaction. + */ + uint32 max_local_csv = 17; + + /* + The explicit commitment type to use. Note this field will only be used if + the remote peer supports explicit channel negotiation. + */ + CommitmentType commitment_type = 18; } message OpenStatusUpdate { oneof update { @@ -1869,6 +2248,20 @@ message FundingPsbtVerify { // The pending channel ID of the channel to get the PSBT for. bytes pending_chan_id = 2; + + /* + Can only be used if the no_publish flag was set to true in the OpenChannel + call meaning that the caller is solely responsible for publishing the final + funding transaction. If skip_finalize is set to true then lnd will not wait + for a FundingPsbtFinalize state step and instead assumes that a transaction + with the same TXID as the passed in PSBT will eventually confirm. + IT IS ABSOLUTELY IMPERATIVE that the TXID of the transaction that is + eventually published does have the _same TXID_ as the verified PSBT. That + means no inputs or outputs can change, only signatures can be added. If the + TXID changes between this call and the publish step then the channel will + never be created and the funds will be in limbo. + */ + bool skip_finalize = 3; } message FundingPsbtFinalize { @@ -1953,6 +2346,12 @@ message PendingChannelsResponse { string remote_node_pub = 1; string channel_point = 2; + /* + The short channel id represented as a string, to ease log parsing. This is + the same as chan_id, but returned directly in the string representation. + */ + string short_chan_id = 900; + int64 capacity = 3; int64 local_balance = 4; @@ -1972,6 +2371,12 @@ message PendingChannelsResponse { // The commitment type used by this channel. CommitmentType commitment_type = 9; + + // Total number of forwarding packages created in this channel. + int64 num_forwarding_packages = 10; + + // A set of flags showing the current state of the channel. + string chan_status_flags = 11; } message PendingOpenChannel { @@ -2013,6 +2418,9 @@ message PendingChannelsResponse { this point. */ Commitments commitments = 3; + + // The transaction id of the closing transaction + string closing_txid = 4; } message Commitments { @@ -2116,6 +2524,7 @@ message ChannelEventUpdate { ChannelPoint active_channel = 3; ChannelPoint inactive_channel = 4; PendingUpdate pending_open_channel = 6; + ChannelPoint fully_resolved_channel = 7; } enum UpdateType { @@ -2124,13 +2533,23 @@ message ChannelEventUpdate { ACTIVE_CHANNEL = 2; INACTIVE_CHANNEL = 3; PENDING_OPEN_CHANNEL = 4; + FULLY_RESOLVED_CHANNEL = 5; } UpdateType type = 5; } +message WalletAccountBalance { + // The confirmed balance of the account (with >= 1 confirmations). + int64 confirmed_balance = 1; + + // The unconfirmed balance of the account (with 0 confirmations). + int64 unconfirmed_balance = 2; +} + message WalletBalanceRequest { } + message WalletBalanceResponse { // The balance of the wallet int64 total_balance = 1; @@ -2140,28 +2559,61 @@ message WalletBalanceResponse { // The unconfirmed balance of a wallet(with 0 confirmations) int64 unconfirmed_balance = 3; + + // The total amount of wallet UTXOs held in outputs that are locked for + // other usage. + int64 locked_balance = 5; + + // A mapping of each wallet account's name to its balance. + map account_balance = 4; +} + +message Amount { + // Value denominated in atoms. + uint64 atoms = 1; + + // Value denominated in milli-atoms. + uint64 matoms = 2; } message ChannelBalanceRequest { } message ChannelBalanceResponse { - // Sum of channels balances denominated in atoms - int64 balance = 1; + // Deprecated. Sum of channels balances denominated in satoshis + int64 balance = 1 [deprecated = true]; + + // Deprecated. Sum of channels pending balances denominated in satoshis + int64 pending_open_balance = 2 [deprecated = true]; + + // Sum of channels local balances. + Amount local_balance = 3; + + // Sum of channels remote balances. + Amount remote_balance = 4; + + // Sum of channels local unsettled balances. + Amount unsettled_local_balance = 5; - // Sum of channels pending balances denominated in atoms - int64 pending_open_balance = 2; + // Sum of channels remote unsettled balances. + Amount unsettled_remote_balance = 6; + + // Sum of channels pending local balances. + Amount pending_open_local_balance = 7; + + // Sum of channels pending remote balances. + Amount pending_open_remote_balance = 8; /* Maximum amount we can receive across all our channels, after accounting for required reserves. */ - int64 max_inbound_amount = 3; + int64 max_inbound_amount = 900; /* Maximum amount we can send across all our channels, after accounting for required reserves. */ - int64 max_outbound_amount = 4; + int64 max_outbound_amount = 901; } message QueryRoutesRequest { @@ -2197,7 +2649,8 @@ message QueryRoutesRequest { The maximum number of atoms 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 - send the payment. + send the payment. If not specified, lnd will use a default value of 100% + fees for small amounts (<=1k atoms) or 5% fees for larger amounts. */ FeeLimit fee_limit = 5; @@ -2240,7 +2693,7 @@ message QueryRoutesRequest { 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. + does not support the specified records, 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. */ @@ -2320,7 +2773,7 @@ message Hop { output index for the channel. */ uint64 chan_id = 1 [jstype = JS_STRING]; - int64 chan_capacity = 2; + int64 chan_capacity = 2 [deprecated = true]; int64 amt_to_forward = 3 [deprecated = true]; int64 fee = 4 [deprecated = true]; uint32 expiry = 5; @@ -2338,16 +2791,26 @@ message Hop { 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; + bool tlv_payload = 9 [deprecated = true]; /* 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. + the receiver will enforce 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 TLV record that signals the use of an AMP payment. If present, + the receiver will treat all received payments including the same + (payment_addr, set_id) pair as being part of one logical payment. The + payment will be settled by XORing the root_share's together and deriving the + child hashes and preimages according to BOLT XX. Must be used in conjunction + with mpp_record. + */ + AMPRecord amp_record = 12; + /* 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 @@ -2374,6 +2837,14 @@ message MPPRecord { int64 total_amt_m_atoms = 10; } +message AMPRecord { + bytes root_share = 1; + + bytes set_id = 2; + + uint32 child_index = 3; +} + /* 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 @@ -2479,6 +2950,20 @@ message RoutingPolicy { uint32 last_update = 7; } +message EnforceNodePingRequest { + /* + The node pub key in hexadecimal format. + */ + string pub_key = 1; +} + +message EnforceNodePingResponse { + /* + Roud Trip Time (RTT) in microseconds to the peer. + */ + int64 ping_time_micro = 1; +} + /* A fully authenticated channel along with all its unique attributes. Once an authenticated channel announcement has been processed on the network, @@ -2599,11 +3084,27 @@ message GraphTopologyUpdate { repeated ClosedChannelUpdate closed_chans = 3; } message NodeUpdate { - repeated string addresses = 1; + /* + Deprecated, use node_addresses. + */ + repeated string addresses = 1 [deprecated = true]; + string identity_key = 2; - bytes global_features = 3; + + /* + Deprecated, use features. + */ + bytes global_features = 3 [deprecated = true]; + string alias = 4; string color = 5; + repeated NodeAddress node_addresses = 7; + + /* + Features that the node has advertised in the init message, node + announcements and invoices. + */ + map features = 6; } message ChannelEdgeUpdate { /* @@ -2654,6 +3155,10 @@ message HopHint { uint32 cltv_expiry_delta = 5; } +message SetID { + bytes set_id = 1; +} + message RouteHint { /* A list of hop hints that when chained together can assist in reaching a @@ -2662,6 +3167,20 @@ message RouteHint { repeated HopHint hop_hints = 1; } +message AMPInvoiceState { + // The state the HTLCs associated with this setID are in. + InvoiceHTLCState state = 1; + + // The settle index of this HTLC set, if the invoice state is settled. + uint64 settle_index = 2; + + // The time this HTLC set was settled expressed in unix epoch. + int64 settle_time = 3; + + // The total amount paid for the sub-invoice expressed in milli atoms. + int64 amt_paid_m_atoms = 5; +} + message Invoice { /* An optional memo to attach along with the invoice. Used for record keeping @@ -2816,6 +3335,28 @@ message Invoice { [EXPERIMENTAL]. */ bool is_keysend = 25; + + /* + The payment address of this invoice. This value will be used in MPP + payments, and also for newer invoices that always require the MPP payload + for added end-to-end security. + */ + bytes payment_addr = 26; + + /* + Signals whether or not this is an AMP invoice. + */ + bool is_amp = 27; + + /* + [EXPERIMENTAL]: + + Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the + given set ID. This field is always populated for AMP invoices, and can be + used along side LookupInvoice to obtain the HTLC information related to a + given sub-invoice. + */ + map amp_invoice_state = 28; } enum InvoiceHTLCState { @@ -2853,8 +3394,33 @@ message InvoiceHTLC { // Custom tlv records. map custom_records = 9; - // The total amount of the mpp payment in msat. + // The total amount of the mpp payment in milli-atoms. uint64 mpp_total_amt_m_atoms = 10; + + // Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. + AMP amp = 11; +} + +// Details specific to AMP HTLCs. +message AMP { + // An n-of-n secret share of the root seed from which child payment hashes + // and preimages are derived. + bytes root_share = 1; + + // An identifier for the HTLC set that this HTLC belongs to. + bytes set_id = 2; + + // A nonce used to randomize the child preimage and child hash from a given + // root_share. + uint32 child_index = 3; + + // The payment hash of the AMP HTLC. + bytes hash = 4; + + // The preimage used to settle this AMP htlc. This field will only be + // populated if the invoice is in InvoiceState_ACCEPTED or + // InvoiceState_SETTLED. + bytes preimage = 5; } message AddInvoiceResponse { @@ -2874,6 +3440,13 @@ message AddInvoiceResponse { invoices with an add_index greater than this one. */ uint64 add_index = 16; + + /* + The payment address of the generated invoice. This value should be used + in all payments for this invoice as we require it for end to end + security. + */ + bytes payment_addr = 17; } message PaymentHash { /* @@ -3045,6 +3618,9 @@ message Payment { } message HTLCAttempt { + // The unique ID that is used for this attempt. + uint64 attempt_id = 7; + enum HTLCStatus { IN_FLIGHT = 0; SUCCEEDED = 1; @@ -3119,7 +3695,27 @@ message ListPaymentsResponse { uint64 last_index_offset = 3; } +message DeletePaymentRequest { + // Payment hash to delete. + bytes payment_hash = 1; + + /* + Only delete failed HTLCs from the payment, not the payment itself. + */ + bool failed_htlcs_only = 2; +} + message DeleteAllPaymentsRequest { + // Only delete failed payments. + bool failed_payments_only = 1; + + /* + Only delete failed HTLCs from payments, not the payment itself. + */ + bool failed_htlcs_only = 2; +} + +message DeletePaymentResponse { } message DeleteAllPaymentsResponse { @@ -3129,6 +3725,13 @@ message AbandonChannelRequest { ChannelPoint channel_point = 1; bool pending_funding_shim_only = 2; + + /* + Override the requirement for being in dev mode by setting this to true and + confirming the user knows what they are doing and this is a potential foot + gun to lose funds if used on active channels. + */ + bool i_know_what_i_am_doing = 3; } message AbandonChannelResponse { @@ -3142,6 +3745,18 @@ message DebugLevelResponse { string sub_systems = 1; } +message CalcPaymentStatsRequest { +} +message CalcPaymentStatsResponse { + uint64 total = 1; + uint64 failed = 2; + uint64 succeeded = 3; + uint64 htlc_attempts = 4; + uint64 htlc_failed = 5; + uint64 htlc_settled = 6; + uint64 old_dupe_payments = 7; +} + message PayReqString { // The payment request string to be decoded string pay_req = 1; @@ -3180,6 +3795,14 @@ enum FeatureBit { PAYMENT_ADDR_OPT = 15; MPP_REQ = 16; MPP_OPT = 17; + WUMBO_CHANNELS_REQ = 18; + WUMBO_CHANNELS_OPT = 19; + ANCHORS_REQ = 20; + ANCHORS_OPT = 21; + ANCHORS_ZERO_FEE_HTLC_REQ = 22; + ANCHORS_ZERO_FEE_HTLC_OPT = 23; + AMP_REQ = 30; + AMP_OPT = 31; } message Feature { @@ -3242,6 +3865,9 @@ message PolicyUpdateRequest { // up to 6 decimal places, so 1e-6. double fee_rate = 4; + // The effective fee rate in micro-satoshis (parts per million). + uint32 fee_rate_ppm = 9; + // The required timelock delta for HTLCs forwarded over the channel. uint32 time_lock_delta = 5; @@ -3256,7 +3882,28 @@ message PolicyUpdateRequest { // If true, min_htlc_m_atoms is applied. bool min_htlc_m_atoms_specified = 8; } +enum UpdateFailure { + UPDATE_FAILURE_UNKNOWN = 0; + UPDATE_FAILURE_PENDING = 1; + UPDATE_FAILURE_NOT_FOUND = 2; + UPDATE_FAILURE_INTERNAL_ERR = 3; + UPDATE_FAILURE_INVALID_PARAMETER = 4; +} + +message FailedUpdate { + // The outpoint in format txid:n + OutPoint outpoint = 1; + + // Reason for the policy update failure. + UpdateFailure reason = 2; + + // A string representation of the policy update error. + string update_error = 3; +} + message PolicyUpdateResponse { + // List of failed policy updates. + repeated FailedUpdate failed_updates = 1; } message ForwardingHistoryRequest { @@ -3280,8 +3927,8 @@ message ForwardingHistoryRequest { } message ForwardingEvent { // Timestamp is the time (unix epoch offset) that this circuit was - // completed. - uint64 timestamp = 1; + // completed. Deprecated by timestamp_ns. + uint64 timestamp = 1 [deprecated = true]; // The incoming channel ID that carried the HTLC that created the circuit. uint64 chan_id_in = 2 [jstype = JS_STRING]; @@ -3312,6 +3959,10 @@ message ForwardingEvent { // second half of the circuit. uint64 amt_out_m_atoms = 10; + // The number of nanoseconds elapsed since January 1, 1970 UTC when this + // circuit was completed. + uint64 timestamp_ns = 11; + // TODO(roasbeef): add settlement latency? // * use FPE on the chan id? // * also list failures? @@ -3420,6 +4071,12 @@ message BakeMacaroonRequest { // The root key ID used to create the macaroon, must be a positive integer. uint64 root_key_id = 2; + + /* + Informs the RPC on whether to allow external permissions that LND is not + aware of. + */ + bool allow_external_permissions = 3; } message BakeMacaroonResponse { // The hex encoded macaroon, serialized in binary format. @@ -3489,6 +4146,7 @@ message Failure { PERMANENT_CHANNEL_FAILURE = 21; EXPIRY_TOO_FAR = 22; MPP_TIMEOUT = 23; + INVALID_ONION_PAYLOAD = 24; /* An internal error occurred. @@ -3630,3 +4288,210 @@ message Op { string entity = 1; repeated string actions = 2; } + +message CheckMacPermRequest { + bytes macaroon = 1; + repeated MacaroonPermission permissions = 2; + string fullMethod = 3; +} + +message CheckMacPermResponse { + bool valid = 1; +} + +message RPCMiddlewareRequest { + /* + The unique ID of the intercepted original gRPC request. Useful for mapping + request to response when implementing full duplex message interception. For + streaming requests, this will be the same ID for all incoming and outgoing + middleware intercept messages of the _same_ stream. + */ + uint64 request_id = 1; + + /* + The raw bytes of the complete macaroon as sent by the gRPC client in the + original request. This might be empty for a request that doesn't require + macaroons such as the wallet unlocker RPCs. + */ + bytes raw_macaroon = 2; + + /* + The parsed condition of the macaroon's custom caveat for convenient access. + This field only contains the value of the custom caveat that the handling + middleware has registered itself for. The condition _must_ be validated for + messages of intercept_type stream_auth and request! + */ + string custom_caveat_condition = 3; + + /* + There are three types of messages that will be sent to the middleware for + inspection and approval: Stream authentication, request and response + interception. The first two can only be accepted (=forward to main RPC + server) or denied (=return error to client). Intercepted responses can also + be replaced/overwritten. + */ + oneof intercept_type { + /* + Intercept stream authentication: each new streaming RPC call that is + initiated against lnd and contains the middleware's custom macaroon + caveat can be approved or denied based upon the macaroon in the stream + header. This message will only be sent for streaming RPCs, unary RPCs + must handle the macaroon authentication in the request interception to + avoid an additional message round trip between lnd and the middleware. + */ + StreamAuth stream_auth = 4; + + /* + Intercept incoming gRPC client request message: all incoming messages, + both on streaming and unary RPCs, are forwarded to the middleware for + inspection. For unary RPC messages the middleware is also expected to + validate the custom macaroon caveat of the request. + */ + RPCMessage request = 5; + + /* + Intercept outgoing gRPC response message: all outgoing messages, both on + streaming and unary RPCs, are forwarded to the middleware for inspection + and amendment. The response in this message is the original response as + it was generated by the main RPC server. It can either be accepted + (=forwarded to the client), replaced/overwritten with a new message of + the same type, or replaced by an error message. + */ + RPCMessage response = 6; + } + + /* + The unique message ID of this middleware intercept message. There can be + multiple middleware intercept messages per single gRPC request (one for the + incoming request and one for the outgoing response) or gRPC stream (one for + each incoming message and one for each outgoing response). This message ID + must be referenced when responding (accepting/rejecting/modifying) to an + intercept message. + */ + uint64 msg_id = 7; +} + +message StreamAuth { + /* + The full URI (in the format /./MethodName, for + example /lnrpc.Lightning/GetInfo) of the streaming RPC method that was just + established. + */ + string method_full_uri = 1; +} + +message RPCMessage { + /* + The full URI (in the format /./MethodName, for + example /lnrpc.Lightning/GetInfo) of the RPC method the message was sent + to/from. + */ + string method_full_uri = 1; + + /* + Indicates whether the message was sent over a streaming RPC method or not. + */ + bool stream_rpc = 2; + + /* + The full canonical gRPC name of the message type (in the format + .TypeName, for example lnrpc.GetInfoRequest). + */ + string type_name = 3; + + /* + The full content of the gRPC message, serialized in the binary protobuf + format. + */ + bytes serialized = 4; +} + +message RPCMiddlewareResponse { + /* + The request message ID this response refers to. Must always be set when + giving feedback to an intercept but is ignored for the initial registration + message. + */ + uint64 ref_msg_id = 1; + + /* + The middleware can only send two types of messages to lnd: The initial + registration message that identifies the middleware and after that only + feedback messages to requests sent to the middleware. + */ + oneof middleware_message { + /* + The registration message identifies the middleware that's being + registered in lnd. The registration message must be sent immediately + after initiating the RegisterRpcMiddleware stream, otherwise lnd will + time out the attempt and terminate the request. NOTE: The middleware + will only receive interception messages for requests that contain a + macaroon with the custom caveat that the middleware declares it is + responsible for handling in the registration message! As a security + measure, _no_ middleware can intercept requests made with _unencumbered_ + macaroons! + */ + MiddlewareRegistration register = 2; + + /* + The middleware received an interception request and gives feedback to + it. The request_id indicates what message the feedback refers to. + */ + InterceptFeedback feedback = 3; + } +} + +message MiddlewareRegistration { + /* + The name of the middleware to register. The name should be as informative + as possible and is logged on registration. + */ + string middleware_name = 1; + + /* + The name of the custom macaroon caveat that this middleware is responsible + for. Only requests/responses that contain a macaroon with the registered + custom caveat are forwarded for interception to the middleware. The + exception being the read-only mode: All requests/responses are forwarded to + a middleware that requests read-only access but such a middleware won't be + allowed to _alter_ responses. As a security measure, _no_ middleware can + change responses to requests made with _unencumbered_ macaroons! + NOTE: Cannot be used at the same time as read_only_mode. + */ + string custom_macaroon_caveat_name = 2; + + /* + Instead of defining a custom macaroon caveat name a middleware can register + itself for read-only access only. In that mode all requests/responses are + forwarded to the middleware but the middleware isn't allowed to alter any of + the responses. + NOTE: Cannot be used at the same time as custom_macaroon_caveat_name. + */ + bool read_only_mode = 3; +} + +message InterceptFeedback { + /* + The error to return to the user. If this is non-empty, the incoming gRPC + stream/request is aborted and the error is returned to the gRPC client. If + this value is empty, it means the middleware accepts the stream/request/ + response and the processing of it can continue. + */ + string error = 1; + + /* + A boolean indicating that the gRPC response should be replaced/overwritten. + As its name suggests, this can only be used as a feedback to an intercepted + response RPC message and is ignored for feedback on any other message. This + boolean is needed because in protobuf an empty message is serialized as a + 0-length or nil byte slice and we wouldn't be able to distinguish between + an empty replacement message and the "don't replace anything" case. + */ + bool replace_response = 2; + + /* + If the replace_response field is set to true, this field must contain the + binary serialized gRPC response message in the protobuf format. + */ + bytes replacement_serialized = 3; +} diff --git a/app/middleware/ln/rpc_grpc_pb.js b/app/middleware/ln/lightning_grpc_pb.js similarity index 65% rename from app/middleware/ln/rpc_grpc_pb.js rename to app/middleware/ln/lightning_grpc_pb.js index 2b6f4e26d6..2482c95a25 100644 --- a/app/middleware/ln/rpc_grpc_pb.js +++ b/app/middleware/ln/lightning_grpc_pb.js @@ -1,1183 +1,1359 @@ // GENERATED CODE -- DO NOT EDIT! 'use strict'; -var rpc_pb = require('./rpc_pb.js').lnrpc; +var lightning_pb = require('./lightning_pb.js').lnrpc; function serialize_lnrpc_AbandonChannelRequest(arg) { - if (!(arg instanceof rpc_pb.AbandonChannelRequest)) { + if (!(arg instanceof lightning_pb.AbandonChannelRequest)) { throw new Error('Expected argument of type lnrpc.AbandonChannelRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_AbandonChannelRequest(buffer_arg) { - return rpc_pb.AbandonChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.AbandonChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_AbandonChannelResponse(arg) { - if (!(arg instanceof rpc_pb.AbandonChannelResponse)) { + if (!(arg instanceof lightning_pb.AbandonChannelResponse)) { throw new Error('Expected argument of type lnrpc.AbandonChannelResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_AbandonChannelResponse(buffer_arg) { - return rpc_pb.AbandonChannelResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.AbandonChannelResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_AddInvoiceResponse(arg) { - if (!(arg instanceof rpc_pb.AddInvoiceResponse)) { + if (!(arg instanceof lightning_pb.AddInvoiceResponse)) { throw new Error('Expected argument of type lnrpc.AddInvoiceResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_AddInvoiceResponse(buffer_arg) { - return rpc_pb.AddInvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.AddInvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_BakeMacaroonRequest(arg) { - if (!(arg instanceof rpc_pb.BakeMacaroonRequest)) { + if (!(arg instanceof lightning_pb.BakeMacaroonRequest)) { throw new Error('Expected argument of type lnrpc.BakeMacaroonRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_BakeMacaroonRequest(buffer_arg) { - return rpc_pb.BakeMacaroonRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.BakeMacaroonRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_BakeMacaroonResponse(arg) { - if (!(arg instanceof rpc_pb.BakeMacaroonResponse)) { + if (!(arg instanceof lightning_pb.BakeMacaroonResponse)) { throw new Error('Expected argument of type lnrpc.BakeMacaroonResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_BakeMacaroonResponse(buffer_arg) { - return rpc_pb.BakeMacaroonResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.BakeMacaroonResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_BatchOpenChannelRequest(arg) { + if (!(arg instanceof lightning_pb.BatchOpenChannelRequest)) { + throw new Error('Expected argument of type lnrpc.BatchOpenChannelRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_BatchOpenChannelRequest(buffer_arg) { + return lightning_pb.BatchOpenChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_BatchOpenChannelResponse(arg) { + if (!(arg instanceof lightning_pb.BatchOpenChannelResponse)) { + throw new Error('Expected argument of type lnrpc.BatchOpenChannelResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_BatchOpenChannelResponse(buffer_arg) { + return lightning_pb.BatchOpenChannelResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_CalcPaymentStatsRequest(arg) { + if (!(arg instanceof lightning_pb.CalcPaymentStatsRequest)) { + throw new Error('Expected argument of type lnrpc.CalcPaymentStatsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_CalcPaymentStatsRequest(buffer_arg) { + return lightning_pb.CalcPaymentStatsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_CalcPaymentStatsResponse(arg) { + if (!(arg instanceof lightning_pb.CalcPaymentStatsResponse)) { + throw new Error('Expected argument of type lnrpc.CalcPaymentStatsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_CalcPaymentStatsResponse(buffer_arg) { + return lightning_pb.CalcPaymentStatsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChanBackupExportRequest(arg) { - if (!(arg instanceof rpc_pb.ChanBackupExportRequest)) { + if (!(arg instanceof lightning_pb.ChanBackupExportRequest)) { throw new Error('Expected argument of type lnrpc.ChanBackupExportRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChanBackupExportRequest(buffer_arg) { - return rpc_pb.ChanBackupExportRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChanBackupExportRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChanBackupSnapshot(arg) { - if (!(arg instanceof rpc_pb.ChanBackupSnapshot)) { + if (!(arg instanceof lightning_pb.ChanBackupSnapshot)) { throw new Error('Expected argument of type lnrpc.ChanBackupSnapshot'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChanBackupSnapshot(buffer_arg) { - return rpc_pb.ChanBackupSnapshot.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChanBackupSnapshot.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChanInfoRequest(arg) { - if (!(arg instanceof rpc_pb.ChanInfoRequest)) { + if (!(arg instanceof lightning_pb.ChanInfoRequest)) { throw new Error('Expected argument of type lnrpc.ChanInfoRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChanInfoRequest(buffer_arg) { - return rpc_pb.ChanInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChanInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelAcceptRequest(arg) { - if (!(arg instanceof rpc_pb.ChannelAcceptRequest)) { + if (!(arg instanceof lightning_pb.ChannelAcceptRequest)) { throw new Error('Expected argument of type lnrpc.ChannelAcceptRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelAcceptRequest(buffer_arg) { - return rpc_pb.ChannelAcceptRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelAcceptRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelAcceptResponse(arg) { - if (!(arg instanceof rpc_pb.ChannelAcceptResponse)) { + if (!(arg instanceof lightning_pb.ChannelAcceptResponse)) { throw new Error('Expected argument of type lnrpc.ChannelAcceptResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelAcceptResponse(buffer_arg) { - return rpc_pb.ChannelAcceptResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelAcceptResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelBackup(arg) { - if (!(arg instanceof rpc_pb.ChannelBackup)) { + if (!(arg instanceof lightning_pb.ChannelBackup)) { throw new Error('Expected argument of type lnrpc.ChannelBackup'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelBackup(buffer_arg) { - return rpc_pb.ChannelBackup.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelBackup.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelBackupSubscription(arg) { - if (!(arg instanceof rpc_pb.ChannelBackupSubscription)) { + if (!(arg instanceof lightning_pb.ChannelBackupSubscription)) { throw new Error('Expected argument of type lnrpc.ChannelBackupSubscription'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelBackupSubscription(buffer_arg) { - return rpc_pb.ChannelBackupSubscription.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelBackupSubscription.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelBalanceRequest(arg) { - if (!(arg instanceof rpc_pb.ChannelBalanceRequest)) { + if (!(arg instanceof lightning_pb.ChannelBalanceRequest)) { throw new Error('Expected argument of type lnrpc.ChannelBalanceRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelBalanceRequest(buffer_arg) { - return rpc_pb.ChannelBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelBalanceResponse(arg) { - if (!(arg instanceof rpc_pb.ChannelBalanceResponse)) { + if (!(arg instanceof lightning_pb.ChannelBalanceResponse)) { throw new Error('Expected argument of type lnrpc.ChannelBalanceResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelBalanceResponse(buffer_arg) { - return rpc_pb.ChannelBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelEdge(arg) { - if (!(arg instanceof rpc_pb.ChannelEdge)) { + if (!(arg instanceof lightning_pb.ChannelEdge)) { throw new Error('Expected argument of type lnrpc.ChannelEdge'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelEdge(buffer_arg) { - return rpc_pb.ChannelEdge.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelEdge.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelEventSubscription(arg) { - if (!(arg instanceof rpc_pb.ChannelEventSubscription)) { + if (!(arg instanceof lightning_pb.ChannelEventSubscription)) { throw new Error('Expected argument of type lnrpc.ChannelEventSubscription'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelEventSubscription(buffer_arg) { - return rpc_pb.ChannelEventSubscription.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelEventSubscription.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelEventUpdate(arg) { - if (!(arg instanceof rpc_pb.ChannelEventUpdate)) { + if (!(arg instanceof lightning_pb.ChannelEventUpdate)) { throw new Error('Expected argument of type lnrpc.ChannelEventUpdate'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelEventUpdate(buffer_arg) { - return rpc_pb.ChannelEventUpdate.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelEventUpdate.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelGraph(arg) { - if (!(arg instanceof rpc_pb.ChannelGraph)) { + if (!(arg instanceof lightning_pb.ChannelGraph)) { throw new Error('Expected argument of type lnrpc.ChannelGraph'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelGraph(buffer_arg) { - return rpc_pb.ChannelGraph.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelGraph.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelGraphRequest(arg) { - if (!(arg instanceof rpc_pb.ChannelGraphRequest)) { + if (!(arg instanceof lightning_pb.ChannelGraphRequest)) { throw new Error('Expected argument of type lnrpc.ChannelGraphRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelGraphRequest(buffer_arg) { - return rpc_pb.ChannelGraphRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelGraphRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ChannelPoint(arg) { - if (!(arg instanceof rpc_pb.ChannelPoint)) { + if (!(arg instanceof lightning_pb.ChannelPoint)) { throw new Error('Expected argument of type lnrpc.ChannelPoint'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ChannelPoint(buffer_arg) { - return rpc_pb.ChannelPoint.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ChannelPoint.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_CheckMacPermRequest(arg) { + if (!(arg instanceof lightning_pb.CheckMacPermRequest)) { + throw new Error('Expected argument of type lnrpc.CheckMacPermRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_CheckMacPermRequest(buffer_arg) { + return lightning_pb.CheckMacPermRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_CheckMacPermResponse(arg) { + if (!(arg instanceof lightning_pb.CheckMacPermResponse)) { + throw new Error('Expected argument of type lnrpc.CheckMacPermResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_CheckMacPermResponse(buffer_arg) { + return lightning_pb.CheckMacPermResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_CloseChannelRequest(arg) { - if (!(arg instanceof rpc_pb.CloseChannelRequest)) { + if (!(arg instanceof lightning_pb.CloseChannelRequest)) { throw new Error('Expected argument of type lnrpc.CloseChannelRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_CloseChannelRequest(buffer_arg) { - return rpc_pb.CloseChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.CloseChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_CloseStatusUpdate(arg) { - if (!(arg instanceof rpc_pb.CloseStatusUpdate)) { + if (!(arg instanceof lightning_pb.CloseStatusUpdate)) { throw new Error('Expected argument of type lnrpc.CloseStatusUpdate'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_CloseStatusUpdate(buffer_arg) { - return rpc_pb.CloseStatusUpdate.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.CloseStatusUpdate.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ClosedChannelsRequest(arg) { - if (!(arg instanceof rpc_pb.ClosedChannelsRequest)) { + if (!(arg instanceof lightning_pb.ClosedChannelsRequest)) { throw new Error('Expected argument of type lnrpc.ClosedChannelsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ClosedChannelsRequest(buffer_arg) { - return rpc_pb.ClosedChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ClosedChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ClosedChannelsResponse(arg) { - if (!(arg instanceof rpc_pb.ClosedChannelsResponse)) { + if (!(arg instanceof lightning_pb.ClosedChannelsResponse)) { throw new Error('Expected argument of type lnrpc.ClosedChannelsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ClosedChannelsResponse(buffer_arg) { - return rpc_pb.ClosedChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ClosedChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ConnectPeerRequest(arg) { - if (!(arg instanceof rpc_pb.ConnectPeerRequest)) { + if (!(arg instanceof lightning_pb.ConnectPeerRequest)) { throw new Error('Expected argument of type lnrpc.ConnectPeerRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ConnectPeerRequest(buffer_arg) { - return rpc_pb.ConnectPeerRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ConnectPeerRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ConnectPeerResponse(arg) { - if (!(arg instanceof rpc_pb.ConnectPeerResponse)) { + if (!(arg instanceof lightning_pb.ConnectPeerResponse)) { throw new Error('Expected argument of type lnrpc.ConnectPeerResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ConnectPeerResponse(buffer_arg) { - return rpc_pb.ConnectPeerResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ConnectPeerResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_CustomMessage(arg) { + if (!(arg instanceof lightning_pb.CustomMessage)) { + throw new Error('Expected argument of type lnrpc.CustomMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_CustomMessage(buffer_arg) { + return lightning_pb.CustomMessage.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DebugLevelRequest(arg) { - if (!(arg instanceof rpc_pb.DebugLevelRequest)) { + if (!(arg instanceof lightning_pb.DebugLevelRequest)) { throw new Error('Expected argument of type lnrpc.DebugLevelRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DebugLevelRequest(buffer_arg) { - return rpc_pb.DebugLevelRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DebugLevelRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DebugLevelResponse(arg) { - if (!(arg instanceof rpc_pb.DebugLevelResponse)) { + if (!(arg instanceof lightning_pb.DebugLevelResponse)) { throw new Error('Expected argument of type lnrpc.DebugLevelResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DebugLevelResponse(buffer_arg) { - return rpc_pb.DebugLevelResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DebugLevelResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DeleteAllPaymentsRequest(arg) { - if (!(arg instanceof rpc_pb.DeleteAllPaymentsRequest)) { + if (!(arg instanceof lightning_pb.DeleteAllPaymentsRequest)) { throw new Error('Expected argument of type lnrpc.DeleteAllPaymentsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DeleteAllPaymentsRequest(buffer_arg) { - return rpc_pb.DeleteAllPaymentsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DeleteAllPaymentsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DeleteAllPaymentsResponse(arg) { - if (!(arg instanceof rpc_pb.DeleteAllPaymentsResponse)) { + if (!(arg instanceof lightning_pb.DeleteAllPaymentsResponse)) { throw new Error('Expected argument of type lnrpc.DeleteAllPaymentsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DeleteAllPaymentsResponse(buffer_arg) { - return rpc_pb.DeleteAllPaymentsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DeleteAllPaymentsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DeleteMacaroonIDRequest(arg) { - if (!(arg instanceof rpc_pb.DeleteMacaroonIDRequest)) { + if (!(arg instanceof lightning_pb.DeleteMacaroonIDRequest)) { throw new Error('Expected argument of type lnrpc.DeleteMacaroonIDRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DeleteMacaroonIDRequest(buffer_arg) { - return rpc_pb.DeleteMacaroonIDRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DeleteMacaroonIDRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DeleteMacaroonIDResponse(arg) { - if (!(arg instanceof rpc_pb.DeleteMacaroonIDResponse)) { + if (!(arg instanceof lightning_pb.DeleteMacaroonIDResponse)) { throw new Error('Expected argument of type lnrpc.DeleteMacaroonIDResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DeleteMacaroonIDResponse(buffer_arg) { - return rpc_pb.DeleteMacaroonIDResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DeleteMacaroonIDResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_DeletePaymentRequest(arg) { + if (!(arg instanceof lightning_pb.DeletePaymentRequest)) { + throw new Error('Expected argument of type lnrpc.DeletePaymentRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_DeletePaymentRequest(buffer_arg) { + return lightning_pb.DeletePaymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_DeletePaymentResponse(arg) { + if (!(arg instanceof lightning_pb.DeletePaymentResponse)) { + throw new Error('Expected argument of type lnrpc.DeletePaymentResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_DeletePaymentResponse(buffer_arg) { + return lightning_pb.DeletePaymentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DisconnectPeerRequest(arg) { - if (!(arg instanceof rpc_pb.DisconnectPeerRequest)) { + if (!(arg instanceof lightning_pb.DisconnectPeerRequest)) { throw new Error('Expected argument of type lnrpc.DisconnectPeerRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DisconnectPeerRequest(buffer_arg) { - return rpc_pb.DisconnectPeerRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DisconnectPeerRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_DisconnectPeerResponse(arg) { - if (!(arg instanceof rpc_pb.DisconnectPeerResponse)) { + if (!(arg instanceof lightning_pb.DisconnectPeerResponse)) { throw new Error('Expected argument of type lnrpc.DisconnectPeerResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_DisconnectPeerResponse(buffer_arg) { - return rpc_pb.DisconnectPeerResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.DisconnectPeerResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_EnforceNodePingRequest(arg) { + if (!(arg instanceof lightning_pb.EnforceNodePingRequest)) { + throw new Error('Expected argument of type lnrpc.EnforceNodePingRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_EnforceNodePingRequest(buffer_arg) { + return lightning_pb.EnforceNodePingRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_EnforceNodePingResponse(arg) { + if (!(arg instanceof lightning_pb.EnforceNodePingResponse)) { + throw new Error('Expected argument of type lnrpc.EnforceNodePingResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_EnforceNodePingResponse(buffer_arg) { + return lightning_pb.EnforceNodePingResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_EstimateFeeRequest(arg) { - if (!(arg instanceof rpc_pb.EstimateFeeRequest)) { + if (!(arg instanceof lightning_pb.EstimateFeeRequest)) { throw new Error('Expected argument of type lnrpc.EstimateFeeRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_EstimateFeeRequest(buffer_arg) { - return rpc_pb.EstimateFeeRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.EstimateFeeRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_EstimateFeeResponse(arg) { - if (!(arg instanceof rpc_pb.EstimateFeeResponse)) { + if (!(arg instanceof lightning_pb.EstimateFeeResponse)) { throw new Error('Expected argument of type lnrpc.EstimateFeeResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_EstimateFeeResponse(buffer_arg) { - return rpc_pb.EstimateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.EstimateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ExportChannelBackupRequest(arg) { - if (!(arg instanceof rpc_pb.ExportChannelBackupRequest)) { + if (!(arg instanceof lightning_pb.ExportChannelBackupRequest)) { throw new Error('Expected argument of type lnrpc.ExportChannelBackupRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ExportChannelBackupRequest(buffer_arg) { - return rpc_pb.ExportChannelBackupRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ExportChannelBackupRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_FeeReportRequest(arg) { - if (!(arg instanceof rpc_pb.FeeReportRequest)) { + if (!(arg instanceof lightning_pb.FeeReportRequest)) { throw new Error('Expected argument of type lnrpc.FeeReportRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_FeeReportRequest(buffer_arg) { - return rpc_pb.FeeReportRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.FeeReportRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_FeeReportResponse(arg) { - if (!(arg instanceof rpc_pb.FeeReportResponse)) { + if (!(arg instanceof lightning_pb.FeeReportResponse)) { throw new Error('Expected argument of type lnrpc.FeeReportResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_FeeReportResponse(buffer_arg) { - return rpc_pb.FeeReportResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.FeeReportResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ForwardingHistoryRequest(arg) { - if (!(arg instanceof rpc_pb.ForwardingHistoryRequest)) { + if (!(arg instanceof lightning_pb.ForwardingHistoryRequest)) { throw new Error('Expected argument of type lnrpc.ForwardingHistoryRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ForwardingHistoryRequest(buffer_arg) { - return rpc_pb.ForwardingHistoryRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ForwardingHistoryRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ForwardingHistoryResponse(arg) { - if (!(arg instanceof rpc_pb.ForwardingHistoryResponse)) { + if (!(arg instanceof lightning_pb.ForwardingHistoryResponse)) { throw new Error('Expected argument of type lnrpc.ForwardingHistoryResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ForwardingHistoryResponse(buffer_arg) { - return rpc_pb.ForwardingHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ForwardingHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_FundingStateStepResp(arg) { - if (!(arg instanceof rpc_pb.FundingStateStepResp)) { + if (!(arg instanceof lightning_pb.FundingStateStepResp)) { throw new Error('Expected argument of type lnrpc.FundingStateStepResp'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_FundingStateStepResp(buffer_arg) { - return rpc_pb.FundingStateStepResp.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.FundingStateStepResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_FundingTransitionMsg(arg) { - if (!(arg instanceof rpc_pb.FundingTransitionMsg)) { + if (!(arg instanceof lightning_pb.FundingTransitionMsg)) { throw new Error('Expected argument of type lnrpc.FundingTransitionMsg'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_FundingTransitionMsg(buffer_arg) { - return rpc_pb.FundingTransitionMsg.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.FundingTransitionMsg.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GetInfoRequest(arg) { - if (!(arg instanceof rpc_pb.GetInfoRequest)) { + if (!(arg instanceof lightning_pb.GetInfoRequest)) { throw new Error('Expected argument of type lnrpc.GetInfoRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GetInfoRequest(buffer_arg) { - return rpc_pb.GetInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GetInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GetInfoResponse(arg) { - if (!(arg instanceof rpc_pb.GetInfoResponse)) { + if (!(arg instanceof lightning_pb.GetInfoResponse)) { throw new Error('Expected argument of type lnrpc.GetInfoResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GetInfoResponse(buffer_arg) { - return rpc_pb.GetInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GetInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GetRecoveryInfoRequest(arg) { - if (!(arg instanceof rpc_pb.GetRecoveryInfoRequest)) { + if (!(arg instanceof lightning_pb.GetRecoveryInfoRequest)) { throw new Error('Expected argument of type lnrpc.GetRecoveryInfoRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GetRecoveryInfoRequest(buffer_arg) { - return rpc_pb.GetRecoveryInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GetRecoveryInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GetRecoveryInfoResponse(arg) { - if (!(arg instanceof rpc_pb.GetRecoveryInfoResponse)) { + if (!(arg instanceof lightning_pb.GetRecoveryInfoResponse)) { throw new Error('Expected argument of type lnrpc.GetRecoveryInfoResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GetRecoveryInfoResponse(buffer_arg) { - return rpc_pb.GetRecoveryInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GetRecoveryInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GetTransactionsRequest(arg) { - if (!(arg instanceof rpc_pb.GetTransactionsRequest)) { + if (!(arg instanceof lightning_pb.GetTransactionsRequest)) { throw new Error('Expected argument of type lnrpc.GetTransactionsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GetTransactionsRequest(buffer_arg) { - return rpc_pb.GetTransactionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GetTransactionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GraphTopologySubscription(arg) { - if (!(arg instanceof rpc_pb.GraphTopologySubscription)) { + if (!(arg instanceof lightning_pb.GraphTopologySubscription)) { throw new Error('Expected argument of type lnrpc.GraphTopologySubscription'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GraphTopologySubscription(buffer_arg) { - return rpc_pb.GraphTopologySubscription.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GraphTopologySubscription.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GraphTopologyUpdate(arg) { - if (!(arg instanceof rpc_pb.GraphTopologyUpdate)) { + if (!(arg instanceof lightning_pb.GraphTopologyUpdate)) { throw new Error('Expected argument of type lnrpc.GraphTopologyUpdate'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_GraphTopologyUpdate(buffer_arg) { - return rpc_pb.GraphTopologyUpdate.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.GraphTopologyUpdate.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_Invoice(arg) { - if (!(arg instanceof rpc_pb.Invoice)) { + if (!(arg instanceof lightning_pb.Invoice)) { throw new Error('Expected argument of type lnrpc.Invoice'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_Invoice(buffer_arg) { - return rpc_pb.Invoice.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.Invoice.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_InvoiceSubscription(arg) { - if (!(arg instanceof rpc_pb.InvoiceSubscription)) { + if (!(arg instanceof lightning_pb.InvoiceSubscription)) { throw new Error('Expected argument of type lnrpc.InvoiceSubscription'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_InvoiceSubscription(buffer_arg) { - return rpc_pb.InvoiceSubscription.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.InvoiceSubscription.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListChannelsRequest(arg) { - if (!(arg instanceof rpc_pb.ListChannelsRequest)) { + if (!(arg instanceof lightning_pb.ListChannelsRequest)) { throw new Error('Expected argument of type lnrpc.ListChannelsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListChannelsRequest(buffer_arg) { - return rpc_pb.ListChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListChannelsResponse(arg) { - if (!(arg instanceof rpc_pb.ListChannelsResponse)) { + if (!(arg instanceof lightning_pb.ListChannelsResponse)) { throw new Error('Expected argument of type lnrpc.ListChannelsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListChannelsResponse(buffer_arg) { - return rpc_pb.ListChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListInvoiceRequest(arg) { - if (!(arg instanceof rpc_pb.ListInvoiceRequest)) { + if (!(arg instanceof lightning_pb.ListInvoiceRequest)) { throw new Error('Expected argument of type lnrpc.ListInvoiceRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListInvoiceRequest(buffer_arg) { - return rpc_pb.ListInvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListInvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListInvoiceResponse(arg) { - if (!(arg instanceof rpc_pb.ListInvoiceResponse)) { + if (!(arg instanceof lightning_pb.ListInvoiceResponse)) { throw new Error('Expected argument of type lnrpc.ListInvoiceResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListInvoiceResponse(buffer_arg) { - return rpc_pb.ListInvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListInvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListMacaroonIDsRequest(arg) { - if (!(arg instanceof rpc_pb.ListMacaroonIDsRequest)) { + if (!(arg instanceof lightning_pb.ListMacaroonIDsRequest)) { throw new Error('Expected argument of type lnrpc.ListMacaroonIDsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListMacaroonIDsRequest(buffer_arg) { - return rpc_pb.ListMacaroonIDsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListMacaroonIDsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListMacaroonIDsResponse(arg) { - if (!(arg instanceof rpc_pb.ListMacaroonIDsResponse)) { + if (!(arg instanceof lightning_pb.ListMacaroonIDsResponse)) { throw new Error('Expected argument of type lnrpc.ListMacaroonIDsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListMacaroonIDsResponse(buffer_arg) { - return rpc_pb.ListMacaroonIDsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListMacaroonIDsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListPaymentsRequest(arg) { - if (!(arg instanceof rpc_pb.ListPaymentsRequest)) { + if (!(arg instanceof lightning_pb.ListPaymentsRequest)) { throw new Error('Expected argument of type lnrpc.ListPaymentsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListPaymentsRequest(buffer_arg) { - return rpc_pb.ListPaymentsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListPaymentsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListPaymentsResponse(arg) { - if (!(arg instanceof rpc_pb.ListPaymentsResponse)) { + if (!(arg instanceof lightning_pb.ListPaymentsResponse)) { throw new Error('Expected argument of type lnrpc.ListPaymentsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListPaymentsResponse(buffer_arg) { - return rpc_pb.ListPaymentsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListPaymentsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListPeersRequest(arg) { - if (!(arg instanceof rpc_pb.ListPeersRequest)) { + if (!(arg instanceof lightning_pb.ListPeersRequest)) { throw new Error('Expected argument of type lnrpc.ListPeersRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListPeersRequest(buffer_arg) { - return rpc_pb.ListPeersRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListPeersRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListPeersResponse(arg) { - if (!(arg instanceof rpc_pb.ListPeersResponse)) { + if (!(arg instanceof lightning_pb.ListPeersResponse)) { throw new Error('Expected argument of type lnrpc.ListPeersResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListPeersResponse(buffer_arg) { - return rpc_pb.ListPeersResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListPeersResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListPermissionsRequest(arg) { - if (!(arg instanceof rpc_pb.ListPermissionsRequest)) { + if (!(arg instanceof lightning_pb.ListPermissionsRequest)) { throw new Error('Expected argument of type lnrpc.ListPermissionsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListPermissionsRequest(buffer_arg) { - return rpc_pb.ListPermissionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListPermissionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListPermissionsResponse(arg) { - if (!(arg instanceof rpc_pb.ListPermissionsResponse)) { + if (!(arg instanceof lightning_pb.ListPermissionsResponse)) { throw new Error('Expected argument of type lnrpc.ListPermissionsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListPermissionsResponse(buffer_arg) { - return rpc_pb.ListPermissionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListPermissionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListUnspentRequest(arg) { - if (!(arg instanceof rpc_pb.ListUnspentRequest)) { + if (!(arg instanceof lightning_pb.ListUnspentRequest)) { throw new Error('Expected argument of type lnrpc.ListUnspentRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListUnspentRequest(buffer_arg) { - return rpc_pb.ListUnspentRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListUnspentRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_ListUnspentResponse(arg) { - if (!(arg instanceof rpc_pb.ListUnspentResponse)) { + if (!(arg instanceof lightning_pb.ListUnspentResponse)) { throw new Error('Expected argument of type lnrpc.ListUnspentResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_ListUnspentResponse(buffer_arg) { - return rpc_pb.ListUnspentResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.ListUnspentResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NetworkInfo(arg) { - if (!(arg instanceof rpc_pb.NetworkInfo)) { + if (!(arg instanceof lightning_pb.NetworkInfo)) { throw new Error('Expected argument of type lnrpc.NetworkInfo'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NetworkInfo(buffer_arg) { - return rpc_pb.NetworkInfo.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NetworkInfo.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NetworkInfoRequest(arg) { - if (!(arg instanceof rpc_pb.NetworkInfoRequest)) { + if (!(arg instanceof lightning_pb.NetworkInfoRequest)) { throw new Error('Expected argument of type lnrpc.NetworkInfoRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NetworkInfoRequest(buffer_arg) { - return rpc_pb.NetworkInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NetworkInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NewAddressRequest(arg) { - if (!(arg instanceof rpc_pb.NewAddressRequest)) { + if (!(arg instanceof lightning_pb.NewAddressRequest)) { throw new Error('Expected argument of type lnrpc.NewAddressRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NewAddressRequest(buffer_arg) { - return rpc_pb.NewAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NewAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NewAddressResponse(arg) { - if (!(arg instanceof rpc_pb.NewAddressResponse)) { + if (!(arg instanceof lightning_pb.NewAddressResponse)) { throw new Error('Expected argument of type lnrpc.NewAddressResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NewAddressResponse(buffer_arg) { - return rpc_pb.NewAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NewAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NodeInfo(arg) { - if (!(arg instanceof rpc_pb.NodeInfo)) { + if (!(arg instanceof lightning_pb.NodeInfo)) { throw new Error('Expected argument of type lnrpc.NodeInfo'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NodeInfo(buffer_arg) { - return rpc_pb.NodeInfo.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NodeInfo.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NodeInfoRequest(arg) { - if (!(arg instanceof rpc_pb.NodeInfoRequest)) { + if (!(arg instanceof lightning_pb.NodeInfoRequest)) { throw new Error('Expected argument of type lnrpc.NodeInfoRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NodeInfoRequest(buffer_arg) { - return rpc_pb.NodeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NodeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NodeMetricsRequest(arg) { - if (!(arg instanceof rpc_pb.NodeMetricsRequest)) { + if (!(arg instanceof lightning_pb.NodeMetricsRequest)) { throw new Error('Expected argument of type lnrpc.NodeMetricsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NodeMetricsRequest(buffer_arg) { - return rpc_pb.NodeMetricsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NodeMetricsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_NodeMetricsResponse(arg) { - if (!(arg instanceof rpc_pb.NodeMetricsResponse)) { + if (!(arg instanceof lightning_pb.NodeMetricsResponse)) { throw new Error('Expected argument of type lnrpc.NodeMetricsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_NodeMetricsResponse(buffer_arg) { - return rpc_pb.NodeMetricsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.NodeMetricsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_OpenChannelRequest(arg) { - if (!(arg instanceof rpc_pb.OpenChannelRequest)) { + if (!(arg instanceof lightning_pb.OpenChannelRequest)) { throw new Error('Expected argument of type lnrpc.OpenChannelRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_OpenChannelRequest(buffer_arg) { - return rpc_pb.OpenChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.OpenChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_OpenStatusUpdate(arg) { - if (!(arg instanceof rpc_pb.OpenStatusUpdate)) { + if (!(arg instanceof lightning_pb.OpenStatusUpdate)) { throw new Error('Expected argument of type lnrpc.OpenStatusUpdate'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_OpenStatusUpdate(buffer_arg) { - return rpc_pb.OpenStatusUpdate.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.OpenStatusUpdate.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PayReq(arg) { - if (!(arg instanceof rpc_pb.PayReq)) { + if (!(arg instanceof lightning_pb.PayReq)) { throw new Error('Expected argument of type lnrpc.PayReq'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PayReq(buffer_arg) { - return rpc_pb.PayReq.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PayReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PayReqString(arg) { - if (!(arg instanceof rpc_pb.PayReqString)) { + if (!(arg instanceof lightning_pb.PayReqString)) { throw new Error('Expected argument of type lnrpc.PayReqString'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PayReqString(buffer_arg) { - return rpc_pb.PayReqString.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PayReqString.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PaymentHash(arg) { - if (!(arg instanceof rpc_pb.PaymentHash)) { + if (!(arg instanceof lightning_pb.PaymentHash)) { throw new Error('Expected argument of type lnrpc.PaymentHash'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PaymentHash(buffer_arg) { - return rpc_pb.PaymentHash.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PaymentHash.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PeerEvent(arg) { - if (!(arg instanceof rpc_pb.PeerEvent)) { + if (!(arg instanceof lightning_pb.PeerEvent)) { throw new Error('Expected argument of type lnrpc.PeerEvent'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PeerEvent(buffer_arg) { - return rpc_pb.PeerEvent.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PeerEvent.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PeerEventSubscription(arg) { - if (!(arg instanceof rpc_pb.PeerEventSubscription)) { + if (!(arg instanceof lightning_pb.PeerEventSubscription)) { throw new Error('Expected argument of type lnrpc.PeerEventSubscription'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PeerEventSubscription(buffer_arg) { - return rpc_pb.PeerEventSubscription.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PeerEventSubscription.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PendingChannelsRequest(arg) { - if (!(arg instanceof rpc_pb.PendingChannelsRequest)) { + if (!(arg instanceof lightning_pb.PendingChannelsRequest)) { throw new Error('Expected argument of type lnrpc.PendingChannelsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PendingChannelsRequest(buffer_arg) { - return rpc_pb.PendingChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PendingChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PendingChannelsResponse(arg) { - if (!(arg instanceof rpc_pb.PendingChannelsResponse)) { + if (!(arg instanceof lightning_pb.PendingChannelsResponse)) { throw new Error('Expected argument of type lnrpc.PendingChannelsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PendingChannelsResponse(buffer_arg) { - return rpc_pb.PendingChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PendingChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PolicyUpdateRequest(arg) { - if (!(arg instanceof rpc_pb.PolicyUpdateRequest)) { + if (!(arg instanceof lightning_pb.PolicyUpdateRequest)) { throw new Error('Expected argument of type lnrpc.PolicyUpdateRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PolicyUpdateRequest(buffer_arg) { - return rpc_pb.PolicyUpdateRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PolicyUpdateRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_PolicyUpdateResponse(arg) { - if (!(arg instanceof rpc_pb.PolicyUpdateResponse)) { + if (!(arg instanceof lightning_pb.PolicyUpdateResponse)) { throw new Error('Expected argument of type lnrpc.PolicyUpdateResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_PolicyUpdateResponse(buffer_arg) { - return rpc_pb.PolicyUpdateResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.PolicyUpdateResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_QueryRoutesRequest(arg) { - if (!(arg instanceof rpc_pb.QueryRoutesRequest)) { + if (!(arg instanceof lightning_pb.QueryRoutesRequest)) { throw new Error('Expected argument of type lnrpc.QueryRoutesRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_QueryRoutesRequest(buffer_arg) { - return rpc_pb.QueryRoutesRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.QueryRoutesRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_QueryRoutesResponse(arg) { - if (!(arg instanceof rpc_pb.QueryRoutesResponse)) { + if (!(arg instanceof lightning_pb.QueryRoutesResponse)) { throw new Error('Expected argument of type lnrpc.QueryRoutesResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_QueryRoutesResponse(buffer_arg) { - return rpc_pb.QueryRoutesResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.QueryRoutesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_RPCMiddlewareRequest(arg) { + if (!(arg instanceof lightning_pb.RPCMiddlewareRequest)) { + throw new Error('Expected argument of type lnrpc.RPCMiddlewareRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_RPCMiddlewareRequest(buffer_arg) { + return lightning_pb.RPCMiddlewareRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_RPCMiddlewareResponse(arg) { + if (!(arg instanceof lightning_pb.RPCMiddlewareResponse)) { + throw new Error('Expected argument of type lnrpc.RPCMiddlewareResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_RPCMiddlewareResponse(buffer_arg) { + return lightning_pb.RPCMiddlewareResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_RestoreBackupResponse(arg) { - if (!(arg instanceof rpc_pb.RestoreBackupResponse)) { + if (!(arg instanceof lightning_pb.RestoreBackupResponse)) { throw new Error('Expected argument of type lnrpc.RestoreBackupResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_RestoreBackupResponse(buffer_arg) { - return rpc_pb.RestoreBackupResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.RestoreBackupResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_RestoreChanBackupRequest(arg) { - if (!(arg instanceof rpc_pb.RestoreChanBackupRequest)) { + if (!(arg instanceof lightning_pb.RestoreChanBackupRequest)) { throw new Error('Expected argument of type lnrpc.RestoreChanBackupRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_RestoreChanBackupRequest(buffer_arg) { - return rpc_pb.RestoreChanBackupRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.RestoreChanBackupRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendCoinsRequest(arg) { - if (!(arg instanceof rpc_pb.SendCoinsRequest)) { + if (!(arg instanceof lightning_pb.SendCoinsRequest)) { throw new Error('Expected argument of type lnrpc.SendCoinsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendCoinsRequest(buffer_arg) { - return rpc_pb.SendCoinsRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendCoinsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendCoinsResponse(arg) { - if (!(arg instanceof rpc_pb.SendCoinsResponse)) { + if (!(arg instanceof lightning_pb.SendCoinsResponse)) { throw new Error('Expected argument of type lnrpc.SendCoinsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendCoinsResponse(buffer_arg) { - return rpc_pb.SendCoinsResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendCoinsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_SendCustomMessageRequest(arg) { + if (!(arg instanceof lightning_pb.SendCustomMessageRequest)) { + throw new Error('Expected argument of type lnrpc.SendCustomMessageRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_SendCustomMessageRequest(buffer_arg) { + return lightning_pb.SendCustomMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_SendCustomMessageResponse(arg) { + if (!(arg instanceof lightning_pb.SendCustomMessageResponse)) { + throw new Error('Expected argument of type lnrpc.SendCustomMessageResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_SendCustomMessageResponse(buffer_arg) { + return lightning_pb.SendCustomMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendManyRequest(arg) { - if (!(arg instanceof rpc_pb.SendManyRequest)) { + if (!(arg instanceof lightning_pb.SendManyRequest)) { throw new Error('Expected argument of type lnrpc.SendManyRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendManyRequest(buffer_arg) { - return rpc_pb.SendManyRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendManyRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendManyResponse(arg) { - if (!(arg instanceof rpc_pb.SendManyResponse)) { + if (!(arg instanceof lightning_pb.SendManyResponse)) { throw new Error('Expected argument of type lnrpc.SendManyResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendManyResponse(buffer_arg) { - return rpc_pb.SendManyResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendManyResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendRequest(arg) { - if (!(arg instanceof rpc_pb.SendRequest)) { + if (!(arg instanceof lightning_pb.SendRequest)) { throw new Error('Expected argument of type lnrpc.SendRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendRequest(buffer_arg) { - return rpc_pb.SendRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendResponse(arg) { - if (!(arg instanceof rpc_pb.SendResponse)) { + if (!(arg instanceof lightning_pb.SendResponse)) { throw new Error('Expected argument of type lnrpc.SendResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendResponse(buffer_arg) { - return rpc_pb.SendResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendToRouteRequest(arg) { - if (!(arg instanceof rpc_pb.SendToRouteRequest)) { + if (!(arg instanceof lightning_pb.SendToRouteRequest)) { throw new Error('Expected argument of type lnrpc.SendToRouteRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SendToRouteRequest(buffer_arg) { - return rpc_pb.SendToRouteRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SendToRouteRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SignMessageRequest(arg) { - if (!(arg instanceof rpc_pb.SignMessageRequest)) { + if (!(arg instanceof lightning_pb.SignMessageRequest)) { throw new Error('Expected argument of type lnrpc.SignMessageRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SignMessageRequest(buffer_arg) { - return rpc_pb.SignMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SignMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SignMessageResponse(arg) { - if (!(arg instanceof rpc_pb.SignMessageResponse)) { + if (!(arg instanceof lightning_pb.SignMessageResponse)) { throw new Error('Expected argument of type lnrpc.SignMessageResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_SignMessageResponse(buffer_arg) { - return rpc_pb.SignMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.SignMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_StopRequest(arg) { - if (!(arg instanceof rpc_pb.StopRequest)) { + if (!(arg instanceof lightning_pb.StopRequest)) { throw new Error('Expected argument of type lnrpc.StopRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_StopRequest(buffer_arg) { - return rpc_pb.StopRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.StopRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_StopResponse(arg) { - if (!(arg instanceof rpc_pb.StopResponse)) { + if (!(arg instanceof lightning_pb.StopResponse)) { throw new Error('Expected argument of type lnrpc.StopResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_StopResponse(buffer_arg) { - return rpc_pb.StopResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.StopResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_SubscribeCustomMessagesRequest(arg) { + if (!(arg instanceof lightning_pb.SubscribeCustomMessagesRequest)) { + throw new Error('Expected argument of type lnrpc.SubscribeCustomMessagesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_SubscribeCustomMessagesRequest(buffer_arg) { + return lightning_pb.SubscribeCustomMessagesRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_Transaction(arg) { - if (!(arg instanceof rpc_pb.Transaction)) { + if (!(arg instanceof lightning_pb.Transaction)) { throw new Error('Expected argument of type lnrpc.Transaction'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_Transaction(buffer_arg) { - return rpc_pb.Transaction.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.Transaction.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_TransactionDetails(arg) { - if (!(arg instanceof rpc_pb.TransactionDetails)) { + if (!(arg instanceof lightning_pb.TransactionDetails)) { throw new Error('Expected argument of type lnrpc.TransactionDetails'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_TransactionDetails(buffer_arg) { - return rpc_pb.TransactionDetails.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.TransactionDetails.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_VerifyChanBackupResponse(arg) { - if (!(arg instanceof rpc_pb.VerifyChanBackupResponse)) { + if (!(arg instanceof lightning_pb.VerifyChanBackupResponse)) { throw new Error('Expected argument of type lnrpc.VerifyChanBackupResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_VerifyChanBackupResponse(buffer_arg) { - return rpc_pb.VerifyChanBackupResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.VerifyChanBackupResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_VerifyMessageRequest(arg) { - if (!(arg instanceof rpc_pb.VerifyMessageRequest)) { + if (!(arg instanceof lightning_pb.VerifyMessageRequest)) { throw new Error('Expected argument of type lnrpc.VerifyMessageRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_VerifyMessageRequest(buffer_arg) { - return rpc_pb.VerifyMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.VerifyMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_VerifyMessageResponse(arg) { - if (!(arg instanceof rpc_pb.VerifyMessageResponse)) { + if (!(arg instanceof lightning_pb.VerifyMessageResponse)) { throw new Error('Expected argument of type lnrpc.VerifyMessageResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_VerifyMessageResponse(buffer_arg) { - return rpc_pb.VerifyMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.VerifyMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_WalletBalanceRequest(arg) { - if (!(arg instanceof rpc_pb.WalletBalanceRequest)) { + if (!(arg instanceof lightning_pb.WalletBalanceRequest)) { throw new Error('Expected argument of type lnrpc.WalletBalanceRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_WalletBalanceRequest(buffer_arg) { - return rpc_pb.WalletBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.WalletBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_WalletBalanceResponse(arg) { - if (!(arg instanceof rpc_pb.WalletBalanceResponse)) { + if (!(arg instanceof lightning_pb.WalletBalanceResponse)) { throw new Error('Expected argument of type lnrpc.WalletBalanceResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_lnrpc_WalletBalanceResponse(buffer_arg) { - return rpc_pb.WalletBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg)); + return lightning_pb.WalletBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } @@ -1208,22 +1384,23 @@ walletBalance: { path: '/lnrpc.Lightning/WalletBalance', requestStream: false, responseStream: false, - requestType: rpc_pb.WalletBalanceRequest, - responseType: rpc_pb.WalletBalanceResponse, + requestType: lightning_pb.WalletBalanceRequest, + responseType: lightning_pb.WalletBalanceResponse, requestSerialize: serialize_lnrpc_WalletBalanceRequest, requestDeserialize: deserialize_lnrpc_WalletBalanceRequest, responseSerialize: serialize_lnrpc_WalletBalanceResponse, responseDeserialize: deserialize_lnrpc_WalletBalanceResponse, }, // lncli: `channelbalance` -// ChannelBalance returns the total funds available across all open channels -// in atoms. +// ChannelBalance returns a report on the total funds across all open channels, +// categorized in local/remote, pending local/remote and unsettled local/remote +// balances. channelBalance: { path: '/lnrpc.Lightning/ChannelBalance', requestStream: false, responseStream: false, - requestType: rpc_pb.ChannelBalanceRequest, - responseType: rpc_pb.ChannelBalanceResponse, + requestType: lightning_pb.ChannelBalanceRequest, + responseType: lightning_pb.ChannelBalanceResponse, requestSerialize: serialize_lnrpc_ChannelBalanceRequest, requestDeserialize: deserialize_lnrpc_ChannelBalanceRequest, responseSerialize: serialize_lnrpc_ChannelBalanceResponse, @@ -1236,8 +1413,8 @@ getTransactions: { path: '/lnrpc.Lightning/GetTransactions', requestStream: false, responseStream: false, - requestType: rpc_pb.GetTransactionsRequest, - responseType: rpc_pb.TransactionDetails, + requestType: lightning_pb.GetTransactionsRequest, + responseType: lightning_pb.TransactionDetails, requestSerialize: serialize_lnrpc_GetTransactionsRequest, requestDeserialize: deserialize_lnrpc_GetTransactionsRequest, responseSerialize: serialize_lnrpc_TransactionDetails, @@ -1255,8 +1432,8 @@ estimateFee: { path: '/lnrpc.Lightning/EstimateFee', requestStream: false, responseStream: false, - requestType: rpc_pb.EstimateFeeRequest, - responseType: rpc_pb.EstimateFeeResponse, + requestType: lightning_pb.EstimateFeeRequest, + responseType: lightning_pb.EstimateFeeResponse, requestSerialize: serialize_lnrpc_EstimateFeeRequest, requestDeserialize: deserialize_lnrpc_EstimateFeeRequest, responseSerialize: serialize_lnrpc_EstimateFeeResponse, @@ -1272,8 +1449,8 @@ sendCoins: { path: '/lnrpc.Lightning/SendCoins', requestStream: false, responseStream: false, - requestType: rpc_pb.SendCoinsRequest, - responseType: rpc_pb.SendCoinsResponse, + requestType: lightning_pb.SendCoinsRequest, + responseType: lightning_pb.SendCoinsResponse, requestSerialize: serialize_lnrpc_SendCoinsRequest, requestDeserialize: deserialize_lnrpc_SendCoinsRequest, responseSerialize: serialize_lnrpc_SendCoinsResponse, @@ -1288,8 +1465,8 @@ listUnspent: { path: '/lnrpc.Lightning/ListUnspent', requestStream: false, responseStream: false, - requestType: rpc_pb.ListUnspentRequest, - responseType: rpc_pb.ListUnspentResponse, + requestType: lightning_pb.ListUnspentRequest, + responseType: lightning_pb.ListUnspentResponse, requestSerialize: serialize_lnrpc_ListUnspentRequest, requestDeserialize: deserialize_lnrpc_ListUnspentRequest, responseSerialize: serialize_lnrpc_ListUnspentResponse, @@ -1303,8 +1480,8 @@ subscribeTransactions: { path: '/lnrpc.Lightning/SubscribeTransactions', requestStream: false, responseStream: true, - requestType: rpc_pb.GetTransactionsRequest, - responseType: rpc_pb.Transaction, + requestType: lightning_pb.GetTransactionsRequest, + responseType: lightning_pb.Transaction, requestSerialize: serialize_lnrpc_GetTransactionsRequest, requestDeserialize: deserialize_lnrpc_GetTransactionsRequest, responseSerialize: serialize_lnrpc_Transaction, @@ -1319,8 +1496,8 @@ sendMany: { path: '/lnrpc.Lightning/SendMany', requestStream: false, responseStream: false, - requestType: rpc_pb.SendManyRequest, - responseType: rpc_pb.SendManyResponse, + requestType: lightning_pb.SendManyRequest, + responseType: lightning_pb.SendManyResponse, requestSerialize: serialize_lnrpc_SendManyRequest, requestDeserialize: deserialize_lnrpc_SendManyRequest, responseSerialize: serialize_lnrpc_SendManyResponse, @@ -1332,8 +1509,8 @@ newAddress: { path: '/lnrpc.Lightning/NewAddress', requestStream: false, responseStream: false, - requestType: rpc_pb.NewAddressRequest, - responseType: rpc_pb.NewAddressResponse, + requestType: lightning_pb.NewAddressRequest, + responseType: lightning_pb.NewAddressResponse, requestSerialize: serialize_lnrpc_NewAddressRequest, requestDeserialize: deserialize_lnrpc_NewAddressRequest, responseSerialize: serialize_lnrpc_NewAddressResponse, @@ -1347,8 +1524,8 @@ signMessage: { path: '/lnrpc.Lightning/SignMessage', requestStream: false, responseStream: false, - requestType: rpc_pb.SignMessageRequest, - responseType: rpc_pb.SignMessageResponse, + requestType: lightning_pb.SignMessageRequest, + responseType: lightning_pb.SignMessageResponse, requestSerialize: serialize_lnrpc_SignMessageRequest, requestDeserialize: deserialize_lnrpc_SignMessageRequest, responseSerialize: serialize_lnrpc_SignMessageResponse, @@ -1363,8 +1540,8 @@ verifyMessage: { path: '/lnrpc.Lightning/VerifyMessage', requestStream: false, responseStream: false, - requestType: rpc_pb.VerifyMessageRequest, - responseType: rpc_pb.VerifyMessageResponse, + requestType: lightning_pb.VerifyMessageRequest, + responseType: lightning_pb.VerifyMessageResponse, requestSerialize: serialize_lnrpc_VerifyMessageRequest, requestDeserialize: deserialize_lnrpc_VerifyMessageRequest, responseSerialize: serialize_lnrpc_VerifyMessageResponse, @@ -1378,8 +1555,8 @@ connectPeer: { path: '/lnrpc.Lightning/ConnectPeer', requestStream: false, responseStream: false, - requestType: rpc_pb.ConnectPeerRequest, - responseType: rpc_pb.ConnectPeerResponse, + requestType: lightning_pb.ConnectPeerRequest, + responseType: lightning_pb.ConnectPeerResponse, requestSerialize: serialize_lnrpc_ConnectPeerRequest, requestDeserialize: deserialize_lnrpc_ConnectPeerRequest, responseSerialize: serialize_lnrpc_ConnectPeerResponse, @@ -1393,8 +1570,8 @@ disconnectPeer: { path: '/lnrpc.Lightning/DisconnectPeer', requestStream: false, responseStream: false, - requestType: rpc_pb.DisconnectPeerRequest, - responseType: rpc_pb.DisconnectPeerResponse, + requestType: lightning_pb.DisconnectPeerRequest, + responseType: lightning_pb.DisconnectPeerResponse, requestSerialize: serialize_lnrpc_DisconnectPeerRequest, requestDeserialize: deserialize_lnrpc_DisconnectPeerRequest, responseSerialize: serialize_lnrpc_DisconnectPeerResponse, @@ -1406,8 +1583,8 @@ listPeers: { path: '/lnrpc.Lightning/ListPeers', requestStream: false, responseStream: false, - requestType: rpc_pb.ListPeersRequest, - responseType: rpc_pb.ListPeersResponse, + requestType: lightning_pb.ListPeersRequest, + responseType: lightning_pb.ListPeersResponse, requestSerialize: serialize_lnrpc_ListPeersRequest, requestDeserialize: deserialize_lnrpc_ListPeersRequest, responseSerialize: serialize_lnrpc_ListPeersResponse, @@ -1421,8 +1598,8 @@ subscribePeerEvents: { path: '/lnrpc.Lightning/SubscribePeerEvents', requestStream: false, responseStream: true, - requestType: rpc_pb.PeerEventSubscription, - responseType: rpc_pb.PeerEvent, + requestType: lightning_pb.PeerEventSubscription, + responseType: lightning_pb.PeerEvent, requestSerialize: serialize_lnrpc_PeerEventSubscription, requestDeserialize: deserialize_lnrpc_PeerEventSubscription, responseSerialize: serialize_lnrpc_PeerEvent, @@ -1436,8 +1613,8 @@ getInfo: { path: '/lnrpc.Lightning/GetInfo', requestStream: false, responseStream: false, - requestType: rpc_pb.GetInfoRequest, - responseType: rpc_pb.GetInfoResponse, + requestType: lightning_pb.GetInfoRequest, + responseType: lightning_pb.GetInfoResponse, requestSerialize: serialize_lnrpc_GetInfoRequest, requestDeserialize: deserialize_lnrpc_GetInfoRequest, responseSerialize: serialize_lnrpc_GetInfoResponse, @@ -1451,8 +1628,8 @@ getRecoveryInfo: { path: '/lnrpc.Lightning/GetRecoveryInfo', requestStream: false, responseStream: false, - requestType: rpc_pb.GetRecoveryInfoRequest, - responseType: rpc_pb.GetRecoveryInfoResponse, + requestType: lightning_pb.GetRecoveryInfoRequest, + responseType: lightning_pb.GetRecoveryInfoResponse, requestSerialize: serialize_lnrpc_GetRecoveryInfoRequest, requestDeserialize: deserialize_lnrpc_GetRecoveryInfoRequest, responseSerialize: serialize_lnrpc_GetRecoveryInfoResponse, @@ -1469,8 +1646,8 @@ pendingChannels: { path: '/lnrpc.Lightning/PendingChannels', requestStream: false, responseStream: false, - requestType: rpc_pb.PendingChannelsRequest, - responseType: rpc_pb.PendingChannelsResponse, + requestType: lightning_pb.PendingChannelsRequest, + responseType: lightning_pb.PendingChannelsResponse, requestSerialize: serialize_lnrpc_PendingChannelsRequest, requestDeserialize: deserialize_lnrpc_PendingChannelsRequest, responseSerialize: serialize_lnrpc_PendingChannelsResponse, @@ -1483,8 +1660,8 @@ listChannels: { path: '/lnrpc.Lightning/ListChannels', requestStream: false, responseStream: false, - requestType: rpc_pb.ListChannelsRequest, - responseType: rpc_pb.ListChannelsResponse, + requestType: lightning_pb.ListChannelsRequest, + responseType: lightning_pb.ListChannelsResponse, requestSerialize: serialize_lnrpc_ListChannelsRequest, requestDeserialize: deserialize_lnrpc_ListChannelsRequest, responseSerialize: serialize_lnrpc_ListChannelsResponse, @@ -1499,8 +1676,8 @@ subscribeChannelEvents: { path: '/lnrpc.Lightning/SubscribeChannelEvents', requestStream: false, responseStream: true, - requestType: rpc_pb.ChannelEventSubscription, - responseType: rpc_pb.ChannelEventUpdate, + requestType: lightning_pb.ChannelEventSubscription, + responseType: lightning_pb.ChannelEventUpdate, requestSerialize: serialize_lnrpc_ChannelEventSubscription, requestDeserialize: deserialize_lnrpc_ChannelEventSubscription, responseSerialize: serialize_lnrpc_ChannelEventUpdate, @@ -1513,8 +1690,8 @@ closedChannels: { path: '/lnrpc.Lightning/ClosedChannels', requestStream: false, responseStream: false, - requestType: rpc_pb.ClosedChannelsRequest, - responseType: rpc_pb.ClosedChannelsResponse, + requestType: lightning_pb.ClosedChannelsRequest, + responseType: lightning_pb.ClosedChannelsResponse, requestSerialize: serialize_lnrpc_ClosedChannelsRequest, requestDeserialize: deserialize_lnrpc_ClosedChannelsRequest, responseSerialize: serialize_lnrpc_ClosedChannelsResponse, @@ -1529,8 +1706,8 @@ openChannelSync: { path: '/lnrpc.Lightning/OpenChannelSync', requestStream: false, responseStream: false, - requestType: rpc_pb.OpenChannelRequest, - responseType: rpc_pb.ChannelPoint, + requestType: lightning_pb.OpenChannelRequest, + responseType: lightning_pb.ChannelPoint, requestSerialize: serialize_lnrpc_OpenChannelRequest, requestDeserialize: deserialize_lnrpc_OpenChannelRequest, responseSerialize: serialize_lnrpc_ChannelPoint, @@ -1549,13 +1726,30 @@ openChannel: { path: '/lnrpc.Lightning/OpenChannel', requestStream: false, responseStream: true, - requestType: rpc_pb.OpenChannelRequest, - responseType: rpc_pb.OpenStatusUpdate, + requestType: lightning_pb.OpenChannelRequest, + responseType: lightning_pb.OpenStatusUpdate, requestSerialize: serialize_lnrpc_OpenChannelRequest, requestDeserialize: deserialize_lnrpc_OpenChannelRequest, responseSerialize: serialize_lnrpc_OpenStatusUpdate, responseDeserialize: deserialize_lnrpc_OpenStatusUpdate, }, + // lncli: `batchopenchannel` +// BatchOpenChannel attempts to open multiple single-funded channels in a +// single transaction in an atomic way. This means either all channel open +// requests succeed at once or all attempts are aborted if any of them fail. +// This is the safer variant of using PSBTs to manually fund a batch of +// channels through the OpenChannel RPC. +batchOpenChannel: { + path: '/lnrpc.Lightning/BatchOpenChannel', + requestStream: false, + responseStream: false, + requestType: lightning_pb.BatchOpenChannelRequest, + responseType: lightning_pb.BatchOpenChannelResponse, + requestSerialize: serialize_lnrpc_BatchOpenChannelRequest, + requestDeserialize: deserialize_lnrpc_BatchOpenChannelRequest, + responseSerialize: serialize_lnrpc_BatchOpenChannelResponse, + responseDeserialize: deserialize_lnrpc_BatchOpenChannelResponse, + }, // // FundingStateStep is an advanced funding related call that allows the caller // to either execute some preparatory steps for a funding workflow, or @@ -1569,8 +1763,8 @@ fundingStateStep: { path: '/lnrpc.Lightning/FundingStateStep', requestStream: false, responseStream: false, - requestType: rpc_pb.FundingTransitionMsg, - responseType: rpc_pb.FundingStateStepResp, + requestType: lightning_pb.FundingTransitionMsg, + responseType: lightning_pb.FundingStateStepResp, requestSerialize: serialize_lnrpc_FundingTransitionMsg, requestDeserialize: deserialize_lnrpc_FundingTransitionMsg, responseSerialize: serialize_lnrpc_FundingStateStepResp, @@ -1586,8 +1780,8 @@ channelAcceptor: { path: '/lnrpc.Lightning/ChannelAcceptor', requestStream: true, responseStream: true, - requestType: rpc_pb.ChannelAcceptResponse, - responseType: rpc_pb.ChannelAcceptRequest, + requestType: lightning_pb.ChannelAcceptResponse, + responseType: lightning_pb.ChannelAcceptRequest, requestSerialize: serialize_lnrpc_ChannelAcceptResponse, requestDeserialize: deserialize_lnrpc_ChannelAcceptResponse, responseSerialize: serialize_lnrpc_ChannelAcceptRequest, @@ -1605,8 +1799,8 @@ closeChannel: { path: '/lnrpc.Lightning/CloseChannel', requestStream: false, responseStream: true, - requestType: rpc_pb.CloseChannelRequest, - responseType: rpc_pb.CloseStatusUpdate, + requestType: lightning_pb.CloseChannelRequest, + responseType: lightning_pb.CloseStatusUpdate, requestSerialize: serialize_lnrpc_CloseChannelRequest, requestDeserialize: deserialize_lnrpc_CloseChannelRequest, responseSerialize: serialize_lnrpc_CloseStatusUpdate, @@ -1623,8 +1817,8 @@ abandonChannel: { path: '/lnrpc.Lightning/AbandonChannel', requestStream: false, responseStream: false, - requestType: rpc_pb.AbandonChannelRequest, - responseType: rpc_pb.AbandonChannelResponse, + requestType: lightning_pb.AbandonChannelRequest, + responseType: lightning_pb.AbandonChannelResponse, requestSerialize: serialize_lnrpc_AbandonChannelRequest, requestDeserialize: deserialize_lnrpc_AbandonChannelRequest, responseSerialize: serialize_lnrpc_AbandonChannelResponse, @@ -1640,8 +1834,8 @@ sendPayment: { path: '/lnrpc.Lightning/SendPayment', requestStream: true, responseStream: true, - requestType: rpc_pb.SendRequest, - responseType: rpc_pb.SendResponse, + requestType: lightning_pb.SendRequest, + responseType: lightning_pb.SendResponse, requestSerialize: serialize_lnrpc_SendRequest, requestDeserialize: deserialize_lnrpc_SendRequest, responseSerialize: serialize_lnrpc_SendResponse, @@ -1656,8 +1850,8 @@ sendPaymentSync: { path: '/lnrpc.Lightning/SendPaymentSync', requestStream: false, responseStream: false, - requestType: rpc_pb.SendRequest, - responseType: rpc_pb.SendResponse, + requestType: lightning_pb.SendRequest, + responseType: lightning_pb.SendResponse, requestSerialize: serialize_lnrpc_SendRequest, requestDeserialize: deserialize_lnrpc_SendRequest, responseSerialize: serialize_lnrpc_SendResponse, @@ -1673,8 +1867,8 @@ sendToRoute: { path: '/lnrpc.Lightning/SendToRoute', requestStream: true, responseStream: true, - requestType: rpc_pb.SendToRouteRequest, - responseType: rpc_pb.SendResponse, + requestType: lightning_pb.SendToRouteRequest, + responseType: lightning_pb.SendResponse, requestSerialize: serialize_lnrpc_SendToRouteRequest, requestDeserialize: deserialize_lnrpc_SendToRouteRequest, responseSerialize: serialize_lnrpc_SendResponse, @@ -1687,8 +1881,8 @@ sendToRouteSync: { path: '/lnrpc.Lightning/SendToRouteSync', requestStream: false, responseStream: false, - requestType: rpc_pb.SendToRouteRequest, - responseType: rpc_pb.SendResponse, + requestType: lightning_pb.SendToRouteRequest, + responseType: lightning_pb.SendResponse, requestSerialize: serialize_lnrpc_SendToRouteRequest, requestDeserialize: deserialize_lnrpc_SendToRouteRequest, responseSerialize: serialize_lnrpc_SendResponse, @@ -1702,8 +1896,8 @@ addInvoice: { path: '/lnrpc.Lightning/AddInvoice', requestStream: false, responseStream: false, - requestType: rpc_pb.Invoice, - responseType: rpc_pb.AddInvoiceResponse, + requestType: lightning_pb.Invoice, + responseType: lightning_pb.AddInvoiceResponse, requestSerialize: serialize_lnrpc_Invoice, requestDeserialize: deserialize_lnrpc_Invoice, responseSerialize: serialize_lnrpc_AddInvoiceResponse, @@ -1721,8 +1915,8 @@ listInvoices: { path: '/lnrpc.Lightning/ListInvoices', requestStream: false, responseStream: false, - requestType: rpc_pb.ListInvoiceRequest, - responseType: rpc_pb.ListInvoiceResponse, + requestType: lightning_pb.ListInvoiceRequest, + responseType: lightning_pb.ListInvoiceResponse, requestSerialize: serialize_lnrpc_ListInvoiceRequest, requestDeserialize: deserialize_lnrpc_ListInvoiceRequest, responseSerialize: serialize_lnrpc_ListInvoiceResponse, @@ -1736,8 +1930,8 @@ lookupInvoice: { path: '/lnrpc.Lightning/LookupInvoice', requestStream: false, responseStream: false, - requestType: rpc_pb.PaymentHash, - responseType: rpc_pb.Invoice, + requestType: lightning_pb.PaymentHash, + responseType: lightning_pb.Invoice, requestSerialize: serialize_lnrpc_PaymentHash, requestDeserialize: deserialize_lnrpc_PaymentHash, responseSerialize: serialize_lnrpc_Invoice, @@ -1757,8 +1951,8 @@ subscribeInvoices: { path: '/lnrpc.Lightning/SubscribeInvoices', requestStream: false, responseStream: true, - requestType: rpc_pb.InvoiceSubscription, - responseType: rpc_pb.Invoice, + requestType: lightning_pb.InvoiceSubscription, + responseType: lightning_pb.Invoice, requestSerialize: serialize_lnrpc_InvoiceSubscription, requestDeserialize: deserialize_lnrpc_InvoiceSubscription, responseSerialize: serialize_lnrpc_Invoice, @@ -1772,8 +1966,8 @@ decodePayReq: { path: '/lnrpc.Lightning/DecodePayReq', requestStream: false, responseStream: false, - requestType: rpc_pb.PayReqString, - responseType: rpc_pb.PayReq, + requestType: lightning_pb.PayReqString, + responseType: lightning_pb.PayReq, requestSerialize: serialize_lnrpc_PayReqString, requestDeserialize: deserialize_lnrpc_PayReqString, responseSerialize: serialize_lnrpc_PayReq, @@ -1785,21 +1979,36 @@ listPayments: { path: '/lnrpc.Lightning/ListPayments', requestStream: false, responseStream: false, - requestType: rpc_pb.ListPaymentsRequest, - responseType: rpc_pb.ListPaymentsResponse, + requestType: lightning_pb.ListPaymentsRequest, + responseType: lightning_pb.ListPaymentsResponse, requestSerialize: serialize_lnrpc_ListPaymentsRequest, requestDeserialize: deserialize_lnrpc_ListPaymentsRequest, responseSerialize: serialize_lnrpc_ListPaymentsResponse, responseDeserialize: deserialize_lnrpc_ListPaymentsResponse, }, // -// DeleteAllPayments deletes all outgoing payments from DB. +// DeletePayment deletes an outgoing payment from DB. Note that it will not +// attempt to delete an In-Flight payment, since that would be unsafe. +deletePayment: { + path: '/lnrpc.Lightning/DeletePayment', + requestStream: false, + responseStream: false, + requestType: lightning_pb.DeletePaymentRequest, + responseType: lightning_pb.DeletePaymentResponse, + requestSerialize: serialize_lnrpc_DeletePaymentRequest, + requestDeserialize: deserialize_lnrpc_DeletePaymentRequest, + responseSerialize: serialize_lnrpc_DeletePaymentResponse, + responseDeserialize: deserialize_lnrpc_DeletePaymentResponse, + }, + // +// DeleteAllPayments deletes all outgoing payments from DB. Note that it will +// not attempt to delete In-Flight payments, since that would be unsafe. deleteAllPayments: { path: '/lnrpc.Lightning/DeleteAllPayments', requestStream: false, responseStream: false, - requestType: rpc_pb.DeleteAllPaymentsRequest, - responseType: rpc_pb.DeleteAllPaymentsResponse, + requestType: lightning_pb.DeleteAllPaymentsRequest, + responseType: lightning_pb.DeleteAllPaymentsResponse, requestSerialize: serialize_lnrpc_DeleteAllPaymentsRequest, requestDeserialize: deserialize_lnrpc_DeleteAllPaymentsRequest, responseSerialize: serialize_lnrpc_DeleteAllPaymentsResponse, @@ -1816,8 +2025,8 @@ describeGraph: { path: '/lnrpc.Lightning/DescribeGraph', requestStream: false, responseStream: false, - requestType: rpc_pb.ChannelGraphRequest, - responseType: rpc_pb.ChannelGraph, + requestType: lightning_pb.ChannelGraphRequest, + responseType: lightning_pb.ChannelGraph, requestSerialize: serialize_lnrpc_ChannelGraphRequest, requestDeserialize: deserialize_lnrpc_ChannelGraphRequest, responseSerialize: serialize_lnrpc_ChannelGraph, @@ -1830,8 +2039,8 @@ getNodeMetrics: { path: '/lnrpc.Lightning/GetNodeMetrics', requestStream: false, responseStream: false, - requestType: rpc_pb.NodeMetricsRequest, - responseType: rpc_pb.NodeMetricsResponse, + requestType: lightning_pb.NodeMetricsRequest, + responseType: lightning_pb.NodeMetricsResponse, requestSerialize: serialize_lnrpc_NodeMetricsRequest, requestDeserialize: deserialize_lnrpc_NodeMetricsRequest, responseSerialize: serialize_lnrpc_NodeMetricsResponse, @@ -1846,8 +2055,8 @@ getChanInfo: { path: '/lnrpc.Lightning/GetChanInfo', requestStream: false, responseStream: false, - requestType: rpc_pb.ChanInfoRequest, - responseType: rpc_pb.ChannelEdge, + requestType: lightning_pb.ChanInfoRequest, + responseType: lightning_pb.ChannelEdge, requestSerialize: serialize_lnrpc_ChanInfoRequest, requestDeserialize: deserialize_lnrpc_ChanInfoRequest, responseSerialize: serialize_lnrpc_ChannelEdge, @@ -1860,13 +2069,29 @@ getNodeInfo: { path: '/lnrpc.Lightning/GetNodeInfo', requestStream: false, responseStream: false, - requestType: rpc_pb.NodeInfoRequest, - responseType: rpc_pb.NodeInfo, + requestType: lightning_pb.NodeInfoRequest, + responseType: lightning_pb.NodeInfo, requestSerialize: serialize_lnrpc_NodeInfoRequest, requestDeserialize: deserialize_lnrpc_NodeInfoRequest, responseSerialize: serialize_lnrpc_NodeInfo, responseDeserialize: deserialize_lnrpc_NodeInfo, }, + // lncli: `enforcenodeping` +// EnforceNodePing attempts to ping the specified peer. If the request is +// canceled before a response is received from the remote peer, then this +// forces lnd to disconnect from the peer (and potentially attempt to +// reconnect). +enforceNodePing: { + path: '/lnrpc.Lightning/EnforceNodePing', + requestStream: false, + responseStream: false, + requestType: lightning_pb.EnforceNodePingRequest, + responseType: lightning_pb.EnforceNodePingResponse, + requestSerialize: serialize_lnrpc_EnforceNodePingRequest, + requestDeserialize: deserialize_lnrpc_EnforceNodePingRequest, + responseSerialize: serialize_lnrpc_EnforceNodePingResponse, + responseDeserialize: deserialize_lnrpc_EnforceNodePingResponse, + }, // 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 @@ -1882,8 +2107,8 @@ queryRoutes: { path: '/lnrpc.Lightning/QueryRoutes', requestStream: false, responseStream: false, - requestType: rpc_pb.QueryRoutesRequest, - responseType: rpc_pb.QueryRoutesResponse, + requestType: lightning_pb.QueryRoutesRequest, + responseType: lightning_pb.QueryRoutesResponse, requestSerialize: serialize_lnrpc_QueryRoutesRequest, requestDeserialize: deserialize_lnrpc_QueryRoutesRequest, responseSerialize: serialize_lnrpc_QueryRoutesResponse, @@ -1896,8 +2121,8 @@ getNetworkInfo: { path: '/lnrpc.Lightning/GetNetworkInfo', requestStream: false, responseStream: false, - requestType: rpc_pb.NetworkInfoRequest, - responseType: rpc_pb.NetworkInfo, + requestType: lightning_pb.NetworkInfoRequest, + responseType: lightning_pb.NetworkInfo, requestSerialize: serialize_lnrpc_NetworkInfoRequest, requestDeserialize: deserialize_lnrpc_NetworkInfoRequest, responseSerialize: serialize_lnrpc_NetworkInfo, @@ -1910,8 +2135,8 @@ stopDaemon: { path: '/lnrpc.Lightning/StopDaemon', requestStream: false, responseStream: false, - requestType: rpc_pb.StopRequest, - responseType: rpc_pb.StopResponse, + requestType: lightning_pb.StopRequest, + responseType: lightning_pb.StopResponse, requestSerialize: serialize_lnrpc_StopRequest, requestDeserialize: deserialize_lnrpc_StopRequest, responseSerialize: serialize_lnrpc_StopResponse, @@ -1928,8 +2153,8 @@ subscribeChannelGraph: { path: '/lnrpc.Lightning/SubscribeChannelGraph', requestStream: false, responseStream: true, - requestType: rpc_pb.GraphTopologySubscription, - responseType: rpc_pb.GraphTopologyUpdate, + requestType: lightning_pb.GraphTopologySubscription, + responseType: lightning_pb.GraphTopologyUpdate, requestSerialize: serialize_lnrpc_GraphTopologySubscription, requestDeserialize: deserialize_lnrpc_GraphTopologySubscription, responseSerialize: serialize_lnrpc_GraphTopologyUpdate, @@ -1944,13 +2169,27 @@ debugLevel: { path: '/lnrpc.Lightning/DebugLevel', requestStream: false, responseStream: false, - requestType: rpc_pb.DebugLevelRequest, - responseType: rpc_pb.DebugLevelResponse, + requestType: lightning_pb.DebugLevelRequest, + responseType: lightning_pb.DebugLevelResponse, requestSerialize: serialize_lnrpc_DebugLevelRequest, requestDeserialize: deserialize_lnrpc_DebugLevelRequest, responseSerialize: serialize_lnrpc_DebugLevelResponse, responseDeserialize: deserialize_lnrpc_DebugLevelResponse, }, + // lncli: `calcpaymentstats` +// CalcPaymentStats goes through the DB and generates a report on total +// number of payments recorded. +calcPaymentStats: { + path: '/lnrpc.Lightning/CalcPaymentStats', + requestStream: false, + responseStream: false, + requestType: lightning_pb.CalcPaymentStatsRequest, + responseType: lightning_pb.CalcPaymentStatsResponse, + requestSerialize: serialize_lnrpc_CalcPaymentStatsRequest, + requestDeserialize: deserialize_lnrpc_CalcPaymentStatsRequest, + responseSerialize: serialize_lnrpc_CalcPaymentStatsResponse, + responseDeserialize: deserialize_lnrpc_CalcPaymentStatsResponse, + }, // lncli: `feereport` // FeeReport allows the caller to obtain a report detailing the current fee // schedule enforced by the node globally for each channel. @@ -1958,8 +2197,8 @@ feeReport: { path: '/lnrpc.Lightning/FeeReport', requestStream: false, responseStream: false, - requestType: rpc_pb.FeeReportRequest, - responseType: rpc_pb.FeeReportResponse, + requestType: lightning_pb.FeeReportRequest, + responseType: lightning_pb.FeeReportResponse, requestSerialize: serialize_lnrpc_FeeReportRequest, requestDeserialize: deserialize_lnrpc_FeeReportRequest, responseSerialize: serialize_lnrpc_FeeReportResponse, @@ -1972,8 +2211,8 @@ updateChannelPolicy: { path: '/lnrpc.Lightning/UpdateChannelPolicy', requestStream: false, responseStream: false, - requestType: rpc_pb.PolicyUpdateRequest, - responseType: rpc_pb.PolicyUpdateResponse, + requestType: lightning_pb.PolicyUpdateRequest, + responseType: lightning_pb.PolicyUpdateResponse, requestSerialize: serialize_lnrpc_PolicyUpdateRequest, requestDeserialize: deserialize_lnrpc_PolicyUpdateRequest, responseSerialize: serialize_lnrpc_PolicyUpdateResponse, @@ -1982,8 +2221,9 @@ updateChannelPolicy: { // 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 -// of the past 24 hrs of forwarding history are returned. +// within that time range, for a maximum number of events. If no maximum number +// of events is specified, up to 100 events will be returned. If no time-range +// is specified, then events will be returned in the order that they occured. // // 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. @@ -1994,8 +2234,8 @@ forwardingHistory: { path: '/lnrpc.Lightning/ForwardingHistory', requestStream: false, responseStream: false, - requestType: rpc_pb.ForwardingHistoryRequest, - responseType: rpc_pb.ForwardingHistoryResponse, + requestType: lightning_pb.ForwardingHistoryRequest, + responseType: lightning_pb.ForwardingHistoryResponse, requestSerialize: serialize_lnrpc_ForwardingHistoryRequest, requestDeserialize: deserialize_lnrpc_ForwardingHistoryRequest, responseSerialize: serialize_lnrpc_ForwardingHistoryResponse, @@ -2012,8 +2252,8 @@ exportChannelBackup: { path: '/lnrpc.Lightning/ExportChannelBackup', requestStream: false, responseStream: false, - requestType: rpc_pb.ExportChannelBackupRequest, - responseType: rpc_pb.ChannelBackup, + requestType: lightning_pb.ExportChannelBackupRequest, + responseType: lightning_pb.ChannelBackup, requestSerialize: serialize_lnrpc_ExportChannelBackupRequest, requestDeserialize: deserialize_lnrpc_ExportChannelBackupRequest, responseSerialize: serialize_lnrpc_ChannelBackup, @@ -2029,8 +2269,8 @@ exportAllChannelBackups: { path: '/lnrpc.Lightning/ExportAllChannelBackups', requestStream: false, responseStream: false, - requestType: rpc_pb.ChanBackupExportRequest, - responseType: rpc_pb.ChanBackupSnapshot, + requestType: lightning_pb.ChanBackupExportRequest, + responseType: lightning_pb.ChanBackupSnapshot, requestSerialize: serialize_lnrpc_ChanBackupExportRequest, requestDeserialize: deserialize_lnrpc_ChanBackupExportRequest, responseSerialize: serialize_lnrpc_ChanBackupSnapshot, @@ -2044,8 +2284,8 @@ verifyChanBackup: { path: '/lnrpc.Lightning/VerifyChanBackup', requestStream: false, responseStream: false, - requestType: rpc_pb.ChanBackupSnapshot, - responseType: rpc_pb.VerifyChanBackupResponse, + requestType: lightning_pb.ChanBackupSnapshot, + responseType: lightning_pb.VerifyChanBackupResponse, requestSerialize: serialize_lnrpc_ChanBackupSnapshot, requestDeserialize: deserialize_lnrpc_ChanBackupSnapshot, responseSerialize: serialize_lnrpc_VerifyChanBackupResponse, @@ -2060,8 +2300,8 @@ restoreChannelBackups: { path: '/lnrpc.Lightning/RestoreChannelBackups', requestStream: false, responseStream: false, - requestType: rpc_pb.RestoreChanBackupRequest, - responseType: rpc_pb.RestoreBackupResponse, + requestType: lightning_pb.RestoreChanBackupRequest, + responseType: lightning_pb.RestoreBackupResponse, requestSerialize: serialize_lnrpc_RestoreChanBackupRequest, requestDeserialize: deserialize_lnrpc_RestoreChanBackupRequest, responseSerialize: serialize_lnrpc_RestoreBackupResponse, @@ -2079,8 +2319,8 @@ subscribeChannelBackups: { path: '/lnrpc.Lightning/SubscribeChannelBackups', requestStream: false, responseStream: true, - requestType: rpc_pb.ChannelBackupSubscription, - responseType: rpc_pb.ChanBackupSnapshot, + requestType: lightning_pb.ChannelBackupSubscription, + responseType: lightning_pb.ChanBackupSnapshot, requestSerialize: serialize_lnrpc_ChannelBackupSubscription, requestDeserialize: deserialize_lnrpc_ChannelBackupSubscription, responseSerialize: serialize_lnrpc_ChanBackupSnapshot, @@ -2094,8 +2334,8 @@ bakeMacaroon: { path: '/lnrpc.Lightning/BakeMacaroon', requestStream: false, responseStream: false, - requestType: rpc_pb.BakeMacaroonRequest, - responseType: rpc_pb.BakeMacaroonResponse, + requestType: lightning_pb.BakeMacaroonRequest, + responseType: lightning_pb.BakeMacaroonResponse, requestSerialize: serialize_lnrpc_BakeMacaroonRequest, requestDeserialize: deserialize_lnrpc_BakeMacaroonRequest, responseSerialize: serialize_lnrpc_BakeMacaroonResponse, @@ -2107,8 +2347,8 @@ listMacaroonIDs: { path: '/lnrpc.Lightning/ListMacaroonIDs', requestStream: false, responseStream: false, - requestType: rpc_pb.ListMacaroonIDsRequest, - responseType: rpc_pb.ListMacaroonIDsResponse, + requestType: lightning_pb.ListMacaroonIDsRequest, + responseType: lightning_pb.ListMacaroonIDsResponse, requestSerialize: serialize_lnrpc_ListMacaroonIDsRequest, requestDeserialize: deserialize_lnrpc_ListMacaroonIDsRequest, responseSerialize: serialize_lnrpc_ListMacaroonIDsResponse, @@ -2121,8 +2361,8 @@ deleteMacaroonID: { path: '/lnrpc.Lightning/DeleteMacaroonID', requestStream: false, responseStream: false, - requestType: rpc_pb.DeleteMacaroonIDRequest, - responseType: rpc_pb.DeleteMacaroonIDResponse, + requestType: lightning_pb.DeleteMacaroonIDRequest, + responseType: lightning_pb.DeleteMacaroonIDResponse, requestSerialize: serialize_lnrpc_DeleteMacaroonIDRequest, requestDeserialize: deserialize_lnrpc_DeleteMacaroonIDRequest, responseSerialize: serialize_lnrpc_DeleteMacaroonIDResponse, @@ -2135,12 +2375,78 @@ listPermissions: { path: '/lnrpc.Lightning/ListPermissions', requestStream: false, responseStream: false, - requestType: rpc_pb.ListPermissionsRequest, - responseType: rpc_pb.ListPermissionsResponse, + requestType: lightning_pb.ListPermissionsRequest, + responseType: lightning_pb.ListPermissionsResponse, requestSerialize: serialize_lnrpc_ListPermissionsRequest, requestDeserialize: deserialize_lnrpc_ListPermissionsRequest, responseSerialize: serialize_lnrpc_ListPermissionsResponse, responseDeserialize: deserialize_lnrpc_ListPermissionsResponse, }, + // +// CheckMacaroonPermissions checks whether a request follows the constraints +// imposed on the macaroon and that the macaroon is authorized to follow the +// provided permissions. +checkMacaroonPermissions: { + path: '/lnrpc.Lightning/CheckMacaroonPermissions', + requestStream: false, + responseStream: false, + requestType: lightning_pb.CheckMacPermRequest, + responseType: lightning_pb.CheckMacPermResponse, + requestSerialize: serialize_lnrpc_CheckMacPermRequest, + requestDeserialize: deserialize_lnrpc_CheckMacPermRequest, + responseSerialize: serialize_lnrpc_CheckMacPermResponse, + responseDeserialize: deserialize_lnrpc_CheckMacPermResponse, + }, + // +// RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A +// gRPC middleware is software component external to lnd that aims to add +// additional business logic to lnd by observing/intercepting/validating +// incoming gRPC client requests and (if needed) replacing/overwriting outgoing +// messages before they're sent to the client. When registering the middleware +// must identify itself and indicate what custom macaroon caveats it wants to +// be responsible for. Only requests that contain a macaroon with that specific +// custom caveat are then sent to the middleware for inspection. The other +// option is to register for the read-only mode in which all requests/responses +// are forwarded for interception to the middleware but the middleware is not +// allowed to modify any responses. As a security measure, _no_ middleware can +// modify responses for requests made with _unencumbered_ macaroons! +registerRPCMiddleware: { + path: '/lnrpc.Lightning/RegisterRPCMiddleware', + requestStream: true, + responseStream: true, + requestType: lightning_pb.RPCMiddlewareResponse, + responseType: lightning_pb.RPCMiddlewareRequest, + requestSerialize: serialize_lnrpc_RPCMiddlewareResponse, + requestDeserialize: deserialize_lnrpc_RPCMiddlewareResponse, + responseSerialize: serialize_lnrpc_RPCMiddlewareRequest, + responseDeserialize: deserialize_lnrpc_RPCMiddlewareRequest, + }, + // lncli: `sendcustom` +// SendCustomMessage sends a custom peer message. +sendCustomMessage: { + path: '/lnrpc.Lightning/SendCustomMessage', + requestStream: false, + responseStream: false, + requestType: lightning_pb.SendCustomMessageRequest, + responseType: lightning_pb.SendCustomMessageResponse, + requestSerialize: serialize_lnrpc_SendCustomMessageRequest, + requestDeserialize: deserialize_lnrpc_SendCustomMessageRequest, + responseSerialize: serialize_lnrpc_SendCustomMessageResponse, + responseDeserialize: deserialize_lnrpc_SendCustomMessageResponse, + }, + // lncli: `subscribecustom` +// SubscribeCustomMessages subscribes to a stream of incoming custom peer +// messages. +subscribeCustomMessages: { + path: '/lnrpc.Lightning/SubscribeCustomMessages', + requestStream: false, + responseStream: true, + requestType: lightning_pb.SubscribeCustomMessagesRequest, + responseType: lightning_pb.CustomMessage, + requestSerialize: serialize_lnrpc_SubscribeCustomMessagesRequest, + requestDeserialize: deserialize_lnrpc_SubscribeCustomMessagesRequest, + responseSerialize: serialize_lnrpc_CustomMessage, + responseDeserialize: deserialize_lnrpc_CustomMessage, + }, }; diff --git a/app/middleware/ln/rpc_pb.js b/app/middleware/ln/lightning_pb.js similarity index 83% rename from app/middleware/ln/rpc_pb.js rename to app/middleware/ln/lightning_pb.js index 9cc07c6e63..66f4dad6b6 100644 --- a/app/middleware/ln/rpc_pb.js +++ b/app/middleware/ln/lightning_pb.js @@ -1,4 +1,4 @@ -// source: rpc.proto +// source: lightning.proto /** * @fileoverview * @enhanceable @@ -15,12 +15,21 @@ var jspb = require('google-protobuf'); var goog = jspb; var proto = {}; +goog.exportSymbol('lnrpc.AMP', null, proto); +goog.exportSymbol('lnrpc.AMPInvoiceState', null, proto); +goog.exportSymbol('lnrpc.AMPRecord', null, proto); goog.exportSymbol('lnrpc.AbandonChannelRequest', null, proto); goog.exportSymbol('lnrpc.AbandonChannelResponse', null, proto); goog.exportSymbol('lnrpc.AddInvoiceResponse', null, proto); goog.exportSymbol('lnrpc.AddressType', null, proto); +goog.exportSymbol('lnrpc.Amount', null, proto); goog.exportSymbol('lnrpc.BakeMacaroonRequest', null, proto); goog.exportSymbol('lnrpc.BakeMacaroonResponse', null, proto); +goog.exportSymbol('lnrpc.BatchOpenChannel', null, proto); +goog.exportSymbol('lnrpc.BatchOpenChannelRequest', null, proto); +goog.exportSymbol('lnrpc.BatchOpenChannelResponse', null, proto); +goog.exportSymbol('lnrpc.CalcPaymentStatsRequest', null, proto); +goog.exportSymbol('lnrpc.CalcPaymentStatsResponse', null, proto); goog.exportSymbol('lnrpc.Chain', null, proto); goog.exportSymbol('lnrpc.ChanBackupExportRequest', null, proto); goog.exportSymbol('lnrpc.ChanBackupSnapshot', null, proto); @@ -51,6 +60,8 @@ goog.exportSymbol('lnrpc.ChannelOpenUpdate', null, proto); goog.exportSymbol('lnrpc.ChannelPoint', null, proto); goog.exportSymbol('lnrpc.ChannelPoint.FundingTxidCase', null, proto); goog.exportSymbol('lnrpc.ChannelUpdate', null, proto); +goog.exportSymbol('lnrpc.CheckMacPermRequest', null, proto); +goog.exportSymbol('lnrpc.CheckMacPermResponse', null, proto); goog.exportSymbol('lnrpc.CloseChannelRequest', null, proto); goog.exportSymbol('lnrpc.CloseStatusUpdate', null, proto); goog.exportSymbol('lnrpc.CloseStatusUpdate.UpdateCase', null, proto); @@ -61,18 +72,24 @@ goog.exportSymbol('lnrpc.CommitmentType', null, proto); goog.exportSymbol('lnrpc.ConfirmationUpdate', null, proto); goog.exportSymbol('lnrpc.ConnectPeerRequest', null, proto); goog.exportSymbol('lnrpc.ConnectPeerResponse', null, proto); +goog.exportSymbol('lnrpc.CustomMessage', null, proto); goog.exportSymbol('lnrpc.DebugLevelRequest', null, proto); goog.exportSymbol('lnrpc.DebugLevelResponse', null, proto); goog.exportSymbol('lnrpc.DeleteAllPaymentsRequest', null, proto); goog.exportSymbol('lnrpc.DeleteAllPaymentsResponse', null, proto); goog.exportSymbol('lnrpc.DeleteMacaroonIDRequest', null, proto); goog.exportSymbol('lnrpc.DeleteMacaroonIDResponse', null, proto); +goog.exportSymbol('lnrpc.DeletePaymentRequest', null, proto); +goog.exportSymbol('lnrpc.DeletePaymentResponse', null, proto); goog.exportSymbol('lnrpc.DisconnectPeerRequest', null, proto); goog.exportSymbol('lnrpc.DisconnectPeerResponse', null, proto); goog.exportSymbol('lnrpc.EdgeLocator', null, proto); +goog.exportSymbol('lnrpc.EnforceNodePingRequest', null, proto); +goog.exportSymbol('lnrpc.EnforceNodePingResponse', null, proto); goog.exportSymbol('lnrpc.EstimateFeeRequest', null, proto); goog.exportSymbol('lnrpc.EstimateFeeResponse', null, proto); goog.exportSymbol('lnrpc.ExportChannelBackupRequest', null, proto); +goog.exportSymbol('lnrpc.FailedUpdate', null, proto); goog.exportSymbol('lnrpc.Failure', null, proto); goog.exportSymbol('lnrpc.Failure.FailureCode', null, proto); goog.exportSymbol('lnrpc.Feature', null, proto); @@ -106,6 +123,7 @@ goog.exportSymbol('lnrpc.HTLCAttempt.HTLCStatus', null, proto); goog.exportSymbol('lnrpc.Hop', null, proto); goog.exportSymbol('lnrpc.HopHint', null, proto); goog.exportSymbol('lnrpc.Initiator', null, proto); +goog.exportSymbol('lnrpc.InterceptFeedback', null, proto); goog.exportSymbol('lnrpc.Invoice', null, proto); goog.exportSymbol('lnrpc.Invoice.InvoiceState', null, proto); goog.exportSymbol('lnrpc.InvoiceHTLC', null, proto); @@ -133,6 +151,7 @@ goog.exportSymbol('lnrpc.MPPRecord', null, proto); goog.exportSymbol('lnrpc.MacaroonId', null, proto); goog.exportSymbol('lnrpc.MacaroonPermission', null, proto); goog.exportSymbol('lnrpc.MacaroonPermissionList', null, proto); +goog.exportSymbol('lnrpc.MiddlewareRegistration', null, proto); goog.exportSymbol('lnrpc.MultiChanBackup', null, proto); goog.exportSymbol('lnrpc.NetworkInfo', null, proto); goog.exportSymbol('lnrpc.NetworkInfoRequest', null, proto); @@ -179,6 +198,11 @@ goog.exportSymbol('lnrpc.PolicyUpdateResponse', null, proto); goog.exportSymbol('lnrpc.PsbtShim', null, proto); goog.exportSymbol('lnrpc.QueryRoutesRequest', null, proto); goog.exportSymbol('lnrpc.QueryRoutesResponse', null, proto); +goog.exportSymbol('lnrpc.RPCMessage', null, proto); +goog.exportSymbol('lnrpc.RPCMiddlewareRequest', null, proto); +goog.exportSymbol('lnrpc.RPCMiddlewareRequest.InterceptTypeCase', null, proto); +goog.exportSymbol('lnrpc.RPCMiddlewareResponse', null, proto); +goog.exportSymbol('lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase', null, proto); goog.exportSymbol('lnrpc.ReadyForPsbtFunding', null, proto); goog.exportSymbol('lnrpc.Resolution', null, proto); goog.exportSymbol('lnrpc.ResolutionOutcome', null, proto); @@ -191,24 +215,115 @@ goog.exportSymbol('lnrpc.RouteHint', null, proto); goog.exportSymbol('lnrpc.RoutingPolicy', null, proto); goog.exportSymbol('lnrpc.SendCoinsRequest', null, proto); goog.exportSymbol('lnrpc.SendCoinsResponse', null, proto); +goog.exportSymbol('lnrpc.SendCustomMessageRequest', null, proto); +goog.exportSymbol('lnrpc.SendCustomMessageResponse', null, proto); goog.exportSymbol('lnrpc.SendManyRequest', null, proto); goog.exportSymbol('lnrpc.SendManyResponse', null, proto); goog.exportSymbol('lnrpc.SendRequest', null, proto); goog.exportSymbol('lnrpc.SendResponse', null, proto); goog.exportSymbol('lnrpc.SendToRouteRequest', null, proto); +goog.exportSymbol('lnrpc.SetID', null, proto); goog.exportSymbol('lnrpc.SignMessageRequest', null, proto); goog.exportSymbol('lnrpc.SignMessageResponse', null, proto); goog.exportSymbol('lnrpc.StopRequest', null, proto); goog.exportSymbol('lnrpc.StopResponse', null, proto); +goog.exportSymbol('lnrpc.StreamAuth', null, proto); +goog.exportSymbol('lnrpc.SubscribeCustomMessagesRequest', null, proto); goog.exportSymbol('lnrpc.TimestampedError', null, proto); goog.exportSymbol('lnrpc.Transaction', null, proto); goog.exportSymbol('lnrpc.TransactionDetails', null, proto); +goog.exportSymbol('lnrpc.UpdateFailure', null, proto); goog.exportSymbol('lnrpc.Utxo', null, proto); goog.exportSymbol('lnrpc.VerifyChanBackupResponse', null, proto); goog.exportSymbol('lnrpc.VerifyMessageRequest', null, proto); goog.exportSymbol('lnrpc.VerifyMessageResponse', null, proto); +goog.exportSymbol('lnrpc.WalletAccountBalance', null, proto); goog.exportSymbol('lnrpc.WalletBalanceRequest', null, proto); goog.exportSymbol('lnrpc.WalletBalanceResponse', null, proto); +/** + * 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.SubscribeCustomMessagesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SubscribeCustomMessagesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.SubscribeCustomMessagesRequest.displayName = 'proto.lnrpc.SubscribeCustomMessagesRequest'; +} +/** + * 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.CustomMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.CustomMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.CustomMessage.displayName = 'proto.lnrpc.CustomMessage'; +} +/** + * 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.SendCustomMessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SendCustomMessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.SendCustomMessageRequest.displayName = 'proto.lnrpc.SendCustomMessageRequest'; +} +/** + * 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.SendCustomMessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SendCustomMessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.SendCustomMessageResponse.displayName = 'proto.lnrpc.SendCustomMessageResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -913,7 +1028,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.lnrpc.Channel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Channel.repeatedFields_, null); + jspb.Message.initialize(this, opt_data, 0, 500, proto.lnrpc.Channel.repeatedFields_, null); }; goog.inherits(proto.lnrpc.Channel, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -976,7 +1091,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.lnrpc.ChannelCloseSummary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelCloseSummary.repeatedFields_, null); + jspb.Message.initialize(this, opt_data, 0, 500, proto.lnrpc.ChannelCloseSummary.repeatedFields_, null); }; goog.inherits(proto.lnrpc.ChannelCloseSummary, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -1427,6 +1542,69 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.ReadyForPsbtFunding.displayName = 'proto.lnrpc.ReadyForPsbtFunding'; } +/** + * 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.BatchOpenChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.BatchOpenChannelRequest.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.BatchOpenChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.BatchOpenChannelRequest.displayName = 'proto.lnrpc.BatchOpenChannelRequest'; +} +/** + * 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.BatchOpenChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.BatchOpenChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.BatchOpenChannel.displayName = 'proto.lnrpc.BatchOpenChannel'; +} +/** + * 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.BatchOpenChannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.BatchOpenChannelResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.BatchOpenChannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.BatchOpenChannelResponse.displayName = 'proto.lnrpc.BatchOpenChannelResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1753,7 +1931,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.lnrpc.PendingChannelsResponse.PendingChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, 500, null, null); }; goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -1910,6 +2088,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.ChannelEventUpdate.displayName = 'proto.lnrpc.ChannelEventUpdate'; } +/** + * 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.WalletAccountBalance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.WalletAccountBalance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.WalletAccountBalance.displayName = 'proto.lnrpc.WalletAccountBalance'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1952,6 +2151,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.WalletBalanceResponse.displayName = 'proto.lnrpc.WalletBalanceResponse'; } +/** + * 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.Amount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.Amount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.Amount.displayName = 'proto.lnrpc.Amount'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1984,7 +2204,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.lnrpc.ChannelBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, 500, null, null); }; goog.inherits(proto.lnrpc.ChannelBalanceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -2120,6 +2340,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.MPPRecord.displayName = 'proto.lnrpc.MPPRecord'; } +/** + * 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.AMPRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.AMPRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.AMPRecord.displayName = 'proto.lnrpc.AMPRecord'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2246,6 +2487,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.RoutingPolicy.displayName = 'proto.lnrpc.RoutingPolicy'; } +/** + * 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.EnforceNodePingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.EnforceNodePingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.EnforceNodePingRequest.displayName = 'proto.lnrpc.EnforceNodePingRequest'; +} +/** + * 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.EnforceNodePingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.EnforceNodePingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.EnforceNodePingResponse.displayName = 'proto.lnrpc.EnforceNodePingResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2603,6 +2886,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.HopHint.displayName = 'proto.lnrpc.HopHint'; } +/** + * 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.SetID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SetID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.SetID.displayName = 'proto.lnrpc.SetID'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2624,6 +2928,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.RouteHint.displayName = 'proto.lnrpc.RouteHint'; } +/** + * 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.AMPInvoiceState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.AMPInvoiceState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.AMPInvoiceState.displayName = 'proto.lnrpc.AMPInvoiceState'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2666,6 +2991,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.InvoiceHTLC.displayName = 'proto.lnrpc.InvoiceHTLC'; } +/** + * 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.AMP = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.AMP, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.AMP.displayName = 'proto.lnrpc.AMP'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2855,6 +3201,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.ListPaymentsResponse.displayName = 'proto.lnrpc.ListPaymentsResponse'; } +/** + * 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.DeletePaymentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.DeletePaymentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.DeletePaymentRequest.displayName = 'proto.lnrpc.DeletePaymentRequest'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2876,6 +3243,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.DeleteAllPaymentsRequest.displayName = 'proto.lnrpc.DeleteAllPaymentsRequest'; } +/** + * 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.DeletePaymentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.DeletePaymentResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.DeletePaymentResponse.displayName = 'proto.lnrpc.DeletePaymentResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2981,6 +3369,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.DebugLevelResponse.displayName = 'proto.lnrpc.DebugLevelResponse'; } +/** + * 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.CalcPaymentStatsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.CalcPaymentStatsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.CalcPaymentStatsRequest.displayName = 'proto.lnrpc.CalcPaymentStatsRequest'; +} +/** + * 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.CalcPaymentStatsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.CalcPaymentStatsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.CalcPaymentStatsResponse.displayName = 'proto.lnrpc.CalcPaymentStatsResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -3138,9 +3568,30 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PolicyUpdateResponse = function(opt_data) { +proto.lnrpc.FailedUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.FailedUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.FailedUpdate.displayName = 'proto.lnrpc.FailedUpdate'; +} +/** + * 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.PolicyUpdateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PolicyUpdateResponse.repeatedFields_, null); +}; goog.inherits(proto.lnrpc.PolicyUpdateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** @@ -3716,6 +4167,174 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.Op.displayName = 'proto.lnrpc.Op'; } +/** + * 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.CheckMacPermRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.CheckMacPermRequest.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.CheckMacPermRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.CheckMacPermRequest.displayName = 'proto.lnrpc.CheckMacPermRequest'; +} +/** + * 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.CheckMacPermResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.CheckMacPermResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.CheckMacPermResponse.displayName = 'proto.lnrpc.CheckMacPermResponse'; +} +/** + * 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.RPCMiddlewareRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_); +}; +goog.inherits(proto.lnrpc.RPCMiddlewareRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.RPCMiddlewareRequest.displayName = 'proto.lnrpc.RPCMiddlewareRequest'; +} +/** + * 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.StreamAuth = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.StreamAuth, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.StreamAuth.displayName = 'proto.lnrpc.StreamAuth'; +} +/** + * 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.RPCMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.RPCMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.RPCMessage.displayName = 'proto.lnrpc.RPCMessage'; +} +/** + * 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.RPCMiddlewareResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_); +}; +goog.inherits(proto.lnrpc.RPCMiddlewareResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.RPCMiddlewareResponse.displayName = 'proto.lnrpc.RPCMiddlewareResponse'; +} +/** + * 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.MiddlewareRegistration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.MiddlewareRegistration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.MiddlewareRegistration.displayName = 'proto.lnrpc.MiddlewareRegistration'; +} +/** + * 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.InterceptFeedback = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.InterceptFeedback, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.InterceptFeedback.displayName = 'proto.lnrpc.InterceptFeedback'; +} @@ -3732,8 +4351,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Utxo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Utxo.toObject(opt_includeInstance, this); +proto.lnrpc.SubscribeCustomMessagesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SubscribeCustomMessagesRequest.toObject(opt_includeInstance, this); }; @@ -3742,18 +4361,13 @@ proto.lnrpc.Utxo.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.SubscribeCustomMessagesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { +proto.lnrpc.SubscribeCustomMessagesRequest.toObject = function(includeInstance, msg) { var f, obj = { - addressType: jspb.Message.getFieldWithDefault(msg, 1, 0), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - amountAtoms: 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) { @@ -3767,54 +4381,29 @@ proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Utxo} + * @return {!proto.lnrpc.SubscribeCustomMessagesRequest} */ -proto.lnrpc.Utxo.deserializeBinary = function(bytes) { +proto.lnrpc.SubscribeCustomMessagesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Utxo; - return proto.lnrpc.Utxo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SubscribeCustomMessagesRequest; + return proto.lnrpc.SubscribeCustomMessagesRequest.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.SubscribeCustomMessagesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Utxo} + * @return {!proto.lnrpc.SubscribeCustomMessagesRequest} */ -proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SubscribeCustomMessagesRequest.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.setAddressType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountAtoms(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; @@ -3828,9 +4417,9 @@ proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Utxo.prototype.serializeBinary = function() { +proto.lnrpc.SubscribeCustomMessagesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Utxo.serializeBinaryToWriter(this, writer); + proto.lnrpc.SubscribeCustomMessagesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3838,192 +4427,253 @@ proto.lnrpc.Utxo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Utxo} message + * @param {!proto.lnrpc.SubscribeCustomMessagesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SubscribeCustomMessagesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmountAtoms(); - 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 - ); - } }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional AddressType address_type = 1; - * @return {!proto.lnrpc.AddressType} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Utxo.prototype.getAddressType = function() { - return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.CustomMessage.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CustomMessage.toObject(opt_includeInstance, this); }; /** - * @param {!proto.lnrpc.AddressType} value - * @return {!proto.lnrpc.Utxo} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.CustomMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Utxo.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.lnrpc.CustomMessage.toObject = function(includeInstance, msg) { + var f, obj = { + peer: msg.getPeer_asB64(), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string address = 2; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.CustomMessage} */ -proto.lnrpc.Utxo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.CustomMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.CustomMessage; + return proto.lnrpc.CustomMessage.deserializeBinaryFromReader(msg, reader); }; /** - * @param {string} value - * @return {!proto.lnrpc.Utxo} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.CustomMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.CustomMessage} */ -proto.lnrpc.Utxo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.CustomMessage.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.setPeer(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 amount_atoms = 3; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Utxo.prototype.getAmountAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.CustomMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.CustomMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.Utxo} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.CustomMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Utxo.prototype.setAmountAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.CustomMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPeer_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getType(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional string pk_script = 4; - * @return {string} + * optional bytes peer = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Utxo.prototype.getPkScript = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.CustomMessage.prototype.getPeer = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.lnrpc.Utxo} returns this + * optional bytes peer = 1; + * This is a type-conversion wrapper around `getPeer()` + * @return {string} */ -proto.lnrpc.Utxo.prototype.setPkScript = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.lnrpc.CustomMessage.prototype.getPeer_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeer())); }; /** - * optional OutPoint outpoint = 5; - * @return {?proto.lnrpc.OutPoint} + * optional bytes peer = 1; + * 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.Utxo.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 5)); +proto.lnrpc.CustomMessage.prototype.getPeer_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeer())); }; /** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.lnrpc.Utxo} returns this -*/ -proto.lnrpc.Utxo.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.CustomMessage} returns this + */ +proto.lnrpc.CustomMessage.prototype.setPeer = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Utxo} returns this + * optional uint32 type = 2; + * @return {number} */ -proto.lnrpc.Utxo.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); +proto.lnrpc.CustomMessage.prototype.getType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.lnrpc.CustomMessage} returns this */ -proto.lnrpc.Utxo.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 5) != null; +proto.lnrpc.CustomMessage.prototype.setType = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int64 confirmations = 6; - * @return {number} + * optional bytes data = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Utxo.prototype.getConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.CustomMessage.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.Utxo} returns this + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} */ -proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.CustomMessage.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); }; +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.lnrpc.CustomMessage.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.CustomMessage} returns this */ -proto.lnrpc.Transaction.repeatedFields_ = [8]; +proto.lnrpc.CustomMessage.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + @@ -4040,8 +4690,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendCustomMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCustomMessageRequest.toObject(opt_includeInstance, this); }; @@ -4050,22 +4700,15 @@ proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.SendCustomMessageRequest} 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.SendCustomMessageRequest.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: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, - rawTxHex: jspb.Message.getFieldWithDefault(msg, 9, ""), - label: jspb.Message.getFieldWithDefault(msg, 10, "") + peer: msg.getPeer_asB64(), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64() }; if (includeInstance) { @@ -4079,23 +4722,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.SendCustomMessageRequest} */ -proto.lnrpc.Transaction.deserializeBinary = function(bytes) { +proto.lnrpc.SendCustomMessageRequest.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.SendCustomMessageRequest; + return proto.lnrpc.SendCustomMessageRequest.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.SendCustomMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Transaction} + * @return {!proto.lnrpc.SendCustomMessageRequest} */ -proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendCustomMessageRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4103,44 +4746,16 @@ 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 {!Uint8Array} */ (reader.readBytes()); + msg.setPeer(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setType(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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); break; default: reader.skipField(); @@ -4155,9 +4770,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.SendCustomMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendCustomMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4165,79 +4780,30 @@ 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.SendCustomMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendCustomMessageRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxHash(); + f = message.getPeer_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getAmount(); + f = message.getType(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 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(); + f = message.getData_asU8(); if (f.length > 0) { - writer.writeString( - 10, + writer.writeBytes( + 3, f ); } @@ -4245,201 +4811,104 @@ 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 - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setTxHash = function(value) { - return 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 - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setAmount = function(value) { - return 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 - * @return {!proto.lnrpc.Transaction} returns this + * optional bytes peer = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.SendCustomMessageRequest.prototype.getPeer = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional string block_hash = 4; + * optional bytes peer = 1; + * This is a type-conversion wrapper around `getPeer()` * @return {string} */ -proto.lnrpc.Transaction.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setBlockHash = function(value) { - return 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 - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.SendCustomMessageRequest.prototype.getPeer_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeer())); }; /** - * optional int64 time_stamp = 6; - * @return {number} + * optional bytes peer = 1; + * 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.getTimeStamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.SendCustomMessageRequest.prototype.getPeer_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeer())); }; /** - * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SendCustomMessageRequest} returns this */ -proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.SendCustomMessageRequest.prototype.setPeer = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional int64 total_fees = 7; + * optional uint32 type = 2; * @return {number} */ -proto.lnrpc.Transaction.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.SendCustomMessageRequest.prototype.getType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * repeated string dest_addresses = 8; - * @return {!Array} - */ -proto.lnrpc.Transaction.prototype.getDestAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setDestAddressesList = function(value) { - return jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.Transaction} returns this + * @return {!proto.lnrpc.SendCustomMessageRequest} returns this */ -proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +proto.lnrpc.SendCustomMessageRequest.prototype.setType = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Transaction} returns this + * optional bytes data = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { - return this.setDestAddressesList([]); +proto.lnrpc.SendCustomMessageRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional string raw_tx_hex = 9; + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` * @return {string} */ -proto.lnrpc.Transaction.prototype.getRawTxHex = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this - */ -proto.lnrpc.Transaction.prototype.setRawTxHex = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); +proto.lnrpc.SendCustomMessageRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); }; /** - * optional string label = 10; - * @return {string} + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} */ -proto.lnrpc.Transaction.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +proto.lnrpc.SendCustomMessageRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); }; /** - * @param {string} value - * @return {!proto.lnrpc.Transaction} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SendCustomMessageRequest} returns this */ -proto.lnrpc.Transaction.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); +proto.lnrpc.SendCustomMessageRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -4459,8 +4928,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendCustomMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCustomMessageResponse.toObject(opt_includeInstance, this); }; @@ -4469,14 +4938,13 @@ proto.lnrpc.GetTransactionsRequest.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. 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.SendCustomMessageResponse} 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.SendCustomMessageResponse.toObject = function(includeInstance, msg) { var f, obj = { - startHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - endHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; if (includeInstance) { @@ -4490,37 +4958,29 @@ 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.SendCustomMessageResponse} */ -proto.lnrpc.GetTransactionsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendCustomMessageResponse.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.SendCustomMessageResponse; + return proto.lnrpc.SendCustomMessageResponse.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.SendCustomMessageResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetTransactionsRequest} + * @return {!proto.lnrpc.SendCustomMessageResponse} */ -proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendCustomMessageResponse.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.setStartHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setEndHeight(value); - break; default: reader.skipField(); break; @@ -4534,9 +4994,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.SendCustomMessageResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendCustomMessageResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4544,73 +5004,16 @@ 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.SendCustomMessageResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendCustomMessageResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartHeight(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getEndHeight(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional int32 start_height = 1; - * @return {number} - */ -proto.lnrpc.GetTransactionsRequest.prototype.getStartHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetTransactionsRequest} returns this - */ -proto.lnrpc.GetTransactionsRequest.prototype.setStartHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 end_height = 2; - * @return {number} - */ -proto.lnrpc.GetTransactionsRequest.prototype.getEndHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.GetTransactionsRequest} returns this - */ -proto.lnrpc.GetTransactionsRequest.prototype.setEndHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.TransactionDetails.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4626,8 +5029,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.Utxo.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Utxo.toObject(opt_includeInstance, this); }; @@ -4636,14 +5039,18 @@ proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.Utxo} 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.Utxo.toObject = function(includeInstance, msg) { var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.lnrpc.Transaction.toObject, includeInstance) + addressType: jspb.Message.getFieldWithDefault(msg, 1, 0), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + amountAtoms: 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) { @@ -4657,23 +5064,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.Utxo} */ -proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { +proto.lnrpc.Utxo.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.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.TransactionDetails} 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.TransactionDetails} + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4681,9 +5088,29 @@ 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 {!proto.lnrpc.AddressType} */ (reader.readEnum()); + msg.setAddressType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmountAtoms(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(); @@ -4698,9 +5125,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.Utxo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); + proto.lnrpc.Utxo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4708,91 +5135,195 @@ 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.Utxo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.TransactionDetails.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAddressType(); + if (f !== 0.0) { + writer.writeEnum( 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmountAtoms(); + 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.Transaction.serializeBinaryToWriter + proto.lnrpc.OutPoint.serializeBinaryToWriter + ); + } + f = message.getConfirmations(); + if (f !== 0) { + writer.writeInt64( + 6, + f ); } }; /** - * repeated Transaction transactions = 1; - * @return {!Array} + * optional AddressType address_type = 1; + * @return {!proto.lnrpc.AddressType} */ -proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); +proto.lnrpc.Utxo.prototype.getAddressType = function() { + return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.TransactionDetails} returns this -*/ -proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {!proto.lnrpc.AddressType} value + * @return {!proto.lnrpc.Utxo} returns this + */ +proto.lnrpc.Utxo.prototype.setAddressType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * @param {!proto.lnrpc.Transaction=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Transaction} + * optional string address = 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.Utxo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.TransactionDetails} returns this + * @param {string} value + * @return {!proto.lnrpc.Utxo} returns this */ -proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { - return this.setTransactionsList([]); +proto.lnrpc.Utxo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional int64 amount_atoms = 3; + * @return {number} + */ +proto.lnrpc.Utxo.prototype.getAmountAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + /** - * 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 + * @param {number} value + * @return {!proto.lnrpc.Utxo} returns this */ -proto.lnrpc.FeeLimit.oneofGroups_ = [[1,3,2]]; +proto.lnrpc.Utxo.prototype.setAmountAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + /** - * @enum {number} + * optional string pk_script = 4; + * @return {string} */ -proto.lnrpc.FeeLimit.LimitCase = { - LIMIT_NOT_SET: 0, - FIXED: 1, - FIXED_M_ATOMS: 3, - PERCENT: 2 +proto.lnrpc.Utxo.prototype.getPkScript = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; + /** - * @return {proto.lnrpc.FeeLimit.LimitCase} + * @param {string} value + * @return {!proto.lnrpc.Utxo} returns this */ -proto.lnrpc.FeeLimit.prototype.getLimitCase = function() { - return /** @type {proto.lnrpc.FeeLimit.LimitCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FeeLimit.oneofGroups_[0])); +proto.lnrpc.Utxo.prototype.setPkScript = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional OutPoint outpoint = 5; + * @return {?proto.lnrpc.OutPoint} + */ +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 + * @return {!proto.lnrpc.Utxo} returns this +*/ +proto.lnrpc.Utxo.prototype.setOutpoint = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Utxo} returns this + */ +proto.lnrpc.Utxo.prototype.clearOutpoint = function() { + return this.setOutpoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Utxo.prototype.hasOutpoint = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional int64 confirmations = 6; + * @return {number} + */ +proto.lnrpc.Utxo.prototype.getConfirmations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Utxo} returns this + */ +proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Transaction.repeatedFields_ = [8]; + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -4806,8 +5337,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.Transaction.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Transaction.toObject(opt_includeInstance, this); }; @@ -4816,15 +5347,22 @@ proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.Transaction} 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.Transaction.toObject = function(includeInstance, msg) { var f, obj = { - fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), - fixedMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), - percent: jspb.Message.getFieldWithDefault(msg, 2, 0) + 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: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + rawTxHex: jspb.Message.getFieldWithDefault(msg, 9, ""), + label: jspb.Message.getFieldWithDefault(msg, 10, "") }; if (includeInstance) { @@ -4838,23 +5376,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.Transaction} */ -proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { +proto.lnrpc.Transaction.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.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.FeeLimit} 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.FeeLimit} + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4862,16 +5400,44 @@ proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTxHash(value); + break; + case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setFixed(value); + 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.setFixedMAtoms(value); + msg.setTimeStamp(value); break; - case 2: + case 7: var value = /** @type {number} */ (reader.readInt64()); - msg.setPercent(value); + 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(); @@ -4886,9 +5452,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.Transaction.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); + proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4896,30 +5462,79 @@ 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.Transaction} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt64( + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { + f = message.getAmount(); + if (f !== 0) { writer.writeInt64( + 2, + f + ); + } + f = message.getNumConfirmations(); + if (f !== 0) { + writer.writeInt32( 3, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { + 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( - 2, + 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 ); } @@ -4927,120 +5542,204 @@ proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { /** - * optional int64 fixed = 1; + * optional string tx_hash = 1; + * @return {string} + */ +proto.lnrpc.Transaction.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Transaction} returns this + */ +proto.lnrpc.Transaction.prototype.setTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 amount = 2; * @return {number} */ -proto.lnrpc.FeeLimit.prototype.getFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.Transaction.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.FeeLimit} returns this + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); +proto.lnrpc.Transaction.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.FeeLimit} returns this + * optional int32 num_confirmations = 3; + * @return {number} */ -proto.lnrpc.FeeLimit.prototype.clearFixed = function() { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); +proto.lnrpc.Transaction.prototype.getNumConfirmations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.FeeLimit.prototype.hasFixed = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 fixed_m_atoms = 3; + * optional string block_hash = 4; + * @return {string} + */ +proto.lnrpc.Transaction.prototype.getBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Transaction} returns this + */ +proto.lnrpc.Transaction.prototype.setBlockHash = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 block_height = 5; * @return {number} */ -proto.lnrpc.FeeLimit.prototype.getFixedMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.Transaction.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.FeeLimit} returns this + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.FeeLimit.prototype.setFixedMAtoms = function(value) { - return jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], value); +proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.FeeLimit} returns this + * optional int64 time_stamp = 6; + * @return {number} */ -proto.lnrpc.FeeLimit.prototype.clearFixedMAtoms = function() { - return jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); +proto.lnrpc.Transaction.prototype.getTimeStamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.FeeLimit.prototype.hasFixedMAtoms = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional int64 percent = 2; + * optional int64 total_fees = 7; * @return {number} */ -proto.lnrpc.FeeLimit.prototype.getPercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.Transaction.prototype.getTotalFees = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.FeeLimit} returns this + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); +proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.FeeLimit} returns this + * repeated string dest_addresses = 8; + * @return {!Array} */ -proto.lnrpc.FeeLimit.prototype.clearPercent = function() { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); +proto.lnrpc.Transaction.prototype.getDestAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!Array} value + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.FeeLimit.prototype.hasPercent = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.Transaction.prototype.setDestAddressesList = function(value) { + return jspb.Message.setField(this, 8, value || []); }; +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.lnrpc.Transaction} returns this + */ +proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Transaction} returns this */ -proto.lnrpc.SendRequest.repeatedFields_ = [16]; +proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { + return this.setDestAddressesList([]); +}; + + +/** + * optional string raw_tx_hex = 9; + * @return {string} + */ +proto.lnrpc.Transaction.prototype.getRawTxHex = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Transaction} returns this + */ +proto.lnrpc.Transaction.prototype.setRawTxHex = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string label = 10; + * @return {string} + */ +proto.lnrpc.Transaction.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Transaction} returns this + */ +proto.lnrpc.Transaction.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + @@ -5057,8 +5756,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.GetTransactionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetTransactionsRequest.toObject(opt_includeInstance, this); }; @@ -5067,28 +5766,15 @@ proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.GetTransactionsRequest} 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.GetTransactionsRequest.toObject = function(includeInstance, msg) { var f, obj = { - dest: msg.getDest_asB64(), - destString: jspb.Message.getFieldWithDefault(msg, 2, ""), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - amtMAtoms: jspb.Message.getFieldWithDefault(msg, 13, 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, 10, "0"), - ignoreMaxOutboundAmt: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - lastHopPubkey: msg.getLastHopPubkey_asB64(), - cltvLimit: jspb.Message.getFieldWithDefault(msg, 11, 0), - destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - allowSelfPayment: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), - destFeaturesList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? undefined : f + startHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + account: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -5102,23 +5788,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.GetTransactionsRequest} */ -proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { +proto.lnrpc.GetTransactionsRequest.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.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.SendRequest} 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.SendRequest} + * @return {!proto.lnrpc.GetTransactionsRequest} */ -proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5126,76 +5812,19 @@ 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 {number} */ (reader.readInt32()); + msg.setStartHeight(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDestString(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setEndHeight(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMAtoms(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 10: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOutgoingChanId(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIgnoreMaxOutboundAmt(value); + msg.setAccount(value); break; - case 14: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastHopPubkey(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvLimit(value); - break; - case 12: - 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 values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addDestFeatures(values[i]); - } - break; - default: - reader.skipField(); + default: + reader.skipField(); break; } } @@ -5207,9 +5836,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.GetTransactionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5217,119 +5846,30 @@ 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.GetTransactionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDest_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDestString(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getAmtMAtoms(); - if (f !== 0) { - writer.writeInt64( - 13, - 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(); + f = message.getStartHeight(); 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( - 10, - f - ); - } - f = message.getIgnoreMaxOutboundAmt(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getLastHopPubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 14, + 1, f ); } - f = message.getCltvLimit(); + f = message.getEndHeight(); if (f !== 0) { - writer.writeUint32( - 11, - f - ); - } - f = message.getDestCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(12, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getAllowSelfPayment(); - if (f) { - writer.writeBool( - 15, + writer.writeInt32( + 2, f ); } - f = message.getDestFeaturesList(); + f = message.getAccount(); if (f.length > 0) { - writer.writePackedEnum( - 16, + writer.writeString( + 3, f ); } @@ -5337,407 +5877,497 @@ proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes dest = 1; - * @return {!(string|Uint8Array)} + * optional int32 start_height = 1; + * @return {number} */ -proto.lnrpc.SendRequest.prototype.getDest = 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 dest = 1; - * This is a type-conversion wrapper around `getDest()` - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.GetTransactionsRequest} returns this */ -proto.lnrpc.SendRequest.prototype.getDest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDest())); +proto.lnrpc.GetTransactionsRequest.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(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 int32 end_height = 2; + * @return {number} */ -proto.lnrpc.SendRequest.prototype.getDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDest())); +proto.lnrpc.GetTransactionsRequest.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.GetTransactionsRequest} returns this */ -proto.lnrpc.SendRequest.prototype.setDest = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.GetTransactionsRequest.prototype.setEndHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string dest_string = 2; + * optional string account = 3; * @return {string} */ -proto.lnrpc.SendRequest.prototype.getDestString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.GetTransactionsRequest.prototype.getAccount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this + * @return {!proto.lnrpc.GetTransactionsRequest} returns this */ -proto.lnrpc.SendRequest.prototype.setDestString = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.GetTransactionsRequest.prototype.setAccount = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + /** - * optional int64 amt = 3; - * @return {number} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.SendRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; +proto.lnrpc.TransactionDetails.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.SendRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.TransactionDetails.toObject(opt_includeInstance, this); }; /** - * optional int64 amt_m_atoms = 13; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.TransactionDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.prototype.getAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.TransactionDetails.toObject = function(includeInstance, msg) { + var f, obj = { + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.lnrpc.Transaction.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.TransactionDetails} */ -proto.lnrpc.SendRequest.prototype.setAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.TransactionDetails; + return proto.lnrpc.TransactionDetails.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes payment_hash = 4; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.TransactionDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.TransactionDetails} */ -proto.lnrpc.SendRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.Transaction; + reader.readMessage(value,proto.lnrpc.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes payment_hash = 4; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); +proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * 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} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.TransactionDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); +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 + ); + } }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this + * repeated Transaction transactions = 1; + * @return {!Array} */ -proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); }; /** - * optional string payment_hash_string = 5; - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); + * @param {!Array} value + * @return {!proto.lnrpc.TransactionDetails} returns this +*/ +proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this + * @param {!proto.lnrpc.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.SendRequest.prototype.setPaymentHashString = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.TransactionDetails.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Transaction, opt_index); }; /** - * optional string payment_request = 6; - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.TransactionDetails} returns this */ -proto.lnrpc.SendRequest.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { + return this.setTransactionsList([]); }; + /** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.lnrpc.SendRequest.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - +proto.lnrpc.FeeLimit.oneofGroups_ = [[1,3,2]]; /** - * optional int32 final_cltv_delta = 7; - * @return {number} + * @enum {number} */ -proto.lnrpc.SendRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.FeeLimit.LimitCase = { + LIMIT_NOT_SET: 0, + FIXED: 1, + FIXED_M_ATOMS: 3, + PERCENT: 2 }; - /** - * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this + * @return {proto.lnrpc.FeeLimit.LimitCase} */ -proto.lnrpc.SendRequest.prototype.setFinalCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.FeeLimit.prototype.getLimitCase = function() { + return /** @type {proto.lnrpc.FeeLimit.LimitCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FeeLimit.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional FeeLimit fee_limit = 8; - * @return {?proto.lnrpc.FeeLimit} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.SendRequest.prototype.getFeeLimit = function() { - return /** @type{?proto.lnrpc.FeeLimit} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 8)); +proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeLimit.toObject(opt_includeInstance, this); }; /** - * @param {?proto.lnrpc.FeeLimit|undefined} value - * @return {!proto.lnrpc.SendRequest} returns this -*/ -proto.lnrpc.SendRequest.prototype.setFeeLimit = function(value) { - return jspb.Message.setWrapperField(this, 8, value); + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.FeeLimit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { + var f, obj = { + fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), + fixedMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), + percent: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.SendRequest} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.FeeLimit} */ -proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { - return this.setFeeLimit(undefined); +proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.FeeLimit; + return proto.lnrpc.FeeLimit.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.FeeLimit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.FeeLimit} */ -proto.lnrpc.SendRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 8) != null; +proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFixed(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFixedMAtoms(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPercent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 outgoing_chan_id = 10; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.SendRequest.prototype.getOutgoingChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); +proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {string} value - * @return {!proto.lnrpc.SendRequest} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.FeeLimit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.prototype.setOutgoingChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 10, value); +proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt64( + 2, + f + ); + } }; /** - * optional bool ignore_max_outbound_amt = 9; - * @return {boolean} + * optional int64 fixed = 1; + * @return {number} */ -proto.lnrpc.SendRequest.prototype.getIgnoreMaxOutboundAmt = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.lnrpc.FeeLimit.prototype.getFixed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.setIgnoreMaxOutboundAmt = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional bytes last_hop_pubkey = 14; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendRequest.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} + * @param {number} value + * @return {!proto.lnrpc.FeeLimit} returns this */ -proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHopPubkey())); +proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { + return jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; /** - * 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} + * Clears the field making it undefined. + * @return {!proto.lnrpc.FeeLimit} returns this */ -proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHopPubkey())); +proto.lnrpc.FeeLimit.prototype.clearFixed = function() { + return jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.SendRequest.prototype.setLastHopPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 14, value); +proto.lnrpc.FeeLimit.prototype.hasFixed = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint32 cltv_limit = 11; + * optional int64 fixed_m_atoms = 3; * @return {number} */ -proto.lnrpc.SendRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.FeeLimit.prototype.getFixedMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.SendRequest} returns this + * @return {!proto.lnrpc.FeeLimit} returns this */ -proto.lnrpc.SendRequest.prototype.setCltvLimit = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.FeeLimit.prototype.setFixedMAtoms = function(value) { + return jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; /** - * map dest_custom_records = 12; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Clears the field making it undefined. + * @return {!proto.lnrpc.FeeLimit} returns this */ -proto.lnrpc.SendRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 12, opt_noLazyCreate, - null)); +proto.lnrpc.FeeLimit.prototype.clearFixedMAtoms = function() { + return jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.SendRequest} returns this - */ -proto.lnrpc.SendRequest.prototype.clearDestCustomRecordsMap = function() { - this.getDestCustomRecordsMap().clear(); - return this;}; - - -/** - * optional bool allow_self_payment = 15; + * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.SendRequest.prototype.getAllowSelfPayment = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +proto.lnrpc.FeeLimit.prototype.hasFixedMAtoms = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {boolean} value - * @return {!proto.lnrpc.SendRequest} returns this + * optional int64 percent = 2; + * @return {number} */ -proto.lnrpc.SendRequest.prototype.setAllowSelfPayment = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); +proto.lnrpc.FeeLimit.prototype.getPercent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * repeated FeatureBit dest_features = 16; - * @return {!Array} + * @param {number} value + * @return {!proto.lnrpc.FeeLimit} returns this */ -proto.lnrpc.SendRequest.prototype.getDestFeaturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 16)); +proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { + return jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.SendRequest} returns this + * Clears the field making it undefined. + * @return {!proto.lnrpc.FeeLimit} returns this */ -proto.lnrpc.SendRequest.prototype.setDestFeaturesList = function(value) { - return jspb.Message.setField(this, 16, value || []); +proto.lnrpc.FeeLimit.prototype.clearPercent = function() { + return jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; /** - * @param {!proto.lnrpc.FeatureBit} value - * @param {number=} opt_index - * @return {!proto.lnrpc.SendRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.SendRequest.prototype.addDestFeatures = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 16, value, opt_index); +proto.lnrpc.FeeLimit.prototype.hasPercent = function() { + return jspb.Message.getField(this, 2) != null; }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.SendRequest} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.SendRequest.prototype.clearDestFeaturesList = function() { - return this.setDestFeaturesList([]); -}; - - +proto.lnrpc.SendRequest.repeatedFields_ = [16]; @@ -5754,8 +6384,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendResponse.toObject(opt_includeInstance, this); +proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendRequest.toObject(opt_includeInstance, this); }; @@ -5764,16 +6394,29 @@ proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.SendRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { var f, obj = { - paymentError: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentPreimage: msg.getPaymentPreimage_asB64(), - paymentRoute: (f = msg.getPaymentRoute()) && proto.lnrpc.Route.toObject(includeInstance, f), - paymentHash: msg.getPaymentHash_asB64() + dest: msg.getDest_asB64(), + destString: jspb.Message.getFieldWithDefault(msg, 2, ""), + amt: jspb.Message.getFieldWithDefault(msg, 3, 0), + amtMAtoms: jspb.Message.getFieldWithDefault(msg, 13, 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, 10, "0"), + ignoreMaxOutboundAmt: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + lastHopPubkey: msg.getLastHopPubkey_asB64(), + cltvLimit: jspb.Message.getFieldWithDefault(msg, 11, 0), + destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], + allowSelfPayment: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), + destFeaturesList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? undefined : f, + paymentAddr: msg.getPaymentAddr_asB64() }; if (includeInstance) { @@ -5787,23 +6430,23 @@ proto.lnrpc.SendResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendResponse} + * @return {!proto.lnrpc.SendRequest} */ -proto.lnrpc.SendResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendResponse; - return proto.lnrpc.SendResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendRequest; + return proto.lnrpc.SendRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendResponse} + * @return {!proto.lnrpc.SendRequest} */ -proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5811,22 +6454,78 @@ proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentError(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDest(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentPreimage(value); + var value = /** @type {string} */ (reader.readString()); + msg.setDestString(value); break; case 3: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setPaymentRoute(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmt(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtMAtoms(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 10: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOutgoingChanId(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreMaxOutboundAmt(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastHopPubkey(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvLimit(value); + break; + case 12: + 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 values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addDestFeatures(values[i]); + } + break; + case 17: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); + break; default: reader.skipField(); break; @@ -5840,9 +6539,9 @@ proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendResponse.prototype.serializeBinary = function() { +proto.lnrpc.SendRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5850,32 +6549,38 @@ proto.lnrpc.SendResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendResponse} message + * @param {!proto.lnrpc.SendRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentError(); + f = message.getDest_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getPaymentPreimage_asU8(); + f = message.getDestString(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } - f = message.getPaymentRoute(); - if (f != null) { - writer.writeMessage( + f = message.getAmt(); + if (f !== 0) { + writer.writeInt64( 3, - f, - proto.lnrpc.Route.serializeBinaryToWriter + f + ); + } + f = message.getAmtMAtoms(); + if (f !== 0) { + writer.writeInt64( + 13, + f ); } f = message.getPaymentHash_asU8(); @@ -5885,103 +6590,184 @@ proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { 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( + 10, + f + ); + } + f = message.getIgnoreMaxOutboundAmt(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getLastHopPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 14, + f + ); + } + f = message.getCltvLimit(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + f = message.getDestCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(12, 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.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 17, + f + ); + } }; /** - * optional string payment_error = 1; - * @return {string} + * optional bytes dest = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendResponse.prototype.getPaymentError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.SendRequest.prototype.getDest = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.lnrpc.SendResponse} returns this + * optional bytes dest = 1; + * This is a type-conversion wrapper around `getDest()` + * @return {string} */ -proto.lnrpc.SendResponse.prototype.setPaymentError = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.SendRequest.prototype.getDest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDest())); }; /** - * optional bytes payment_preimage = 2; - * @return {!(string|Uint8Array)} + * 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.SendResponse.prototype.getPaymentPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.SendRequest.prototype.getDest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDest())); }; /** - * optional bytes payment_preimage = 2; - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {string} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentPreimage())); +proto.lnrpc.SendRequest.prototype.setDest = function(value) { + return jspb.Message.setProto3BytesField(this, 1, 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 string dest_string = 2; + * @return {string} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentPreimage())); +proto.lnrpc.SendRequest.prototype.getDestString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendResponse} returns this + * @param {string} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.SendRequest.prototype.setDestString = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional Route payment_route = 3; - * @return {?proto.lnrpc.Route} + * optional int64 amt = 3; + * @return {number} */ -proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); +proto.lnrpc.SendRequest.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.lnrpc.SendResponse} returns this -*/ -proto.lnrpc.SendResponse.prototype.setPaymentRoute = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {number} value + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.setAmt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.SendResponse} returns this + * optional int64 amt_m_atoms = 13; + * @return {number} */ -proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { - return this.setPaymentRoute(undefined); +proto.lnrpc.SendRequest.prototype.getAmtMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.SendRequest.prototype.setAmtMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); }; @@ -5989,7 +6775,7 @@ proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { * optional bytes payment_hash = 4; * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { +proto.lnrpc.SendRequest.prototype.getPaymentHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; @@ -5999,7 +6785,7 @@ proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { * This is a type-conversion wrapper around `getPaymentHash()` * @return {string} */ -proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { +proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPaymentHash())); }; @@ -6012,7 +6798,7 @@ proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { * This is a type-conversion wrapper around `getPaymentHash()` * @return {!Uint8Array} */ -proto.lnrpc.SendResponse.prototype.getPaymentHash_asU8 = function() { +proto.lnrpc.SendRequest.prototype.getPaymentHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPaymentHash())); }; @@ -6020,245 +6806,316 @@ proto.lnrpc.SendResponse.prototype.getPaymentHash_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendResponse} returns this + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendResponse.prototype.setPaymentHash = function(value) { +proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { return 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, "")); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {string} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendToRouteRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendRequest.prototype.setPaymentHashString = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * optional string payment_request = 6; + * @return {string} */ -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; +proto.lnrpc.SendRequest.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; -} /** - * 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); + * @param {string} value + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.setPaymentRequest = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * 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} + * optional int32 final_cltv_delta = 7; + * @return {number} */ -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; +proto.lnrpc.SendRequest.prototype.getFinalCltvDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendToRouteRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.SendRequest.prototype.setFinalCltvDelta = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * 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 + * optional FeeLimit fee_limit = 8; + * @return {?proto.lnrpc.FeeLimit} */ -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 - ); - } +proto.lnrpc.SendRequest.prototype.getFeeLimit = function() { + return /** @type{?proto.lnrpc.FeeLimit} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 8)); }; /** - * optional bytes payment_hash = 1; + * @param {?proto.lnrpc.FeeLimit|undefined} value + * @return {!proto.lnrpc.SendRequest} returns this +*/ +proto.lnrpc.SendRequest.prototype.setFeeLimit = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { + return 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 = 10; + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getOutgoingChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.setOutgoingChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 10, value); +}; + + +/** + * optional bool ignore_max_outbound_amt = 9; + * @return {boolean} + */ +proto.lnrpc.SendRequest.prototype.getIgnoreMaxOutboundAmt = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.setIgnoreMaxOutboundAmt = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional bytes last_hop_pubkey = 14; * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.SendRequest.prototype.getLastHopPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); }; /** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` + * optional bytes last_hop_pubkey = 14; + * This is a type-conversion wrapper around `getLastHopPubkey()` * @return {string} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() { +proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); + this.getLastHopPubkey())); }; /** - * optional bytes payment_hash = 1; + * 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 `getPaymentHash()` + * This is a type-conversion wrapper around `getLastHopPubkey()` * @return {!Uint8Array} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { +proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); + this.getLastHopPubkey())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SendToRouteRequest} returns this + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.SendRequest.prototype.setLastHopPubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 14, value); }; /** - * optional string payment_hash_string = 2; - * @return {string} + * optional uint32 cltv_limit = 11; + * @return {number} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.SendRequest.prototype.getCltvLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.SendToRouteRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.SendRequest.prototype.setCltvLimit = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * optional Route route = 4; - * @return {?proto.lnrpc.Route} + * map dest_custom_records = 12; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.SendToRouteRequest.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 4)); +proto.lnrpc.SendRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 12, opt_noLazyCreate, + null)); }; /** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.lnrpc.SendToRouteRequest} returns this -*/ -proto.lnrpc.SendToRouteRequest.prototype.setRoute = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.clearDestCustomRecordsMap = function() { + this.getDestCustomRecordsMap().clear(); + return this;}; + + +/** + * optional bool allow_self_payment = 15; + * @return {boolean} + */ +proto.lnrpc.SendRequest.prototype.getAllowSelfPayment = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.SendToRouteRequest} returns this + * @param {boolean} value + * @return {!proto.lnrpc.SendRequest} returns this */ -proto.lnrpc.SendToRouteRequest.prototype.clearRoute = function() { - return this.setRoute(undefined); +proto.lnrpc.SendRequest.prototype.setAllowSelfPayment = function(value) { + return jspb.Message.setProto3BooleanField(this, 15, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated FeatureBit dest_features = 16; + * @return {!Array} */ -proto.lnrpc.SendToRouteRequest.prototype.hasRoute = function() { - return jspb.Message.getField(this, 4) != null; +proto.lnrpc.SendRequest.prototype.getDestFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 16)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.setDestFeaturesList = function(value) { + return jspb.Message.setField(this, 16, value || []); +}; + + +/** + * @param {!proto.lnrpc.FeatureBit} value + * @param {number=} opt_index + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.addDestFeatures = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 16, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.clearDestFeaturesList = function() { + return this.setDestFeaturesList([]); +}; + + +/** + * optional bytes payment_addr = 17; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendRequest.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * optional bytes payment_addr = 17; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); +}; + + +/** + * optional bytes payment_addr = 17; + * 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.SendRequest.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SendRequest} returns this + */ +proto.lnrpc.SendRequest.prototype.setPaymentAddr = function(value) { + return jspb.Message.setProto3BytesField(this, 17, value); }; @@ -6278,8 +7135,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendResponse.toObject(opt_includeInstance, this); }; @@ -6288,25 +7145,16 @@ proto.lnrpc.ChannelAcceptRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. 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.SendResponse} 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.SendResponse.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), - feePerKb: 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) + 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) { @@ -6320,23 +7168,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.SendResponse} */ -proto.lnrpc.ChannelAcceptRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendResponse.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.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.ChannelAcceptRequest} 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.ChannelAcceptRequest} + * @return {!proto.lnrpc.SendResponse} */ -proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6344,56 +7192,21 @@ proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentError(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChainHash(value); + msg.setPaymentPreimage(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.setPaymentRoute(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.setFeePerKb(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 {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); break; default: reader.skipField(); @@ -6408,9 +7221,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.SendResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6418,409 +7231,180 @@ 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.SendResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodePubkey_asU8(); + f = message.getPaymentError(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getChainHash_asU8(); + f = message.getPaymentPreimage_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getPaymentRoute(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.lnrpc.Route.serializeBinaryToWriter ); } - f = message.getFundingAmt(); - if (f !== 0) { - writer.writeUint64( + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 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.getFeePerKb(); - 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 string payment_error = 1; + * @return {string} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.SendResponse.prototype.getPaymentError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes node_pubkey = 1; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} + * @param {string} value + * @return {!proto.lnrpc.SendResponse} returns this */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); +proto.lnrpc.SendResponse.prototype.setPaymentError = function(value) { + return jspb.Message.setProto3StringField(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} + * optional bytes payment_preimage = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes chain_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash = function() { +proto.lnrpc.SendResponse.prototype.getPaymentPreimage = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes chain_hash = 2; - * This is a type-conversion wrapper around `getChainHash()` + * optional bytes payment_preimage = 2; + * This is a type-conversion wrapper around `getPaymentPreimage()` * @return {string} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asB64 = function() { +proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChainHash())); + this.getPaymentPreimage())); }; /** - * optional bytes chain_hash = 2; + * 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 `getChainHash()` + * This is a type-conversion wrapper around `getPaymentPreimage()` * @return {!Uint8Array} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asU8 = function() { +proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChainHash())); + this.getPaymentPreimage())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + * @return {!proto.lnrpc.SendResponse} returns this */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChainHash = function(value) { +proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setPendingChanId = function(value) { - return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setFundingAmt = function(value) { - return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setPushAmt = function(value) { - return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setDustLimit = function(value) { - return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMaxValueInFlight = function(value) { - return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChannelReserve = function(value) { - return 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 - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMinHtlc = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional uint64 fee_per_kb = 10; - * @return {number} + * optional Route payment_route = 3; + * @return {?proto.lnrpc.Route} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getFeePerKb = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this - */ -proto.lnrpc.ChannelAcceptRequest.prototype.setFeePerKb = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); + * @param {?proto.lnrpc.Route|undefined} value + * @return {!proto.lnrpc.SendResponse} returns this +*/ +proto.lnrpc.SendResponse.prototype.setPaymentRoute = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional uint32 csv_delay = 11; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.SendResponse} returns this */ -proto.lnrpc.ChannelAcceptRequest.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { + return this.setPaymentRoute(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelAcceptRequest.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional uint32 max_accepted_htlcs = 12; - * @return {number} + * optional bytes payment_hash = 4; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getMaxAcceptedHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + * optional bytes payment_hash = 4; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMaxAcceptedHtlcs = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); +proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); }; /** - * optional uint32 channel_flags = 13; - * @return {number} + * 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.ChannelAcceptRequest.prototype.getChannelFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.SendResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SendResponse} returns this */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChannelFlags = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.SendResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -6840,8 +7424,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendToRouteRequest.toObject(opt_includeInstance, this); }; @@ -6850,14 +7434,15 @@ proto.lnrpc.ChannelAcceptResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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.SendToRouteRequest} 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.SendToRouteRequest.toObject = function(includeInstance, msg) { var f, obj = { - accept: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - pendingChanId: msg.getPendingChanId_asB64() + paymentHash: msg.getPaymentHash_asB64(), + paymentHashString: jspb.Message.getFieldWithDefault(msg, 2, ""), + route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f) }; if (includeInstance) { @@ -6871,23 +7456,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.SendToRouteRequest} */ -proto.lnrpc.ChannelAcceptResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendToRouteRequest.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.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.ChannelAcceptResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendToRouteRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelAcceptResponse} + * @return {!proto.lnrpc.SendToRouteRequest} */ -proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6895,12 +7480,17 @@ 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 {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); + 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(); @@ -6915,9 +7505,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.SendToRouteRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6925,118 +7515,137 @@ 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.SendToRouteRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccept(); - if (f) { - writer.writeBool( + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getPendingChanId_asU8(); + f = message.getPaymentHashString(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.lnrpc.Route.serializeBinaryToWriter + ); + } }; /** - * optional bool accept = 1; - * @return {boolean} + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelAcceptResponse.prototype.getAccept = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} */ -proto.lnrpc.ChannelAcceptResponse.prototype.setAccept = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); }; /** - * optional bytes pending_chan_id = 2; - * @return {!(string|Uint8Array)} + * 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.ChannelAcceptResponse.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); }; /** - * optional bytes pending_chan_id = 2; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SendToRouteRequest} returns this */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); +proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(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 string payment_hash_string = 2; + * @return {string} */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelAcceptResponse} returns this + * @param {string} value + * @return {!proto.lnrpc.SendToRouteRequest} returns this */ -proto.lnrpc.ChannelAcceptResponse.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { + return 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 Route route = 4; + * @return {?proto.lnrpc.Route} */ -proto.lnrpc.ChannelPoint.oneofGroups_ = [[1,2]]; +proto.lnrpc.SendToRouteRequest.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 4)); +}; + /** - * @enum {number} + * @param {?proto.lnrpc.Route|undefined} value + * @return {!proto.lnrpc.SendToRouteRequest} returns this +*/ +proto.lnrpc.SendToRouteRequest.prototype.setRoute = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.SendToRouteRequest} returns this */ -proto.lnrpc.ChannelPoint.FundingTxidCase = { - FUNDING_TXID_NOT_SET: 0, - FUNDING_TXID_BYTES: 1, - FUNDING_TXID_STR: 2 +proto.lnrpc.SendToRouteRequest.prototype.clearRoute = function() { + return this.setRoute(undefined); }; + /** - * @return {proto.lnrpc.ChannelPoint.FundingTxidCase} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidCase = function() { - return /** @type {proto.lnrpc.ChannelPoint.FundingTxidCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelPoint.oneofGroups_[0])); +proto.lnrpc.SendToRouteRequest.prototype.hasRoute = function() { + return jspb.Message.getField(this, 4) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -7050,8 +7659,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelAcceptRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelAcceptRequest.toObject(opt_includeInstance, this); }; @@ -7060,15 +7669,26 @@ proto.lnrpc.ChannelPoint.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelAcceptRequest} 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.ChannelAcceptRequest.toObject = function(includeInstance, msg) { var f, obj = { - fundingTxidBytes: msg.getFundingTxidBytes_asB64(), - fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) + 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), + feePerKb: 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), + commitmentType: jspb.Message.getFieldWithDefault(msg, 14, 0) }; if (includeInstance) { @@ -7082,23 +7702,23 @@ proto.lnrpc.ChannelPoint.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.ChannelAcceptRequest} */ -proto.lnrpc.ChannelPoint.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelAcceptRequest.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.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.ChannelPoint} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelAcceptRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.ChannelAcceptRequest} */ -proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7107,63 +7727,184 @@ proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundingTxidBytes(value); + msg.setNodePubkey(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFundingTxidStr(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChainHash(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; - default: - reader.skipField(); + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFundingAmt(value); 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( + 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.setFeePerKb(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; + case 14: + var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); + msg.setCommitmentType(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 = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( + f = message.getChainHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); } - f = message.getOutputIndex(); + 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.getFeePerKb(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getCsvDelay(); if (f !== 0) { writer.writeUint32( - 3, + 11, + f + ); + } + f = message.getMaxAcceptedHtlcs(); + if (f !== 0) { + writer.writeUint32( + 12, + f + ); + } + f = message.getChannelFlags(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } + f = message.getCommitmentType(); + if (f !== 0.0) { + writer.writeEnum( + 14, f ); } @@ -7171,330 +7912,326 @@ proto.lnrpc.ChannelPoint.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes funding_txid_bytes = 1; + * optional bytes node_pubkey = 1; * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { +proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes funding_txid_bytes = 1; - * This is a type-conversion wrapper around `getFundingTxidBytes()` + * optional bytes node_pubkey = 1; + * This is a type-conversion wrapper around `getNodePubkey()` * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asB64 = function() { +proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundingTxidBytes())); + this.getNodePubkey())); }; /** - * optional bytes funding_txid_bytes = 1; + * 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 `getFundingTxidBytes()` + * This is a type-conversion wrapper around `getNodePubkey()` * @return {!Uint8Array} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { +proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundingTxidBytes())); + this.getNodePubkey())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelPoint} returns this + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidBytes = function(value) { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +proto.lnrpc.ChannelAcceptRequest.prototype.setNodePubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.ChannelPoint} returns this + * optional bytes chain_hash = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidBytes = function() { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes chain_hash = 2; + * This is a type-conversion wrapper around `getChainHash()` + * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChainHash())); }; /** - * optional string funding_txid_str = 2; - * @return {string} + * 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.ChannelPoint.prototype.getFundingTxidStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChainHash())); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelPoint} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidStr = function(value) { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +proto.lnrpc.ChannelAcceptRequest.prototype.setChainHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.ChannelPoint} returns this + * optional bytes pending_chan_id = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidStr = function() { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes pending_chan_id = 3; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidStr = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * optional uint32 output_index = 3; + * 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 + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + */ +proto.lnrpc.ChannelAcceptRequest.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 funding_amt = 4; * @return {number} */ -proto.lnrpc.ChannelPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelAcceptRequest.prototype.getFundingAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelPoint} returns this + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ChannelAcceptRequest.prototype.setFundingAmt = function(value) { + return 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 + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + */ +proto.lnrpc.ChannelAcceptRequest.prototype.setPushAmt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint64 dust_limit = 6; + * @return {number} */ -proto.lnrpc.OutPoint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OutPoint.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelAcceptRequest.prototype.getDustLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -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) - }; +proto.lnrpc.ChannelAcceptRequest.prototype.setDustLimit = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * optional uint64 max_value_in_flight = 7; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getMaxValueInFlight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OutPoint} + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -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); +proto.lnrpc.ChannelAcceptRequest.prototype.setMaxValueInFlight = function(value) { + return 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.OutPoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OutPoint} + * optional uint64 channel_reserve = 8; + * @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.ChannelAcceptRequest.prototype.getChannelReserve = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.OutPoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.OutPoint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelAcceptRequest.prototype.setChannelReserve = function(value) { + return 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.OutPoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 min_htlc = 9; + * @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.ChannelAcceptRequest.prototype.getMinHtlc = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * optional bytes txid_bytes = 1; - * @return {!(string|Uint8Array)} + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.OutPoint.prototype.getTxidBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelAcceptRequest.prototype.setMinHtlc = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional bytes txid_bytes = 1; - * This is a type-conversion wrapper around `getTxidBytes()` - * @return {string} + * optional uint64 fee_per_kb = 10; + * @return {number} */ -proto.lnrpc.OutPoint.prototype.getTxidBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxidBytes())); +proto.lnrpc.ChannelAcceptRequest.prototype.getFeePerKb = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * 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} + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.OutPoint.prototype.getTxidBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxidBytes())); +proto.lnrpc.ChannelAcceptRequest.prototype.setFeePerKb = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.OutPoint} returns this + * optional uint32 csv_delay = 11; + * @return {number} */ -proto.lnrpc.OutPoint.prototype.setTxidBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.ChannelAcceptRequest.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** - * optional string txid_str = 2; - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.OutPoint.prototype.getTxidStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ChannelAcceptRequest.prototype.setCsvDelay = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * @param {string} value - * @return {!proto.lnrpc.OutPoint} returns this + * optional uint32 max_accepted_htlcs = 12; + * @return {number} */ -proto.lnrpc.OutPoint.prototype.setTxidStr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ChannelAcceptRequest.prototype.getMaxAcceptedHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; /** - * optional uint32 output_index = 3; + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + */ +proto.lnrpc.ChannelAcceptRequest.prototype.setMaxAcceptedHtlcs = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint32 channel_flags = 13; * @return {number} */ -proto.lnrpc.OutPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelAcceptRequest.prototype.getChannelFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.OutPoint} returns this + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this */ -proto.lnrpc.OutPoint.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ChannelAcceptRequest.prototype.setChannelFlags = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional CommitmentType commitment_type = 14; + * @return {!proto.lnrpc.CommitmentType} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {!proto.lnrpc.CommitmentType} value + * @return {!proto.lnrpc.ChannelAcceptRequest} returns this + */ +proto.lnrpc.ChannelAcceptRequest.prototype.setCommitmentType = function(value) { + return jspb.Message.setProto3EnumField(this, 14, value); }; @@ -7514,8 +8251,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.LightningAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.LightningAddress.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelAcceptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelAcceptResponse.toObject(opt_includeInstance, this); }; @@ -7524,14 +8261,22 @@ proto.lnrpc.LightningAddress.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.LightningAddress} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelAcceptResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelAcceptResponse.toObject = function(includeInstance, msg) { var f, obj = { - pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), - host: jspb.Message.getFieldWithDefault(msg, 2, "") + accept: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + pendingChanId: msg.getPendingChanId_asB64(), + error: jspb.Message.getFieldWithDefault(msg, 3, ""), + upfrontShutdown: jspb.Message.getFieldWithDefault(msg, 4, ""), + csvDelay: jspb.Message.getFieldWithDefault(msg, 5, 0), + reserveAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), + inFlightMaxMatoms: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxHtlcCount: jspb.Message.getFieldWithDefault(msg, 8, 0), + minHtlcIn: jspb.Message.getFieldWithDefault(msg, 9, 0), + minAcceptDepth: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -7545,23 +8290,23 @@ proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.LightningAddress} + * @return {!proto.lnrpc.ChannelAcceptResponse} */ -proto.lnrpc.LightningAddress.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelAcceptResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.LightningAddress; - return proto.lnrpc.LightningAddress.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.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.LightningAddress} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelAcceptResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.LightningAddress} + * @return {!proto.lnrpc.ChannelAcceptResponse} */ -proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7569,12 +8314,44 @@ proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAccept(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); - msg.setHost(value); + msg.setError(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUpfrontShutdown(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCsvDelay(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setReserveAtoms(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInFlightMaxMatoms(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxHtlcCount(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinHtlcIn(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinAcceptDepth(value); break; default: reader.skipField(); @@ -7589,9 +8366,9 @@ proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { +proto.lnrpc.ChannelAcceptResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningAddress.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7599,23 +8376,79 @@ proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.LightningAddress} message + * @param {!proto.lnrpc.ChannelAcceptResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubkey(); + f = message.getAccept(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getError(); if (f.length > 0) { writer.writeString( - 1, + 3, f ); } - f = message.getHost(); + f = message.getUpfrontShutdown(); if (f.length > 0) { writer.writeString( - 2, + 4, + f + ); + } + f = message.getCsvDelay(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getReserveAtoms(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getInFlightMaxMatoms(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getMaxHtlcCount(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getMinHtlcIn(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getMinAcceptDepth(); + if (f !== 0) { + writer.writeUint32( + 10, f ); } @@ -7623,364 +8456,235 @@ proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) /** - * optional string pubkey = 1; - * @return {string} + * optional bool accept = 1; + * @return {boolean} */ -proto.lnrpc.LightningAddress.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelAcceptResponse.prototype.getAccept = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {string} value - * @return {!proto.lnrpc.LightningAddress} returns this + * @param {boolean} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.ChannelAcceptResponse.prototype.setAccept = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional string host = 2; - * @return {string} + * optional bytes pending_chan_id = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.LightningAddress.prototype.getHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {string} value - * @return {!proto.lnrpc.LightningAddress} returns this + * optional bytes pending_chan_id = 2; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} */ -proto.lnrpc.LightningAddress.prototype.setHost = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * 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.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EstimateFeeRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -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; +proto.lnrpc.ChannelAcceptResponse.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EstimateFeeRequest} + * optional string error = 3; + * @return {string} */ -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); +proto.lnrpc.ChannelAcceptResponse.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * 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} + * @param {string} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -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, "", 0); - }); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.ChannelAcceptResponse.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string upfront_shutdown = 4; + * @return {string} */ -proto.lnrpc.EstimateFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelAcceptResponse.prototype.getUpfrontShutdown = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * 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 + * @param {string} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -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 - ); - } +proto.lnrpc.ChannelAcceptResponse.prototype.setUpfrontShutdown = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; /** - * map AddrToAmount = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional uint32 csv_delay = 5; + * @return {number} */ -proto.lnrpc.EstimateFeeRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); +proto.lnrpc.ChannelAcceptResponse.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.EstimateFeeRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -proto.lnrpc.EstimateFeeRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); - return this;}; +proto.lnrpc.ChannelAcceptResponse.prototype.setCsvDelay = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; /** - * optional int32 target_conf = 2; + * optional uint64 reserve_atoms = 6; * @return {number} */ -proto.lnrpc.EstimateFeeRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelAcceptResponse.prototype.getReserveAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.EstimateFeeRequest} returns this + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ChannelAcceptResponse.prototype.setReserveAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint64 in_flight_max_matoms = 7; + * @return {number} */ -proto.lnrpc.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EstimateFeeResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelAcceptResponse.prototype.getInFlightMaxMatoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - feeAtoms: jspb.Message.getFieldWithDefault(msg, 1, 0), - feerateAtomsPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.ChannelAcceptResponse.prototype.setInFlightMaxMatoms = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EstimateFeeResponse} + * optional uint32 max_htlc_count = 8; + * @return {number} */ -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); +proto.lnrpc.ChannelAcceptResponse.prototype.getMaxHtlcCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * 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} + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -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.setFeeAtoms(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeerateAtomsPerByte(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.ChannelAcceptResponse.prototype.setMaxHtlcCount = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 min_htlc_in = 9; + * @return {number} */ -proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelAcceptResponse.prototype.getMinHtlcIn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * 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 + * @param {number} value + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFeeAtoms(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFeerateAtomsPerByte(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } +proto.lnrpc.ChannelAcceptResponse.prototype.setMinHtlcIn = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional int64 fee_atoms = 1; + * optional uint32 min_accept_depth = 10; * @return {number} */ -proto.lnrpc.EstimateFeeResponse.prototype.getFeeAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ChannelAcceptResponse.prototype.getMinAcceptDepth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.EstimateFeeResponse} returns this + * @return {!proto.lnrpc.ChannelAcceptResponse} returns this */ -proto.lnrpc.EstimateFeeResponse.prototype.setFeeAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.ChannelAcceptResponse.prototype.setMinAcceptDepth = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); }; + /** - * optional int64 feerate_atoms_per_byte = 2; - * @return {number} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.lnrpc.EstimateFeeResponse.prototype.getFeerateAtomsPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - +proto.lnrpc.ChannelPoint.oneofGroups_ = [[1,2]]; /** - * @param {number} value - * @return {!proto.lnrpc.EstimateFeeResponse} returns this + * @enum {number} */ -proto.lnrpc.EstimateFeeResponse.prototype.setFeerateAtomsPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +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])); +}; @@ -7997,8 +8701,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelPoint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelPoint.toObject(opt_includeInstance, this); }; @@ -8007,16 +8711,15 @@ proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelPoint} 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.ChannelPoint.toObject = function(includeInstance, msg) { var f, obj = { - addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - atomsPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), - label: jspb.Message.getFieldWithDefault(msg, 6, "") + fundingTxidBytes: msg.getFundingTxidBytes_asB64(), + fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), + outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -8030,23 +8733,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.ChannelPoint} */ -proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelPoint.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.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.SendManyRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelPoint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyRequest} + * @return {!proto.lnrpc.ChannelPoint} */ -proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8054,22 +8757,16 @@ proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = msg.getAddrtoamountMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); - }); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAtomsPerByte(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundingTxidBytes(value); break; - case 6: + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); + msg.setFundingTxidStr(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutputIndex(value); break; default: reader.skipField(); @@ -8084,9 +8781,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.ChannelPoint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelPoint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8094,34 +8791,30 @@ proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendManyRequest} message + * @param {!proto.lnrpc.ChannelPoint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelPoint.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 = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, f ); } - f = message.getAtomsPerByte(); - if (f !== 0) { - writer.writeInt64( - 5, + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, f ); } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 6, + f = message.getOutputIndex(); + if (f !== 0) { + writer.writeUint32( + 3, f ); } @@ -8129,208 +8822,116 @@ proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) /** - * map AddrToAmount = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional bytes funding_txid_bytes = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.SendManyRequest} returns this + * optional bytes funding_txid_bytes = 1; + * This is a type-conversion wrapper around `getFundingTxidBytes()` + * @return {string} */ -proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); - return this;}; +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxidBytes())); +}; /** - * optional int32 target_conf = 3; - * @return {number} + * 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.SendManyRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxidBytes())); }; /** - * @param {number} value - * @return {!proto.lnrpc.SendManyRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelPoint} returns this */ -proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ChannelPoint.prototype.setFundingTxidBytes = function(value) { + return jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); }; /** - * optional int64 atoms_per_byte = 5; - * @return {number} + * Clears the field making it undefined. + * @return {!proto.lnrpc.ChannelPoint} returns this */ -proto.lnrpc.SendManyRequest.prototype.getAtomsPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChannelPoint.prototype.clearFundingTxidBytes = function() { + return jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.SendManyRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.SendManyRequest.prototype.setAtomsPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional string label = 6; + * optional string funding_txid_str = 2; * @return {string} */ -proto.lnrpc.SendManyRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.lnrpc.ChannelPoint.prototype.getFundingTxidStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.SendManyRequest} returns this - */ -proto.lnrpc.SendManyRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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} + * @return {!proto.lnrpc.ChannelPoint} returns this */ -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; +proto.lnrpc.ChannelPoint.prototype.setFundingTxidStr = function(value) { + return jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.lnrpc.ChannelPoint} returns this */ -proto.lnrpc.SendManyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelPoint.prototype.clearFundingTxidStr = function() { + return jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); }; /** - * 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 + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.SendManyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } +proto.lnrpc.ChannelPoint.prototype.hasFundingTxidStr = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional string txid = 1; - * @return {string} + * optional uint32 output_index = 3; + * @return {number} */ -proto.lnrpc.SendManyResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelPoint.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.SendManyResponse} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelPoint} returns this */ -proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -8350,8 +8951,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.OutPoint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OutPoint.toObject(opt_includeInstance, this); }; @@ -8360,18 +8961,15 @@ proto.lnrpc.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. 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.OutPoint} 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.OutPoint.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), - atomsPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), - sendAll: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - label: jspb.Message.getFieldWithDefault(msg, 7, "") + txidBytes: msg.getTxidBytes_asB64(), + txidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), + outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -8385,23 +8983,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.OutPoint} */ -proto.lnrpc.SendCoinsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.OutPoint.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.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.SendCoinsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.OutPoint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsRequest} + * @return {!proto.lnrpc.OutPoint} */ -proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.OutPoint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8409,28 +9007,16 @@ proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxidBytes(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTxidStr(value); break; case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAtomsPerByte(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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutputIndex(value); break; default: reader.skipField(); @@ -8445,9 +9031,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.OutPoint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.OutPoint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8455,162 +9041,111 @@ 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.OutPoint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.OutPoint.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddr(); + f = message.getTxidBytes_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getTxidStr(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getTargetConf(); + f = message.getOutputIndex(); if (f !== 0) { - writer.writeInt32( + writer.writeUint32( 3, f ); } - f = message.getAtomsPerByte(); - 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} + * optional bytes txid_bytes = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.OutPoint.prototype.getTxidBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this + * optional bytes txid_bytes = 1; + * This is a type-conversion wrapper around `getTxidBytes()` + * @return {string} */ -proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.OutPoint.prototype.getTxidBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxidBytes())); }; /** - * optional int64 amount = 2; - * @return {number} + * optional bytes txid_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxidBytes()` + * @return {!Uint8Array} */ -proto.lnrpc.SendCoinsRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.OutPoint.prototype.getTxidBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxidBytes())); }; /** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.OutPoint} returns this */ -proto.lnrpc.SendCoinsRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.OutPoint.prototype.setTxidBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional int32 target_conf = 3; - * @return {number} + * optional string txid_str = 2; + * @return {string} */ -proto.lnrpc.SendCoinsRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.OutPoint.prototype.getTxidStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.OutPoint} returns this */ -proto.lnrpc.SendCoinsRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.OutPoint.prototype.setTxidStr = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 atoms_per_byte = 5; + * optional uint32 output_index = 3; * @return {number} */ -proto.lnrpc.SendCoinsRequest.prototype.getAtomsPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.OutPoint.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setAtomsPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bool send_all = 6; - * @return {boolean} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSendAll = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.SendCoinsRequest} returns this - */ -proto.lnrpc.SendCoinsRequest.prototype.setSendAll = function(value) { - return 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 - * @return {!proto.lnrpc.SendCoinsRequest} returns this + * @return {!proto.lnrpc.OutPoint} returns this */ -proto.lnrpc.SendCoinsRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); +proto.lnrpc.OutPoint.prototype.setOutputIndex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -8630,8 +9165,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.LightningAddress.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.LightningAddress.toObject(opt_includeInstance, this); }; @@ -8640,13 +9175,14 @@ proto.lnrpc.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. 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.LightningAddress} 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.LightningAddress.toObject = function(includeInstance, msg) { var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") + pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), + host: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -8660,23 +9196,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.LightningAddress} */ -proto.lnrpc.SendCoinsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.LightningAddress.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.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.SendCoinsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.LightningAddress} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsResponse} + * @return {!proto.lnrpc.LightningAddress} */ -proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8685,7 +9221,11 @@ proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); + msg.setPubkey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); break; default: reader.skipField(); @@ -8700,9 +9240,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.LightningAddress.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.LightningAddress.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8710,40 +9250,65 @@ 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.LightningAddress} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid(); + f = message.getPubkey(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional string txid = 1; + * optional string pubkey = 1; * @return {string} */ -proto.lnrpc.SendCoinsResponse.prototype.getTxid = function() { +proto.lnrpc.LightningAddress.prototype.getPubkey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.SendCoinsResponse} returns this + * @return {!proto.lnrpc.LightningAddress} returns this */ -proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { +proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { return 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 + * @return {!proto.lnrpc.LightningAddress} returns this + */ +proto.lnrpc.LightningAddress.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + @@ -8760,8 +9325,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EstimateFeeRequest.toObject(opt_includeInstance, this); }; @@ -8770,14 +9335,16 @@ proto.lnrpc.ListUnspentRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.EstimateFeeRequest} 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.EstimateFeeRequest.toObject = function(includeInstance, msg) { var f, obj = { - minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxConfs: jspb.Message.getFieldWithDefault(msg, 2, 0) + addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], + targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0), + minConfs: jspb.Message.getFieldWithDefault(msg, 3, 0), + spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -8791,23 +9358,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.EstimateFeeRequest} */ -proto.lnrpc.ListUnspentRequest.deserializeBinary = function(bytes) { +proto.lnrpc.EstimateFeeRequest.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.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.ListUnspentRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.EstimateFeeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListUnspentRequest} + * @return {!proto.lnrpc.EstimateFeeRequest} */ -proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8815,12 +9382,22 @@ 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 = msg.getAddrtoamountMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); break; case 2: var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxConfs(value); + msg.setTargetConf(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSpendUnconfirmed(value); break; default: reader.skipField(); @@ -8835,9 +9412,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.EstimateFeeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8845,23 +9422,34 @@ 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.EstimateFeeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMinConfs(); + 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( - 1, + 2, f ); } - f = message.getMaxConfs(); + f = message.getMinConfs(); if (f !== 0) { writer.writeInt32( - 2, + 3, + f + ); + } + f = message.getSpendUnconfirmed(); + if (f) { + writer.writeBool( + 4, f ); } @@ -8869,48 +9457,81 @@ proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, write /** - * optional int32 min_confs = 1; + * 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)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.EstimateFeeRequest} returns this + */ +proto.lnrpc.EstimateFeeRequest.prototype.clearAddrtoamountMap = function() { + this.getAddrtoamountMap().clear(); + return this;}; + + +/** + * optional int32 target_conf = 2; * @return {number} */ -proto.lnrpc.ListUnspentRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.EstimateFeeRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListUnspentRequest} returns this + * @return {!proto.lnrpc.EstimateFeeRequest} returns this */ -proto.lnrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int32 max_confs = 2; + * optional int32 min_confs = 3; * @return {number} */ -proto.lnrpc.ListUnspentRequest.prototype.getMaxConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.EstimateFeeRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListUnspentRequest} returns this + * @return {!proto.lnrpc.EstimateFeeRequest} returns this */ -proto.lnrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.EstimateFeeRequest.prototype.setMinConfs = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; +/** + * optional bool spend_unconfirmed = 4; + * @return {boolean} + */ +proto.lnrpc.EstimateFeeRequest.prototype.getSpendUnconfirmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {boolean} value + * @return {!proto.lnrpc.EstimateFeeRequest} returns this */ -proto.lnrpc.ListUnspentResponse.repeatedFields_ = [1]; +proto.lnrpc.EstimateFeeRequest.prototype.setSpendUnconfirmed = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + @@ -8927,8 +9548,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EstimateFeeResponse.toObject(opt_includeInstance, this); }; @@ -8937,14 +9558,14 @@ proto.lnrpc.ListUnspentResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.EstimateFeeResponse} 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.EstimateFeeResponse.toObject = function(includeInstance, msg) { var f, obj = { - utxosList: jspb.Message.toObjectList(msg.getUtxosList(), - proto.lnrpc.Utxo.toObject, includeInstance) + feeAtoms: jspb.Message.getFieldWithDefault(msg, 1, 0), + feerateAtomsPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -8958,23 +9579,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.EstimateFeeResponse} */ -proto.lnrpc.ListUnspentResponse.deserializeBinary = function(bytes) { +proto.lnrpc.EstimateFeeResponse.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.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.ListUnspentResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.EstimateFeeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListUnspentResponse} + * @return {!proto.lnrpc.EstimateFeeResponse} */ -proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8982,9 +9603,12 @@ 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 = /** @type {number} */ (reader.readInt64()); + msg.setFeeAtoms(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeerateAtomsPerByte(value); break; default: reader.skipField(); @@ -8999,9 +9623,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.EstimateFeeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9009,58 +9633,62 @@ 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.EstimateFeeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUtxosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getFeeAtoms(); + if (f !== 0) { + writer.writeInt64( 1, - f, - proto.lnrpc.Utxo.serializeBinaryToWriter + f + ); + } + f = message.getFeerateAtomsPerByte(); + if (f !== 0) { + writer.writeInt64( + 2, + f ); } }; /** - * repeated Utxo utxos = 1; - * @return {!Array} + * optional int64 fee_atoms = 1; + * @return {number} */ -proto.lnrpc.ListUnspentResponse.prototype.getUtxosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Utxo, 1)); +proto.lnrpc.EstimateFeeResponse.prototype.getFeeAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ListUnspentResponse} returns this -*/ -proto.lnrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.lnrpc.EstimateFeeResponse} returns this + */ +proto.lnrpc.EstimateFeeResponse.prototype.setFeeAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * @param {!proto.lnrpc.Utxo=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Utxo} + * optional int64 feerate_atoms_per_byte = 2; + * @return {number} */ -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.EstimateFeeResponse.prototype.getFeerateAtomsPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListUnspentResponse} returns this + * @param {number} value + * @return {!proto.lnrpc.EstimateFeeResponse} returns this */ -proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { - return this.setUtxosList([]); +proto.lnrpc.EstimateFeeResponse.prototype.setFeerateAtomsPerByte = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -9080,8 +9708,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NewAddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NewAddressRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendManyRequest.toObject(opt_includeInstance, this); }; @@ -9090,13 +9718,19 @@ proto.lnrpc.NewAddressRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NewAddressRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.SendManyRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0) + addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], + targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), + atomsPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), + label: jspb.Message.getFieldWithDefault(msg, 6, ""), + account: jspb.Message.getFieldWithDefault(msg, 100, ""), + minConfs: jspb.Message.getFieldWithDefault(msg, 7, 0), + spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -9110,23 +9744,23 @@ proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NewAddressRequest} + * @return {!proto.lnrpc.SendManyRequest} */ -proto.lnrpc.NewAddressRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NewAddressRequest; - return proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendManyRequest; + return proto.lnrpc.SendManyRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NewAddressRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendManyRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressRequest} + * @return {!proto.lnrpc.SendManyRequest} */ -proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9134,8 +9768,34 @@ 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 = msg.getAddrtoamountMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAtomsPerByte(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 100: + var value = /** @type {string} */ (reader.readString()); + msg.setAccount(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSpendUnconfirmed(value); break; default: reader.skipField(); @@ -9150,9 +9810,9 @@ proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendManyRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9160,16 +9820,55 @@ proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NewAddressRequest} message + * @param {!proto.lnrpc.SendManyRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, + f = message.getAddrtoamountMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getAtomsPerByte(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAccount(); + if (f.length > 0) { + writer.writeString( + 100, + f + ); + } + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getSpendUnconfirmed(); + if (f) { + writer.writeBool( + 8, f ); } @@ -9177,20 +9876,132 @@ proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer /** - * optional AddressType type = 1; - * @return {!proto.lnrpc.AddressType} + * map AddrToAmount = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.NewAddressRequest.prototype.getType = function() { - return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); }; /** - * @param {!proto.lnrpc.AddressType} value - * @return {!proto.lnrpc.NewAddressRequest} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.SendManyRequest} returns this */ -proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { + this.getAddrtoamountMap().clear(); + return this;}; + + +/** + * 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 + * @return {!proto.lnrpc.SendManyRequest} returns this + */ +proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 atoms_per_byte = 5; + * @return {number} + */ +proto.lnrpc.SendManyRequest.prototype.getAtomsPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.SendManyRequest} returns this + */ +proto.lnrpc.SendManyRequest.prototype.setAtomsPerByte = function(value) { + return 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 + * @return {!proto.lnrpc.SendManyRequest} returns this + */ +proto.lnrpc.SendManyRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string account = 100; + * @return {string} + */ +proto.lnrpc.SendManyRequest.prototype.getAccount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 100, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.SendManyRequest} returns this + */ +proto.lnrpc.SendManyRequest.prototype.setAccount = function(value) { + return jspb.Message.setProto3StringField(this, 100, value); +}; + + +/** + * optional int32 min_confs = 7; + * @return {number} + */ +proto.lnrpc.SendManyRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.SendManyRequest} returns this + */ +proto.lnrpc.SendManyRequest.prototype.setMinConfs = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bool spend_unconfirmed = 8; + * @return {boolean} + */ +proto.lnrpc.SendManyRequest.prototype.getSpendUnconfirmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.SendManyRequest} returns this + */ +proto.lnrpc.SendManyRequest.prototype.setSpendUnconfirmed = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -9210,8 +10021,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendManyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendManyResponse.toObject(opt_includeInstance, this); }; @@ -9220,13 +10031,13 @@ proto.lnrpc.NewAddressResponse.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.SendManyResponse} 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.SendManyResponse.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + txid: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -9240,23 +10051,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.SendManyResponse} */ -proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendManyResponse.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.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.NewAddressResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendManyResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressResponse} + * @return {!proto.lnrpc.SendManyResponse} */ -proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9265,7 +10076,7 @@ proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + msg.setTxid(value); break; default: reader.skipField(); @@ -9280,9 +10091,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.SendManyResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendManyResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9290,13 +10101,13 @@ 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.SendManyResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendManyResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); + f = message.getTxid(); if (f.length > 0) { writer.writeString( 1, @@ -9307,19 +10118,19 @@ proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, write /** - * optional string address = 1; + * optional string txid = 1; * @return {string} */ -proto.lnrpc.NewAddressResponse.prototype.getAddress = function() { +proto.lnrpc.SendManyResponse.prototype.getTxid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.NewAddressResponse} returns this + * @return {!proto.lnrpc.SendManyResponse} returns this */ -proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { +proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -9340,8 +10151,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCoinsRequest.toObject(opt_includeInstance, this); }; @@ -9350,13 +10161,21 @@ proto.lnrpc.SignMessageRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.SendCoinsRequest} 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.SendCoinsRequest.toObject = function(includeInstance, msg) { var f, obj = { - msg: msg.getMsg_asB64() + addr: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), + atomsPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), + sendAll: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + label: jspb.Message.getFieldWithDefault(msg, 7, ""), + account: jspb.Message.getFieldWithDefault(msg, 100, ""), + minConfs: jspb.Message.getFieldWithDefault(msg, 8, 0), + spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -9370,23 +10189,23 @@ proto.lnrpc.SignMessageRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SignMessageRequest} + * @return {!proto.lnrpc.SendCoinsRequest} */ -proto.lnrpc.SignMessageRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendCoinsRequest.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.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.SignMessageRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendCoinsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageRequest} + * @return {!proto.lnrpc.SendCoinsRequest} */ -proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9394,25 +10213,57 @@ proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddr(value); break; - default: - reader.skipField(); + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); break; - } - } - return msg; -}; - - + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAtomsPerByte(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; + case 100: + var value = /** @type {string} */ (reader.readString()); + msg.setAccount(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSpendUnconfirmed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SignMessageRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendCoinsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9420,61 +10271,237 @@ 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.SendCoinsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMsg_asU8(); + f = message.getAddr(); if (f.length > 0) { - writer.writeBytes( + 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.getAtomsPerByte(); + 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 + ); + } + f = message.getAccount(); + if (f.length > 0) { + writer.writeString( + 100, + f + ); + } + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( + 8, + f + ); + } + f = message.getSpendUnconfirmed(); + if (f) { + writer.writeBool( + 9, + f + ); + } }; /** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} + * optional string addr = 1; + * @return {string} */ -proto.lnrpc.SignMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` + * @param {string} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { + return 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 + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setAmount = function(value) { + return 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 + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setTargetConf = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 atoms_per_byte = 5; + * @return {number} + */ +proto.lnrpc.SendCoinsRequest.prototype.getAtomsPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setAtomsPerByte = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bool send_all = 6; + * @return {boolean} + */ +proto.lnrpc.SendCoinsRequest.prototype.getSendAll = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setSendAll = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string label = 7; * @return {string} */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); +proto.lnrpc.SendCoinsRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * 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} + * @param {string} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); +proto.lnrpc.SendCoinsRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.SignMessageRequest} returns this + * optional string account = 100; + * @return {string} */ -proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.SendCoinsRequest.prototype.getAccount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 100, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setAccount = function(value) { + return jspb.Message.setProto3StringField(this, 100, value); +}; + + +/** + * optional int32 min_confs = 8; + * @return {number} + */ +proto.lnrpc.SendCoinsRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setMinConfs = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional bool spend_unconfirmed = 9; + * @return {boolean} + */ +proto.lnrpc.SendCoinsRequest.prototype.getSpendUnconfirmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.SendCoinsRequest} returns this + */ +proto.lnrpc.SendCoinsRequest.prototype.setSpendUnconfirmed = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; @@ -9494,8 +10521,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCoinsResponse.toObject(opt_includeInstance, this); }; @@ -9504,13 +10531,13 @@ proto.lnrpc.SignMessageResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.SendCoinsResponse} 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.SendCoinsResponse.toObject = function(includeInstance, msg) { var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, "") + txid: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -9524,23 +10551,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.SendCoinsResponse} */ -proto.lnrpc.SignMessageResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendCoinsResponse.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.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.SignMessageResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendCoinsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageResponse} + * @return {!proto.lnrpc.SendCoinsResponse} */ -proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9549,7 +10576,7 @@ proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + msg.setTxid(value); break; default: reader.skipField(); @@ -9564,9 +10591,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.SendCoinsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9574,13 +10601,13 @@ 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.SendCoinsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignature(); + f = message.getTxid(); if (f.length > 0) { writer.writeString( 1, @@ -9591,19 +10618,19 @@ proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writ /** - * optional string signature = 1; + * optional string txid = 1; * @return {string} */ -proto.lnrpc.SignMessageResponse.prototype.getSignature = function() { +proto.lnrpc.SendCoinsResponse.prototype.getTxid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.SignMessageResponse} returns this + * @return {!proto.lnrpc.SendCoinsResponse} returns this */ -proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { +proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -9624,8 +10651,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyMessageRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ListUnspentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListUnspentRequest.toObject(opt_includeInstance, this); }; @@ -9634,14 +10661,15 @@ proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.VerifyMessageRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ListUnspentRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { var f, obj = { - msg: msg.getMsg_asB64(), - signature: jspb.Message.getFieldWithDefault(msg, 2, "") + minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxConfs: jspb.Message.getFieldWithDefault(msg, 2, 0), + account: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -9655,23 +10683,23 @@ proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyMessageRequest} + * @return {!proto.lnrpc.ListUnspentRequest} */ -proto.lnrpc.VerifyMessageRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ListUnspentRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyMessageRequest; - return proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.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.VerifyMessageRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListUnspentRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageRequest} + * @return {!proto.lnrpc.ListUnspentRequest} */ -proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9679,12 +10707,16 @@ proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); break; case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxConfs(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + msg.setAccount(value); break; default: reader.skipField(); @@ -9699,9 +10731,9 @@ proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { +proto.lnrpc.ListUnspentRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9709,23 +10741,30 @@ proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyMessageRequest} message + * @param {!proto.lnrpc.ListUnspentRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMsg_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( 1, f ); } - f = message.getSignature(); + f = message.getMaxConfs(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getAccount(); if (f.length > 0) { writer.writeString( - 2, + 3, f ); } @@ -9733,66 +10772,67 @@ proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter = function(message, wri /** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} + * optional int32 min_confs = 1; + * @return {number} */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ListUnspentRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.ListUnspentRequest} returns this */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); +proto.lnrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * 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} + * optional int32 max_confs = 2; + * @return {number} */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); +proto.lnrpc.ListUnspentRequest.prototype.getMaxConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.VerifyMessageRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ListUnspentRequest} returns this */ -proto.lnrpc.VerifyMessageRequest.prototype.setMsg = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string signature = 2; + * optional string account = 3; * @return {string} */ -proto.lnrpc.VerifyMessageRequest.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ListUnspentRequest.prototype.getAccount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.VerifyMessageRequest} returns this + * @return {!proto.lnrpc.ListUnspentRequest} returns this */ -proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ListUnspentRequest.prototype.setAccount = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListUnspentResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9808,8 +10848,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ListUnspentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListUnspentResponse.toObject(opt_includeInstance, this); }; @@ -9818,14 +10858,14 @@ proto.lnrpc.VerifyMessageResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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.ListUnspentResponse} 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.ListUnspentResponse.toObject = function(includeInstance, msg) { var f, obj = { - valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - pubkey: jspb.Message.getFieldWithDefault(msg, 2, "") + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + proto.lnrpc.Utxo.toObject, includeInstance) }; if (includeInstance) { @@ -9839,23 +10879,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.ListUnspentResponse} */ -proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListUnspentResponse.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.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.VerifyMessageResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListUnspentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageResponse} + * @return {!proto.lnrpc.ListUnspentResponse} */ -proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9863,12 +10903,9 @@ proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); + var value = new proto.lnrpc.Utxo; + reader.readMessage(value,proto.lnrpc.Utxo.deserializeBinaryFromReader); + msg.addUtxos(value); break; default: reader.skipField(); @@ -9883,9 +10920,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.ListUnspentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9893,62 +10930,58 @@ 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.ListUnspentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getPubkey(); + f = message.getUtxosList(); if (f.length > 0) { - writer.writeString( - 2, - f + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Utxo.serializeBinaryToWriter ); } }; /** - * optional bool valid = 1; - * @return {boolean} + * repeated Utxo utxos = 1; + * @return {!Array} */ -proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.ListUnspentResponse.prototype.getUtxosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Utxo, 1)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.VerifyMessageResponse} returns this - */ -proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); + * @param {!Array} value + * @return {!proto.lnrpc.ListUnspentResponse} returns this +*/ +proto.lnrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional string pubkey = 2; - * @return {string} + * @param {!proto.lnrpc.Utxo=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.VerifyMessageResponse.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ListUnspentResponse.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Utxo, opt_index); }; /** - * @param {string} value - * @return {!proto.lnrpc.VerifyMessageResponse} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ListUnspentResponse} returns this */ -proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { + return this.setUtxosList([]); }; @@ -9968,8 +11001,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.NewAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NewAddressRequest.toObject(opt_includeInstance, this); }; @@ -9978,14 +11011,14 @@ proto.lnrpc.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.NewAddressRequest} 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.NewAddressRequest.toObject = function(includeInstance, msg) { var f, obj = { - addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), - perm: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + account: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -9999,23 +11032,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.NewAddressRequest} */ -proto.lnrpc.ConnectPeerRequest.deserializeBinary = function(bytes) { +proto.lnrpc.NewAddressRequest.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.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.ConnectPeerRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.NewAddressRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerRequest} + * @return {!proto.lnrpc.NewAddressRequest} */ -proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10023,13 +11056,12 @@ 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 {!proto.lnrpc.AddressType} */ (reader.readEnum()); + msg.setType(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPerm(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAccount(value); break; default: reader.skipField(); @@ -10044,9 +11076,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.NewAddressRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.NewAddressRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10054,23 +11086,22 @@ 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.NewAddressRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddr(); - if (f != null) { - writer.writeMessage( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 1, - f, - proto.lnrpc.LightningAddress.serializeBinaryToWriter + f ); } - f = message.getPerm(); - if (f) { - writer.writeBool( + f = message.getAccount(); + if (f.length > 0) { + writer.writeString( 2, f ); @@ -10079,57 +11110,38 @@ proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, write /** - * optional LightningAddress addr = 1; - * @return {?proto.lnrpc.LightningAddress} - */ -proto.lnrpc.ConnectPeerRequest.prototype.getAddr = function() { - return /** @type{?proto.lnrpc.LightningAddress} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.LightningAddress, 1)); -}; - - -/** - * @param {?proto.lnrpc.LightningAddress|undefined} value - * @return {!proto.lnrpc.ConnectPeerRequest} returns this -*/ -proto.lnrpc.ConnectPeerRequest.prototype.setAddr = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ConnectPeerRequest} returns this + * optional AddressType type = 1; + * @return {!proto.lnrpc.AddressType} */ -proto.lnrpc.ConnectPeerRequest.prototype.clearAddr = function() { - return this.setAddr(undefined); +proto.lnrpc.NewAddressRequest.prototype.getType = function() { + return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.lnrpc.AddressType} value + * @return {!proto.lnrpc.NewAddressRequest} returns this */ -proto.lnrpc.ConnectPeerRequest.prototype.hasAddr = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional bool perm = 2; - * @return {boolean} + * optional string account = 2; + * @return {string} */ -proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.lnrpc.NewAddressRequest.prototype.getAccount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ConnectPeerRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.NewAddressRequest} returns this */ -proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.lnrpc.NewAddressRequest.prototype.setAccount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -10149,8 +11161,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConnectPeerResponse.toObject(opt_includeInstance, this); +proto.lnrpc.NewAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NewAddressResponse.toObject(opt_includeInstance, this); }; @@ -10159,13 +11171,13 @@ proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConnectPeerResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.NewAddressResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.NewAddressResponse.toObject = function(includeInstance, msg) { var f, obj = { - + address: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -10179,29 +11191,33 @@ proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConnectPeerResponse} + * @return {!proto.lnrpc.NewAddressResponse} */ -proto.lnrpc.ConnectPeerResponse.deserializeBinary = function(bytes) { +proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConnectPeerResponse; - return proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.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.ConnectPeerResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.NewAddressResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerResponse} + * @return {!proto.lnrpc.NewAddressResponse} */ -proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { +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; @@ -10215,9 +11231,9 @@ proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ConnectPeerResponse.prototype.serializeBinary = function() { +proto.lnrpc.NewAddressResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.NewAddressResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10225,12 +11241,37 @@ proto.lnrpc.ConnectPeerResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConnectPeerResponse} message + * @param {!proto.lnrpc.NewAddressResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writer) { +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 + * @return {!proto.lnrpc.NewAddressResponse} returns this + */ +proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -10250,8 +11291,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SignMessageRequest.toObject(opt_includeInstance, this); }; @@ -10260,13 +11301,14 @@ proto.lnrpc.DisconnectPeerRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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.SignMessageRequest} 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.SignMessageRequest.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") + msg: msg.getMsg_asB64(), + singleHash: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -10280,23 +11322,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.SignMessageRequest} */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SignMessageRequest.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.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.DisconnectPeerRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SignMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerRequest} + * @return {!proto.lnrpc.SignMessageRequest} */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10304,8 +11346,12 @@ 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 {!Uint8Array} */ (reader.readBytes()); + msg.setMsg(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSingleHash(value); break; default: reader.skipField(); @@ -10320,9 +11366,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.SignMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SignMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10330,37 +11376,86 @@ 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.SignMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getMsg_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } + f = message.getSingleHash(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional string pub_key = 1; + * 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.DisconnectPeerRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.SignMessageRequest.prototype.getMsg_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMsg())); }; /** - * @param {string} value - * @return {!proto.lnrpc.DisconnectPeerRequest} returns this + * 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.DisconnectPeerRequest.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.SignMessageRequest.prototype.getMsg_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMsg())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SignMessageRequest} returns this + */ +proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool single_hash = 2; + * @return {boolean} + */ +proto.lnrpc.SignMessageRequest.prototype.getSingleHash = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.SignMessageRequest} returns this + */ +proto.lnrpc.SignMessageRequest.prototype.setSingleHash = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -10380,8 +11475,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SignMessageResponse.toObject(opt_includeInstance, this); }; @@ -10390,13 +11485,13 @@ proto.lnrpc.DisconnectPeerResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. 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.SignMessageResponse} 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.SignMessageResponse.toObject = function(includeInstance, msg) { var f, obj = { - + signature: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -10410,29 +11505,33 @@ 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.SignMessageResponse} */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SignMessageResponse.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.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.DisconnectPeerResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SignMessageResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerResponse} + * @return {!proto.lnrpc.SignMessageResponse} */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { +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; @@ -10446,9 +11545,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.SignMessageResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SignMessageResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10456,12 +11555,37 @@ 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.SignMessageResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, writer) { +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 + * @return {!proto.lnrpc.SignMessageResponse} returns this + */ +proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -10481,8 +11605,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyMessageRequest.toObject(opt_includeInstance, this); }; @@ -10491,16 +11615,14 @@ proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.VerifyMessageRequest} 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.VerifyMessageRequest.toObject = function(includeInstance, msg) { var f, obj = { - incoming: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - hashLock: msg.getHashLock_asB64(), - expirationHeight: jspb.Message.getFieldWithDefault(msg, 4, 0) + msg: msg.getMsg_asB64(), + signature: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -10514,23 +11636,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.VerifyMessageRequest} */ -proto.lnrpc.HTLC.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyMessageRequest.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.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.HTLC} msg The message object to deserialize into. + * @param {!proto.lnrpc.VerifyMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HTLC} + * @return {!proto.lnrpc.VerifyMessageRequest} */ -proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10538,20 +11660,12 @@ proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { 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); + msg.setMsg(value); break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpirationHeight(value); + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); break; default: reader.skipField(); @@ -10566,9 +11680,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.VerifyMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.HTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10576,37 +11690,23 @@ proto.lnrpc.HTLC.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HTLC} message + * @param {!proto.lnrpc.VerifyMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyMessageRequest.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(); + f = message.getMsg_asU8(); if (f.length > 0) { writer.writeBytes( - 3, + 1, f ); } - f = message.getExpirationHeight(); - if (f !== 0) { - writer.writeUint32( - 4, + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -10614,98 +11714,62 @@ proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { /** - * optional bool incoming = 1; - * @return {boolean} - */ -proto.lnrpc.HTLC.prototype.getIncoming = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setIncoming = function(value) { - return 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 - * @return {!proto.lnrpc.HTLC} returns this - */ -proto.lnrpc.HTLC.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bytes hash_lock = 3; + * optional bytes msg = 1; * @return {!(string|Uint8Array)} */ -proto.lnrpc.HTLC.prototype.getHashLock = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.VerifyMessageRequest.prototype.getMsg = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes hash_lock = 3; - * This is a type-conversion wrapper around `getHashLock()` + * optional bytes msg = 1; + * This is a type-conversion wrapper around `getMsg()` * @return {string} */ -proto.lnrpc.HTLC.prototype.getHashLock_asB64 = function() { +proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHashLock())); + this.getMsg())); }; /** - * optional bytes hash_lock = 3; + * 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 `getHashLock()` + * This is a type-conversion wrapper around `getMsg()` * @return {!Uint8Array} */ -proto.lnrpc.HTLC.prototype.getHashLock_asU8 = function() { +proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHashLock())); + this.getMsg())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.HTLC} returns this + * @return {!proto.lnrpc.VerifyMessageRequest} returns this */ -proto.lnrpc.HTLC.prototype.setHashLock = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.lnrpc.VerifyMessageRequest.prototype.setMsg = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 expiration_height = 4; - * @return {number} + * optional string signature = 2; + * @return {string} */ -proto.lnrpc.HTLC.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.VerifyMessageRequest.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.HTLC} returns this + * @param {string} value + * @return {!proto.lnrpc.VerifyMessageRequest} returns this */ -proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -10725,8 +11789,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelConstraints.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelConstraints.toObject(opt_includeInstance, this); +proto.lnrpc.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyMessageResponse.toObject(opt_includeInstance, this); }; @@ -10735,18 +11799,14 @@ proto.lnrpc.ChannelConstraints.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.VerifyMessageResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelConstraints.toObject = function(includeInstance, msg) { +proto.lnrpc.VerifyMessageResponse.toObject = function(includeInstance, msg) { var f, obj = { - csvDelay: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 2, 0), - dustLimitAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxPendingAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), - minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 6, 0) + valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + pubkey: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -10760,23 +11820,23 @@ proto.lnrpc.ChannelConstraints.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelConstraints} + * @return {!proto.lnrpc.VerifyMessageResponse} */ -proto.lnrpc.ChannelConstraints.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelConstraints; - return proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.VerifyMessageResponse; + return proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelConstraints} msg The message object to deserialize into. + * @param {!proto.lnrpc.VerifyMessageResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelConstraints} + * @return {!proto.lnrpc.VerifyMessageResponse} */ -proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10784,28 +11844,12 @@ proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValid(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanReserveAtoms(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDustLimitAtoms(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPendingAmtMAtoms(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlcMAtoms(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxAcceptedHtlcs(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPubkey(value); break; default: reader.skipField(); @@ -10820,9 +11864,9 @@ proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelConstraints.prototype.serializeBinary = function() { +proto.lnrpc.VerifyMessageResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelConstraints.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10830,172 +11874,276 @@ proto.lnrpc.ChannelConstraints.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelConstraints} message + * @param {!proto.lnrpc.VerifyMessageResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelConstraints.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( + f = message.getValid(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getChanReserveAtoms(); - if (f !== 0) { - writer.writeUint64( + f = message.getPubkey(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getDustLimitAtoms(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMaxPendingAmtMAtoms(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getMinHtlcMAtoms(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getMaxAcceptedHtlcs(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } }; /** - * optional uint32 csv_delay = 1; - * @return {number} + * optional bool valid = 1; + * @return {boolean} */ -proto.lnrpc.ChannelConstraints.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this + * @param {boolean} value + * @return {!proto.lnrpc.VerifyMessageResponse} returns this */ -proto.lnrpc.ChannelConstraints.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional uint64 chan_reserve_atoms = 2; - * @return {number} + * optional string pubkey = 2; + * @return {string} */ -proto.lnrpc.ChannelConstraints.prototype.getChanReserveAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.VerifyMessageResponse.prototype.getPubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this + * @param {string} value + * @return {!proto.lnrpc.VerifyMessageResponse} returns this */ -proto.lnrpc.ChannelConstraints.prototype.setChanReserveAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 dust_limit_atoms = 3; - * @return {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.ChannelConstraints.prototype.getDustLimitAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConnectPeerRequest.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelConstraints.prototype.setDustLimitAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), + perm: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + timeout: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 max_pending_amt_m_atoms = 4; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ConnectPeerRequest} */ -proto.lnrpc.ChannelConstraints.prototype.getMaxPendingAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +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); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this + * 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.ChannelConstraints.prototype.setMaxPendingAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +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; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 min_htlc_m_atoms = 5; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ChannelConstraints.prototype.getMinHtlcMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ConnectPeerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this + * 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.ChannelConstraints.prototype.setMinHtlcMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +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 + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } }; /** - * optional uint32 max_accepted_htlcs = 6; - * @return {number} + * optional LightningAddress addr = 1; + * @return {?proto.lnrpc.LightningAddress} */ -proto.lnrpc.ChannelConstraints.prototype.getMaxAcceptedHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ConnectPeerRequest.prototype.getAddr = function() { + return /** @type{?proto.lnrpc.LightningAddress} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.LightningAddress, 1)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelConstraints} returns this + * @param {?proto.lnrpc.LightningAddress|undefined} value + * @return {!proto.lnrpc.ConnectPeerRequest} returns this +*/ +proto.lnrpc.ConnectPeerRequest.prototype.setAddr = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ConnectPeerRequest} returns this */ -proto.lnrpc.ChannelConstraints.prototype.setMaxAcceptedHtlcs = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.ConnectPeerRequest.prototype.clearAddr = function() { + return 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; + * @return {boolean} + */ +proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {boolean} value + * @return {!proto.lnrpc.ConnectPeerRequest} returns this */ -proto.lnrpc.Channel.repeatedFields_ = [15]; +proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional uint64 timeout = 3; + * @return {number} + */ +proto.lnrpc.ConnectPeerRequest.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ConnectPeerRequest} returns this + */ +proto.lnrpc.ConnectPeerRequest.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + @@ -11012,8 +12160,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ConnectPeerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConnectPeerResponse.toObject(opt_includeInstance, this); }; @@ -11022,43 +12170,13 @@ proto.lnrpc.Channel.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ConnectPeerResponse} 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.ConnectPeerResponse.toObject = function(includeInstance, msg) { var f, obj = { - active: jspb.Message.getBooleanFieldWithDefault(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), - commitSize: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKb: jspb.Message.getFieldWithDefault(msg, 10, 0), - unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, 0), - totalAtomsSent: jspb.Message.getFieldWithDefault(msg, 12, 0), - totalAtomsReceived: 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.getBooleanFieldWithDefault(msg, 17, false), - initiator: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), - localChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 20, 0), - remoteChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 21, 0), - staticRemoteKey: jspb.Message.getBooleanFieldWithDefault(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, ""), - pushAmountAtoms: 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) { @@ -11072,152 +12190,29 @@ 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.ConnectPeerResponse} */ -proto.lnrpc.Channel.deserializeBinary = function(bytes) { +proto.lnrpc.ConnectPeerResponse.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.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.Channel} msg The message object to deserialize into. + * @param {!proto.lnrpc.ConnectPeerResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Channel} + * @return {!proto.lnrpc.ConnectPeerResponse} */ -proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ConnectPeerResponse.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.setCommitSize(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKb(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnsettledBalance(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAtomsSent(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAtomsReceived(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.setLocalChanReserveAtoms(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteChanReserveAtoms(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.setPushAmountAtoms(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; @@ -11231,9 +12226,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.ConnectPeerResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Channel.serializeBinaryToWriter(this, writer); + proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11241,823 +12236,577 @@ 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.ConnectPeerResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ConnectPeerResponse.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.getCommitSize(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getFeePerKb(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getUnsettledBalance(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getTotalAtomsSent(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getTotalAtomsReceived(); - 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.getLocalChanReserveAtoms(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getRemoteChanReserveAtoms(); - 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.getPushAmountAtoms(); - 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; - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.getActive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - -/** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setActive = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string remote_pubkey = 2; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Channel.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.DisconnectPeerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DisconnectPeerRequest.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.DisconnectPeerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - +proto.lnrpc.DisconnectPeerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") + }; -/** - * optional string channel_point = 3; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DisconnectPeerRequest} */ -proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.lnrpc.DisconnectPeerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.DisconnectPeerRequest; + return proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader(msg, reader); }; /** - * optional uint64 chan_id = 4; - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.DisconnectPeerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DisconnectPeerRequest} */ -proto.lnrpc.Channel.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); +proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 4, value); +proto.lnrpc.DisconnectPeerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 capacity = 5; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.DisconnectPeerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * optional string pub_key = 1; + * @return {string} */ -proto.lnrpc.Channel.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.DisconnectPeerRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional int64 local_balance = 6; - * @return {number} + * @param {string} value + * @return {!proto.lnrpc.DisconnectPeerRequest} returns this */ -proto.lnrpc.Channel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setLocalBalance = function(value) { - return 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)); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.DisconnectPeerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DisconnectPeerResponse.toObject(opt_includeInstance, this); }; /** - * optional int64 commit_fee = 8; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.Channel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; +proto.lnrpc.DisconnectPeerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCommitFee = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 commit_size = 9; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DisconnectPeerResponse} */ -proto.lnrpc.Channel.prototype.getCommitSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +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); }; /** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * 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.Channel.prototype.setCommitSize = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +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; }; /** - * optional int64 fee_per_kb = 10; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getFeePerKb = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.DisconnectPeerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * 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.Channel.prototype.setFeePerKb = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -/** - * 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 - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setUnsettledBalance = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 total_atoms_sent = 12; - * @return {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Channel.prototype.getTotalAtomsSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HTLC.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.Channel.prototype.setTotalAtomsSent = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - +proto.lnrpc.HTLC.toObject = function(includeInstance, msg) { + var f, obj = { + incoming: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + hashLock: msg.getHashLock_asB64(), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + htlcIndex: jspb.Message.getFieldWithDefault(msg, 5, 0), + forwardingChannel: jspb.Message.getFieldWithDefault(msg, 6, 0), + forwardingHtlcIndex: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; -/** - * optional int64 total_atoms_received = 13; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getTotalAtomsReceived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.HTLC} */ -proto.lnrpc.Channel.prototype.setTotalAtomsReceived = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); +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); }; /** - * optional uint64 num_updates = 14; - * @return {number} + * 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.Channel.prototype.getNumUpdates = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { - return 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 - * @return {!proto.lnrpc.Channel} returns this -*/ -proto.lnrpc.Channel.prototype.setPendingHtlcsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.clearPendingHtlcsList = function() { - return 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 - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); +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; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcIndex(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setForwardingChannel(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setForwardingHtlcIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bool private = 17; - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +proto.lnrpc.HTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.HTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this + * 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.Channel.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 17, value); +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 + ); + } + f = message.getHtlcIndex(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getForwardingChannel(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getForwardingHtlcIndex(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } }; /** - * optional bool initiator = 18; + * optional bool incoming = 1; * @return {boolean} */ -proto.lnrpc.Channel.prototype.getInitiator = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +proto.lnrpc.HTLC.prototype.getIncoming = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setInitiator = function(value) { - return 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 - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setChanStatusFlags = function(value) { - return jspb.Message.setProto3StringField(this, 19, value); -}; - - -/** - * optional int64 local_chan_reserve_atoms = 20; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getLocalChanReserveAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.setLocalChanReserveAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); +proto.lnrpc.HTLC.prototype.setIncoming = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional int64 remote_chan_reserve_atoms = 21; + * optional int64 amount = 2; * @return {number} */ -proto.lnrpc.Channel.prototype.getRemoteChanReserveAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +proto.lnrpc.HTLC.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.setRemoteChanReserveAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 21, value); +proto.lnrpc.HTLC.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bool static_remote_key = 22; - * @return {boolean} + * optional bytes hash_lock = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Channel.prototype.getStaticRemoteKey = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); +proto.lnrpc.HTLC.prototype.getHashLock = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Channel} returns this + * optional bytes hash_lock = 3; + * This is a type-conversion wrapper around `getHashLock()` + * @return {string} */ -proto.lnrpc.Channel.prototype.setStaticRemoteKey = function(value) { - return jspb.Message.setProto3BooleanField(this, 22, value); +proto.lnrpc.HTLC.prototype.getHashLock_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHashLock())); }; /** - * optional CommitmentType commitment_type = 26; - * @return {!proto.lnrpc.CommitmentType} + * 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.Channel.prototype.getCommitmentType = function() { - return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 26, 0)); +proto.lnrpc.HTLC.prototype.getHashLock_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHashLock())); }; /** - * @param {!proto.lnrpc.CommitmentType} value - * @return {!proto.lnrpc.Channel} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 26, value); +proto.lnrpc.HTLC.prototype.setHashLock = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; /** - * optional int64 lifetime = 23; + * optional uint32 expiration_height = 4; * @return {number} */ -proto.lnrpc.Channel.prototype.getLifetime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +proto.lnrpc.HTLC.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.setLifetime = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); +proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 uptime = 24; + * optional uint64 htlc_index = 5; * @return {number} */ -proto.lnrpc.Channel.prototype.getUptime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +proto.lnrpc.HTLC.prototype.getHtlcIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setUptime = function(value) { - return jspb.Message.setProto3IntField(this, 24, value); -}; - - -/** - * optional string close_address = 25; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getCloseAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Channel} returns this + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.setCloseAddress = function(value) { - return jspb.Message.setProto3StringField(this, 25, value); +proto.lnrpc.HTLC.prototype.setHtlcIndex = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional uint64 push_amount_atoms = 27; + * optional uint64 forwarding_channel = 6; * @return {number} */ -proto.lnrpc.Channel.prototype.getPushAmountAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 27, 0)); +proto.lnrpc.HTLC.prototype.getForwardingChannel = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Channel} returns this + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.setPushAmountAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 27, value); +proto.lnrpc.HTLC.prototype.setForwardingChannel = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional uint32 thaw_height = 28; + * optional uint64 forwarding_htlc_index = 7; * @return {number} */ -proto.lnrpc.Channel.prototype.getThawHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 28, 0)); +proto.lnrpc.HTLC.prototype.getForwardingHtlcIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.setThawHeight = function(value) { - return jspb.Message.setProto3IntField(this, 28, value); -}; - - -/** - * optional ChannelConstraints local_constraints = 29; - * @return {?proto.lnrpc.ChannelConstraints} - */ -proto.lnrpc.Channel.prototype.getLocalConstraints = function() { - return /** @type{?proto.lnrpc.ChannelConstraints} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 29)); -}; - - -/** - * @param {?proto.lnrpc.ChannelConstraints|undefined} value - * @return {!proto.lnrpc.Channel} returns this -*/ -proto.lnrpc.Channel.prototype.setLocalConstraints = function(value) { - return jspb.Message.setWrapperField(this, 29, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.clearLocalConstraints = function() { - return this.setLocalConstraints(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.Channel.prototype.hasLocalConstraints = function() { - return jspb.Message.getField(this, 29) != null; -}; - - -/** - * optional ChannelConstraints remote_constraints = 30; - * @return {?proto.lnrpc.ChannelConstraints} - */ -proto.lnrpc.Channel.prototype.getRemoteConstraints = function() { - return /** @type{?proto.lnrpc.ChannelConstraints} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 30)); -}; - - -/** - * @param {?proto.lnrpc.ChannelConstraints|undefined} value - * @return {!proto.lnrpc.Channel} returns this -*/ -proto.lnrpc.Channel.prototype.setRemoteConstraints = function(value) { - return jspb.Message.setWrapperField(this, 30, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Channel} returns this - */ -proto.lnrpc.Channel.prototype.clearRemoteConstraints = function() { - return this.setRemoteConstraints(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @return {!proto.lnrpc.HTLC} returns this */ -proto.lnrpc.Channel.prototype.hasRemoteConstraints = function() { - return jspb.Message.getField(this, 30) != null; +proto.lnrpc.HTLC.prototype.setForwardingHtlcIndex = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; @@ -12077,8 +12826,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelConstraints.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelConstraints.toObject(opt_includeInstance, this); }; @@ -12087,17 +12836,18 @@ proto.lnrpc.ListChannelsRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelConstraints} 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.ChannelConstraints.toObject = function(includeInstance, msg) { var f, obj = { - activeOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - inactiveOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - publicOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - privateOnly: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - peer: msg.getPeer_asB64() + csvDelay: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 2, 0), + dustLimitAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxPendingAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), + minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -12111,23 +12861,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.ChannelConstraints} */ -proto.lnrpc.ListChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelConstraints.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.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.ListChannelsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelConstraints} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsRequest} + * @return {!proto.lnrpc.ChannelConstraints} */ -proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12135,24 +12885,28 @@ 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 = /** @type {number} */ (reader.readUint32()); + msg.setCsvDelay(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInactiveOnly(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanReserveAtoms(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPublicOnly(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setDustLimitAtoms(value); break; case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivateOnly(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPendingAmtMAtoms(value); break; case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPeer(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinHtlcMAtoms(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptedHtlcs(value); break; default: reader.skipField(); @@ -12167,9 +12921,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.ChannelConstraints.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelConstraints.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12177,161 +12931,162 @@ 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.ChannelConstraints} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelConstraints.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActiveOnly(); - if (f) { - writer.writeBool( + f = message.getCsvDelay(); + if (f !== 0) { + writer.writeUint32( 1, f ); } - f = message.getInactiveOnly(); - if (f) { - writer.writeBool( + f = message.getChanReserveAtoms(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getPublicOnly(); - if (f) { - writer.writeBool( + f = message.getDustLimitAtoms(); + if (f !== 0) { + writer.writeUint64( 3, f ); } - f = message.getPrivateOnly(); - if (f) { - writer.writeBool( + f = message.getMaxPendingAmtMAtoms(); + if (f !== 0) { + writer.writeUint64( 4, f ); } - f = message.getPeer_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getMinHtlcMAtoms(); + if (f !== 0) { + writer.writeUint64( 5, f ); } + f = message.getMaxAcceptedHtlcs(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional bool active_only = 1; - * @return {boolean} + * optional uint32 csv_delay = 1; + * @return {number} */ -proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.ChannelConstraints.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelConstraints} returns this */ -proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.ChannelConstraints.prototype.setCsvDelay = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bool inactive_only = 2; - * @return {boolean} + * optional uint64 chan_reserve_atoms = 2; + * @return {number} */ -proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.lnrpc.ChannelConstraints.prototype.getChanReserveAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelConstraints} returns this */ -proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.lnrpc.ChannelConstraints.prototype.setChanReserveAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bool public_only = 3; - * @return {boolean} + * optional uint64 dust_limit_atoms = 3; + * @return {number} */ -proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.lnrpc.ChannelConstraints.prototype.getDustLimitAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelConstraints} returns this */ -proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.lnrpc.ChannelConstraints.prototype.setDustLimitAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional bool private_only = 4; - * @return {boolean} + * optional uint64 max_pending_amt_m_atoms = 4; + * @return {number} */ -proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.lnrpc.ChannelConstraints.prototype.getMaxPendingAmtMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelConstraints} returns this */ -proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); +proto.lnrpc.ChannelConstraints.prototype.setMaxPendingAmtMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional bytes peer = 5; - * @return {!(string|Uint8Array)} + * optional uint64 min_htlc_m_atoms = 5; + * @return {number} */ -proto.lnrpc.ListChannelsRequest.prototype.getPeer = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.ChannelConstraints.prototype.getMinHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * optional bytes peer = 5; - * This is a type-conversion wrapper around `getPeer()` - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.ChannelConstraints} returns this */ -proto.lnrpc.ListChannelsRequest.prototype.getPeer_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPeer())); +proto.lnrpc.ChannelConstraints.prototype.setMinHtlcMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * 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} + * optional uint32 max_accepted_htlcs = 6; + * @return {number} */ -proto.lnrpc.ListChannelsRequest.prototype.getPeer_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPeer())); +proto.lnrpc.ChannelConstraints.prototype.getMaxAcceptedHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ListChannelsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelConstraints} returns this */ -proto.lnrpc.ListChannelsRequest.prototype.setPeer = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.lnrpc.ChannelConstraints.prototype.setMaxAcceptedHtlcs = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -12341,7 +13096,7 @@ proto.lnrpc.ListChannelsRequest.prototype.setPeer = function(value) { * @private {!Array} * @const */ -proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; +proto.lnrpc.Channel.repeatedFields_ = [15]; @@ -12358,8 +13113,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.Channel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Channel.toObject(opt_includeInstance, this); }; @@ -12368,14 +13123,45 @@ proto.lnrpc.ListChannelsResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. 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.Channel} 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.Channel.toObject = function(includeInstance, msg) { var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.Channel.toObject, includeInstance) + active: jspb.Message.getBooleanFieldWithDefault(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), + commitSize: jspb.Message.getFieldWithDefault(msg, 9, 0), + feePerKb: jspb.Message.getFieldWithDefault(msg, 10, 0), + unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, 0), + totalAtomsSent: jspb.Message.getFieldWithDefault(msg, 12, 0), + totalAtomsReceived: 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.getBooleanFieldWithDefault(msg, 17, false), + initiator: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), + localChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 20, 0), + remoteChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 21, 0), + staticRemoteKey: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), + commitmentType: jspb.Message.getFieldWithDefault(msg, 26, 0), + chanReestablishWaitTimeMs: jspb.Message.getFieldWithDefault(msg, 900, 0), + shortChanId: jspb.Message.getFieldWithDefault(msg, 901, ""), + lifetime: jspb.Message.getFieldWithDefault(msg, 23, 0), + uptime: jspb.Message.getFieldWithDefault(msg, 24, 0), + closeAddress: jspb.Message.getFieldWithDefault(msg, 25, ""), + pushAmountAtoms: 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) { @@ -12389,195 +13175,23 @@ 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} - */ -proto.lnrpc.ListChannelsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.ListChannelsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsResponse} - */ -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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ListChannelsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsResponse.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.ListChannelsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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 - * @return {!proto.lnrpc.ListChannelsResponse} returns this -*/ -proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListChannelsResponse} returns this - */ -proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { - return this.setChannelsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelCloseSummary.repeatedFields_ = [13]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelCloseSummary.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), - 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) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelCloseSummary} - */ -proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { +proto.lnrpc.Channel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelCloseSummary; - return proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Channel; + return proto.lnrpc.Channel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelCloseSummary} msg The message object to deserialize into. + * @param {!proto.lnrpc.Channel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseSummary} + * @return {!proto.lnrpc.Channel} */ -proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12585,57 +13199,135 @@ proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setActive(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRemotePubkey(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setChainHash(value); + msg.setChannelPoint(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxHash(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePubkey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCapacity(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); + msg.setLocalBalance(value); break; case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCloseHeight(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteBalance(value); break; case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setSettledBalance(value); + msg.setCommitFee(value); break; case 9: var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeLockedBalance(value); + msg.setCommitSize(value); break; case 10: - var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); - msg.setCloseType(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeePerKb(value); break; case 11: - var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); - msg.setOpenInitiator(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnsettledBalance(value); break; case 12: - var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); - msg.setCloseInitiator(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalAtomsSent(value); break; case 13: - var value = new proto.lnrpc.Resolution; - reader.readMessage(value,proto.lnrpc.Resolution.deserializeBinaryFromReader); - msg.addResolutions(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalAtomsReceived(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.setLocalChanReserveAtoms(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteChanReserveAtoms(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 900: + var value = /** @type {number} */ (reader.readInt64()); + msg.setChanReestablishWaitTimeMs(value); + break; + case 901: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChanId(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.setPushAmountAtoms(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(); @@ -12650,9 +13342,9 @@ proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { +proto.lnrpc.Channel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); + proto.lnrpc.Channel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12660,641 +13352,873 @@ proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelCloseSummary} message + * @param {!proto.lnrpc.Channel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( + f = message.getActive(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getRemotePubkey(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getChainHash(); + f = message.getChannelPoint(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getClosingTxHash(); - if (f.length > 0) { - writer.writeString( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( + f = message.getCapacity(); + if (f !== 0) { + writer.writeInt64( 5, f ); } - f = message.getCapacity(); + f = message.getLocalBalance(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getCloseHeight(); + f = message.getRemoteBalance(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 7, f ); } - f = message.getSettledBalance(); + f = message.getCommitFee(); if (f !== 0) { writer.writeInt64( 8, f ); } - f = message.getTimeLockedBalance(); + f = message.getCommitSize(); if (f !== 0) { writer.writeInt64( 9, f ); } - f = message.getCloseType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getFeePerKb(); + if (f !== 0) { + writer.writeInt64( 10, f ); } - f = message.getOpenInitiator(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getUnsettledBalance(); + if (f !== 0) { + writer.writeInt64( 11, f ); } - f = message.getCloseInitiator(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getTotalAtomsSent(); + if (f !== 0) { + writer.writeInt64( 12, f ); } - f = message.getResolutionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getTotalAtomsReceived(); + if (f !== 0) { + writer.writeInt64( 13, - f, - proto.lnrpc.Resolution.serializeBinaryToWriter + 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.getLocalChanReserveAtoms(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getRemoteChanReserveAtoms(); + 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.getChanReestablishWaitTimeMs(); + if (f !== 0) { + writer.writeInt64( + 900, + f + ); + } + f = message.getShortChanId(); + if (f.length > 0) { + writer.writeString( + 901, + 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.getPushAmountAtoms(); + 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 ); } }; /** - * @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 active = 1; + * @return {boolean} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Channel.prototype.getActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @param {boolean} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.Channel.prototype.setActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional uint64 chan_id = 2; + * optional string remote_pubkey = 2; * @return {string} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.lnrpc.Channel.prototype.getRemotePubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); +proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string chain_hash = 3; + * optional string channel_point = 3; * @return {string} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChainHash = function() { +proto.lnrpc.Channel.prototype.getChannelPoint = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { +proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional string closing_tx_hash = 4; + * optional uint64 chan_id = 4; * @return {string} */ -proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.Channel.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; /** * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.lnrpc.Channel.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 4, value); }; /** - * optional string remote_pubkey = 5; - * @return {string} + * optional int64 capacity = 5; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.Channel.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.Channel.prototype.setCapacity = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 capacity = 6; + * optional int64 local_balance = 6; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { +proto.lnrpc.Channel.prototype.getLocalBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { +proto.lnrpc.Channel.prototype.setLocalBalance = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional uint32 close_height = 7; + * optional int64 remote_balance = 7; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseHeight = function() { +proto.lnrpc.Channel.prototype.getRemoteBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { +proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional int64 settled_balance = 8; + * optional int64 commit_fee = 8; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { +proto.lnrpc.Channel.prototype.getCommitFee = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { +proto.lnrpc.Channel.prototype.setCommitFee = function(value) { return jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional int64 time_locked_balance = 9; + * optional int64 commit_size = 9; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { +proto.lnrpc.Channel.prototype.getCommitSize = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { +proto.lnrpc.Channel.prototype.setCommitSize = function(value) { return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional ClosureType close_type = 10; - * @return {!proto.lnrpc.ChannelCloseSummary.ClosureType} + * optional int64 fee_per_kb = 10; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseType = function() { - return /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.Channel.prototype.getFeePerKb = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * @param {!proto.lnrpc.ChannelCloseSummary.ClosureType} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); +proto.lnrpc.Channel.prototype.setFeePerKb = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); }; /** - * optional Initiator open_initiator = 11; - * @return {!proto.lnrpc.Initiator} + * optional int64 unsettled_balance = 11; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getOpenInitiator = function() { - return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.Channel.prototype.getUnsettledBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** - * @param {!proto.lnrpc.Initiator} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setOpenInitiator = function(value) { - return jspb.Message.setProto3EnumField(this, 11, value); +proto.lnrpc.Channel.prototype.setUnsettledBalance = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * optional Initiator close_initiator = 12; - * @return {!proto.lnrpc.Initiator} + * optional int64 total_atoms_sent = 12; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseInitiator = function() { - return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.Channel.prototype.getTotalAtomsSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; /** - * @param {!proto.lnrpc.Initiator} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseInitiator = function(value) { - return jspb.Message.setProto3EnumField(this, 12, value); +proto.lnrpc.Channel.prototype.setTotalAtomsSent = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); }; /** - * repeated Resolution resolutions = 13; - * @return {!Array} + * optional int64 total_atoms_received = 13; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getResolutionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Resolution, 13)); +proto.lnrpc.Channel.prototype.getTotalAtomsReceived = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelCloseSummary} returns this -*/ -proto.lnrpc.ChannelCloseSummary.prototype.setResolutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 13, value); + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setTotalAtomsReceived = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); }; /** - * @param {!proto.lnrpc.Resolution=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Resolution} + * optional uint64 num_updates = 14; + * @return {number} */ -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.Channel.prototype.getNumUpdates = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelCloseSummary} returns this + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.ChannelCloseSummary.prototype.clearResolutionsList = function() { - return this.setResolutionsList([]); +proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * repeated HTLC pending_htlcs = 15; + * @return {!Array} */ -proto.lnrpc.Resolution.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Resolution.toObject(opt_includeInstance, this); +proto.lnrpc.Channel.prototype.getPendingHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLC, 15)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.Resolution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.Resolution.toObject = function(includeInstance, msg) { - var f, obj = { - resolutionType: jspb.Message.getFieldWithDefault(msg, 1, 0), - outcome: jspb.Message.getFieldWithDefault(msg, 2, 0), - outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), - amountAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), - sweepTxid: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {!Array} value + * @return {!proto.lnrpc.Channel} returns this +*/ +proto.lnrpc.Channel.prototype.setPendingHtlcsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 15, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Resolution} + * @param {!proto.lnrpc.HTLC=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.HTLC} */ -proto.lnrpc.Resolution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Resolution; - return proto.lnrpc.Resolution.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Channel.prototype.addPendingHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.lnrpc.HTLC, opt_index); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Resolution} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Resolution} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.Resolution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - 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 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmountAtoms(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSweepTxid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Channel.prototype.clearPendingHtlcsList = function() { + return this.setPendingHtlcsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 csv_delay = 16; + * @return {number} */ -proto.lnrpc.Resolution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Resolution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Channel.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Resolution} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.Resolution.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getResolutionType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - 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.getAmountAtoms(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getSweepTxid(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } +proto.lnrpc.Channel.prototype.setCsvDelay = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); }; /** - * optional ResolutionType resolution_type = 1; - * @return {!proto.lnrpc.ResolutionType} + * optional bool private = 17; + * @return {boolean} */ -proto.lnrpc.Resolution.prototype.getResolutionType = function() { - return /** @type {!proto.lnrpc.ResolutionType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.Channel.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); }; /** - * @param {!proto.lnrpc.ResolutionType} value - * @return {!proto.lnrpc.Resolution} returns this + * @param {boolean} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.Resolution.prototype.setResolutionType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.lnrpc.Channel.prototype.setPrivate = function(value) { + return jspb.Message.setProto3BooleanField(this, 17, value); }; /** - * optional ResolutionOutcome outcome = 2; - * @return {!proto.lnrpc.ResolutionOutcome} + * optional bool initiator = 18; + * @return {boolean} */ -proto.lnrpc.Resolution.prototype.getOutcome = function() { - return /** @type {!proto.lnrpc.ResolutionOutcome} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.Channel.prototype.getInitiator = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); }; /** - * @param {!proto.lnrpc.ResolutionOutcome} value - * @return {!proto.lnrpc.Resolution} returns this + * @param {boolean} value + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.Resolution.prototype.setOutcome = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); +proto.lnrpc.Channel.prototype.setInitiator = function(value) { + return jspb.Message.setProto3BooleanField(this, 18, value); }; /** - * optional OutPoint outpoint = 3; - * @return {?proto.lnrpc.OutPoint} + * optional string chan_status_flags = 19; + * @return {string} */ -proto.lnrpc.Resolution.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 3)); +proto.lnrpc.Channel.prototype.getChanStatusFlags = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); }; /** - * @param {?proto.lnrpc.OutPoint|undefined} value - * @return {!proto.lnrpc.Resolution} returns this -*/ -proto.lnrpc.Resolution.prototype.setOutpoint = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {string} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setChanStatusFlags = function(value) { + return jspb.Message.setProto3StringField(this, 19, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Resolution} returns this + * optional int64 local_chan_reserve_atoms = 20; + * @return {number} */ -proto.lnrpc.Resolution.prototype.clearOutpoint = function() { - return this.setOutpoint(undefined); +proto.lnrpc.Channel.prototype.getLocalChanReserveAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); }; /** - * Returns whether this field is set. + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setLocalChanReserveAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional int64 remote_chan_reserve_atoms = 21; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getRemoteChanReserveAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setRemoteChanReserveAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 21, value); +}; + + +/** + * optional bool static_remote_key = 22; * @return {boolean} */ -proto.lnrpc.Resolution.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.Channel.prototype.getStaticRemoteKey = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); }; /** - * optional uint64 amount_atoms = 4; + * @param {boolean} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setStaticRemoteKey = function(value) { + return jspb.Message.setProto3BooleanField(this, 22, value); +}; + + +/** + * optional CommitmentType commitment_type = 26; + * @return {!proto.lnrpc.CommitmentType} + */ +proto.lnrpc.Channel.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 26, 0)); +}; + + +/** + * @param {!proto.lnrpc.CommitmentType} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setCommitmentType = function(value) { + return jspb.Message.setProto3EnumField(this, 26, value); +}; + + +/** + * optional int64 chan_reestablish_wait_time_ms = 900; * @return {number} */ -proto.lnrpc.Resolution.prototype.getAmountAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.Channel.prototype.getChanReestablishWaitTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 900, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Resolution} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.Resolution.prototype.setAmountAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.Channel.prototype.setChanReestablishWaitTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 900, value); }; /** - * optional string sweep_txid = 5; + * optional string short_chan_id = 901; * @return {string} */ -proto.lnrpc.Resolution.prototype.getSweepTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.Channel.prototype.getShortChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 901, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.Resolution} returns this + * @return {!proto.lnrpc.Channel} returns this */ -proto.lnrpc.Resolution.prototype.setSweepTxid = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.Channel.prototype.setShortChanId = function(value) { + return jspb.Message.setProto3StringField(this, 901, value); +}; + + +/** + * optional int64 lifetime = 23; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getLifetime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setLifetime = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); +}; + + +/** + * optional int64 uptime = 24; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getUptime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setUptime = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + +/** + * optional string close_address = 25; + * @return {string} + */ +proto.lnrpc.Channel.prototype.getCloseAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setCloseAddress = function(value) { + return jspb.Message.setProto3StringField(this, 25, value); +}; + + +/** + * optional uint64 push_amount_atoms = 27; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getPushAmountAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 27, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setPushAmountAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 27, value); +}; + + +/** + * optional uint32 thaw_height = 28; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getThawHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 28, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setThawHeight = function(value) { + return jspb.Message.setProto3IntField(this, 28, value); +}; + + +/** + * optional ChannelConstraints local_constraints = 29; + * @return {?proto.lnrpc.ChannelConstraints} + */ +proto.lnrpc.Channel.prototype.getLocalConstraints = function() { + return /** @type{?proto.lnrpc.ChannelConstraints} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 29)); +}; + + +/** + * @param {?proto.lnrpc.ChannelConstraints|undefined} value + * @return {!proto.lnrpc.Channel} returns this +*/ +proto.lnrpc.Channel.prototype.setLocalConstraints = function(value) { + return jspb.Message.setWrapperField(this, 29, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.clearLocalConstraints = function() { + return this.setLocalConstraints(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Channel.prototype.hasLocalConstraints = function() { + return jspb.Message.getField(this, 29) != null; +}; + + +/** + * optional ChannelConstraints remote_constraints = 30; + * @return {?proto.lnrpc.ChannelConstraints} + */ +proto.lnrpc.Channel.prototype.getRemoteConstraints = function() { + return /** @type{?proto.lnrpc.ChannelConstraints} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 30)); +}; + + +/** + * @param {?proto.lnrpc.ChannelConstraints|undefined} value + * @return {!proto.lnrpc.Channel} returns this +*/ +proto.lnrpc.Channel.prototype.setRemoteConstraints = function(value) { + return jspb.Message.setWrapperField(this, 30, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.clearRemoteConstraints = function() { + return this.setRemoteConstraints(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Channel.prototype.hasRemoteConstraints = function() { + return jspb.Message.getField(this, 30) != null; }; @@ -13314,8 +14238,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ClosedChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ListChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListChannelsRequest.toObject(opt_includeInstance, this); }; @@ -13324,18 +14248,17 @@ proto.lnrpc.ClosedChannelsRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ListChannelsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ListChannelsRequest.toObject = function(includeInstance, msg) { var f, obj = { - cooperative: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - localForce: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - remoteForce: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - breach: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - fundingCanceled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - abandoned: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + activeOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + inactiveOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + publicOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + privateOnly: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + peer: msg.getPeer_asB64() }; if (includeInstance) { @@ -13349,23 +14272,23 @@ proto.lnrpc.ClosedChannelsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelsRequest} + * @return {!proto.lnrpc.ListChannelsRequest} */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ListChannelsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelsRequest; - return proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListChannelsRequest; + return proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListChannelsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsRequest} + * @return {!proto.lnrpc.ListChannelsRequest} */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13374,27 +14297,23 @@ proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setCooperative(value); + msg.setActiveOnly(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); - msg.setLocalForce(value); + msg.setInactiveOnly(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); - msg.setRemoteForce(value); + msg.setPublicOnly(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); - msg.setBreach(value); + msg.setPrivateOnly(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 = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPeer(value); break; default: reader.skipField(); @@ -13409,9 +14328,9 @@ proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ClosedChannelsRequest.prototype.serializeBinary = function() { +proto.lnrpc.ListChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13419,162 +14338,161 @@ proto.lnrpc.ClosedChannelsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelsRequest} message + * @param {!proto.lnrpc.ListChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCooperative(); + f = message.getActiveOnly(); if (f) { writer.writeBool( 1, f ); } - f = message.getLocalForce(); + f = message.getInactiveOnly(); if (f) { writer.writeBool( 2, f ); } - f = message.getRemoteForce(); + f = message.getPublicOnly(); if (f) { writer.writeBool( 3, f ); } - f = message.getBreach(); + f = message.getPrivateOnly(); if (f) { writer.writeBool( 4, f ); } - f = message.getFundingCanceled(); - if (f) { - writer.writeBool( + f = message.getPeer_asU8(); + if (f.length > 0) { + writer.writeBytes( 5, f ); } - f = message.getAbandoned(); - if (f) { - writer.writeBool( - 6, - f - ); - } }; /** - * optional bool cooperative = 1; + * optional bool active_only = 1; * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getCooperative = function() { +proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + * @return {!proto.lnrpc.ListChannelsRequest} returns this */ -proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional bool local_force = 2; + * optional bool inactive_only = 2; * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getLocalForce = function() { +proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + * @return {!proto.lnrpc.ListChannelsRequest} returns this */ -proto.lnrpc.ClosedChannelsRequest.prototype.setLocalForce = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bool remote_force = 3; + * optional bool public_only = 3; * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getRemoteForce = function() { +proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + * @return {!proto.lnrpc.ListChannelsRequest} returns this */ -proto.lnrpc.ClosedChannelsRequest.prototype.setRemoteForce = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional bool breach = 4; + * optional bool private_only = 4; * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getBreach = function() { +proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + * @return {!proto.lnrpc.ListChannelsRequest} returns this */ -proto.lnrpc.ClosedChannelsRequest.prototype.setBreach = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional bool funding_canceled = 5; - * @return {boolean} + * optional bytes peer = 5; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getFundingCanceled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.lnrpc.ListChannelsRequest.prototype.getPeer = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + * optional bytes peer = 5; + * This is a type-conversion wrapper around `getPeer()` + * @return {string} */ -proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.lnrpc.ListChannelsRequest.prototype.getPeer_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeer())); }; /** - * optional bool abandoned = 6; - * @return {boolean} + * 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.ClosedChannelsRequest.prototype.getAbandoned = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.lnrpc.ListChannelsRequest.prototype.getPeer_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeer())); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ListChannelsRequest} returns this */ -proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.lnrpc.ListChannelsRequest.prototype.setPeer = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -13584,7 +14502,7 @@ proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = function(value) { * @private {!Array} * @const */ -proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; +proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; @@ -13601,8 +14519,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ListChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListChannelsResponse.toObject(opt_includeInstance, this); }; @@ -13611,14 +14529,14 @@ proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ListChannelsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ListChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) + proto.lnrpc.Channel.toObject, includeInstance) }; if (includeInstance) { @@ -13632,32 +14550,32 @@ proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelsResponse} + * @return {!proto.lnrpc.ListChannelsResponse} */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListChannelsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelsResponse; - return proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListChannelsResponse; + return proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListChannelsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsResponse} + * @return {!proto.lnrpc.ListChannelsResponse} */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.lnrpc.ChannelCloseSummary; - reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); + case 11: + var value = new proto.lnrpc.Channel; + reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); msg.addChannels(value); break; default: @@ -13673,9 +14591,9 @@ proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { +proto.lnrpc.ListChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13683,57 +14601,57 @@ proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelsResponse} message + * @param {!proto.lnrpc.ListChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getChannelsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 1, + 11, f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter + proto.lnrpc.Channel.serializeBinaryToWriter ); } }; /** - * repeated ChannelCloseSummary channels = 1; - * @return {!Array} + * repeated Channel channels = 11; + * @return {!Array} */ -proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); +proto.lnrpc.ListChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Channel, 11)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ClosedChannelsResponse} returns this + * @param {!Array} value + * @return {!proto.lnrpc.ListChannelsResponse} returns this */ -proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; /** - * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value + * @param {!proto.lnrpc.Channel=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelCloseSummary} + * @return {!proto.lnrpc.Channel} */ -proto.lnrpc.ClosedChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelCloseSummary, opt_index); +proto.lnrpc.ListChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.lnrpc.Channel, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ClosedChannelsResponse} returns this + * @return {!proto.lnrpc.ListChannelsResponse} returns this */ -proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { +proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { return this.setChannelsList([]); }; @@ -13744,7 +14662,7 @@ proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { * @private {!Array} * @const */ -proto.lnrpc.Peer.repeatedFields_ = [12]; +proto.lnrpc.ChannelCloseSummary.repeatedFields_ = [13]; @@ -13761,8 +14679,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Peer.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelCloseSummary.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelCloseSummary.toObject(opt_includeInstance, this); }; @@ -13771,24 +14689,27 @@ proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Peer} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelCloseSummary} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Peer.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 3, ""), - bytesSent: jspb.Message.getFieldWithDefault(msg, 4, 0), - bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), - atomsSent: jspb.Message.getFieldWithDefault(msg, 6, 0), - atomsRecv: jspb.Message.getFieldWithDefault(msg, 7, 0), - inbound: jspb.Message.getBooleanFieldWithDefault(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) + channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), + shortChanId: jspb.Message.getFieldWithDefault(msg, 900, ""), + 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) { @@ -13802,23 +14723,23 @@ proto.lnrpc.Peer.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Peer} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.Peer.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Peer; - return proto.lnrpc.Peer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelCloseSummary; + return proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Peer} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelCloseSummary} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Peer} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13827,50 +14748,60 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + msg.setChannelPoint(value); + break; + case 900: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChanId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + msg.setChainHash(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBytesSent(value); + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxHash(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBytesRecv(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRemotePubkey(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setAtomsSent(value); + msg.setCapacity(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAtomsRecv(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCloseHeight(value); break; case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInbound(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setSettledBalance(value); break; case 9: var value = /** @type {number} */ (reader.readInt64()); - msg.setPingTime(value); + msg.setTimeLockedBalance(value); break; case 10: - var value = /** @type {!proto.lnrpc.Peer.SyncType} */ (reader.readEnum()); - msg.setSyncType(value); + var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); + msg.setCloseType(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, new proto.lnrpc.Feature()); - }); + var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); + msg.setOpenInitiator(value); break; case 12: - var value = new proto.lnrpc.TimestampedError; - reader.readMessage(value,proto.lnrpc.TimestampedError.deserializeBinaryFromReader); - msg.addErrors(value); + 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(); @@ -13885,9 +14816,9 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Peer.prototype.serializeBinary = function() { +proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13895,85 +14826,109 @@ proto.lnrpc.Peer.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Peer} message + * @param {!proto.lnrpc.ChannelCloseSummary} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getChannelPoint(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAddress(); + f = message.getShortChanId(); + if (f.length > 0) { + writer.writeString( + 900, + 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.getBytesSent(); - if (f !== 0) { - writer.writeUint64( + f = message.getClosingTxHash(); + if (f.length > 0) { + writer.writeString( 4, f ); } - f = message.getBytesRecv(); - if (f !== 0) { - writer.writeUint64( + f = message.getRemotePubkey(); + if (f.length > 0) { + writer.writeString( 5, f ); } - f = message.getAtomsSent(); + f = message.getCapacity(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getAtomsRecv(); + f = message.getCloseHeight(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 7, f ); } - f = message.getInbound(); - if (f) { - writer.writeBool( + f = message.getSettledBalance(); + if (f !== 0) { + writer.writeInt64( 8, f ); } - f = message.getPingTime(); + f = message.getTimeLockedBalance(); if (f !== 0) { writer.writeInt64( 9, f ); } - f = message.getSyncType(); + f = message.getCloseType(); 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.getOpenInitiator(); + if (f !== 0.0) { + writer.writeEnum( + 11, + f + ); } - f = message.getErrorsList(); + f = message.getCloseInitiator(); + if (f !== 0.0) { + writer.writeEnum( + 12, + f + ); + } + f = message.getResolutionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 12, + 13, f, - proto.lnrpc.TimestampedError.serializeBinaryToWriter + proto.lnrpc.Resolution.serializeBinaryToWriter ); } }; @@ -13982,231 +14937,284 @@ proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { /** * @enum {number} */ -proto.lnrpc.Peer.SyncType = { - UNKNOWN_SYNC: 0, - ACTIVE_SYNC: 1, - PASSIVE_SYNC: 2 +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 pub_key = 1; + * optional string channel_point = 1; * @return {string} */ -proto.lnrpc.Peer.prototype.getPubKey = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getChannelPoint = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.Peer} returns this + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setPubKey = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string address = 3; + * optional string short_chan_id = 900; * @return {string} */ -proto.lnrpc.Peer.prototype.getAddress = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getShortChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 900, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this + */ +proto.lnrpc.ChannelCloseSummary.prototype.setShortChanId = function(value) { + return jspb.Message.setProto3StringField(this, 900, value); +}; + + +/** + * optional uint64 chan_id = 2; + * @return {string} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this + */ +proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { + return 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 - * @return {!proto.lnrpc.Peer} returns this + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setAddress = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional uint64 bytes_sent = 4; - * @return {number} + * optional string closing_tx_hash = 4; + * @return {string} */ -proto.lnrpc.Peer.prototype.getBytesSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this + * @param {string} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setBytesSent = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional uint64 bytes_recv = 5; - * @return {number} + * optional string remote_pubkey = 5; + * @return {string} */ -proto.lnrpc.Peer.prototype.getBytesRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.Peer} returns this + * @param {string} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional int64 atoms_sent = 6; + * optional int64 capacity = 6; * @return {number} */ -proto.lnrpc.Peer.prototype.getAtomsSent = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Peer} returns this + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setAtomsSent = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional int64 atoms_recv = 7; + * optional uint32 close_height = 7; * @return {number} */ -proto.lnrpc.Peer.prototype.getAtomsRecv = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getCloseHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Peer} returns this + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setAtomsRecv = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional bool inbound = 8; - * @return {boolean} + * optional int64 settled_balance = 8; + * @return {number} */ -proto.lnrpc.Peer.prototype.getInbound = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Peer} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setInbound = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional int64 ping_time = 9; + * optional int64 time_locked_balance = 9; * @return {number} */ -proto.lnrpc.Peer.prototype.getPingTime = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Peer} returns this + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setPingTime = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional SyncType sync_type = 10; - * @return {!proto.lnrpc.Peer.SyncType} + * optional ClosureType close_type = 10; + * @return {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ -proto.lnrpc.Peer.prototype.getSyncType = function() { - return /** @type {!proto.lnrpc.Peer.SyncType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.ChannelCloseSummary.prototype.getCloseType = function() { + return /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * @param {!proto.lnrpc.Peer.SyncType} value - * @return {!proto.lnrpc.Peer} returns this + * @param {!proto.lnrpc.ChannelCloseSummary.ClosureType} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setSyncType = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { return jspb.Message.setProto3EnumField(this, 10, value); }; /** - * map features = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional Initiator open_initiator = 11; + * @return {!proto.lnrpc.Initiator} */ -proto.lnrpc.Peer.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - proto.lnrpc.Feature)); +proto.lnrpc.ChannelCloseSummary.prototype.getOpenInitiator = function() { + return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Peer} returns this + * @param {!proto.lnrpc.Initiator} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; +proto.lnrpc.ChannelCloseSummary.prototype.setOpenInitiator = function(value) { + return jspb.Message.setProto3EnumField(this, 11, value); +}; /** - * repeated TimestampedError errors = 12; - * @return {!Array} + * optional Initiator close_initiator = 12; + * @return {!proto.lnrpc.Initiator} */ -proto.lnrpc.Peer.prototype.getErrorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.TimestampedError, 12)); +proto.lnrpc.ChannelCloseSummary.prototype.getCloseInitiator = function() { + return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.Peer} returns this + * @param {!proto.lnrpc.Initiator} value + * @return {!proto.lnrpc.ChannelCloseSummary} returns this + */ +proto.lnrpc.ChannelCloseSummary.prototype.setCloseInitiator = function(value) { + return 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 + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.setErrorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); +proto.lnrpc.ChannelCloseSummary.prototype.setResolutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; /** - * @param {!proto.lnrpc.TimestampedError=} opt_value + * @param {!proto.lnrpc.Resolution=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.TimestampedError} + * @return {!proto.lnrpc.Resolution} */ -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.ChannelCloseSummary.prototype.addResolutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.lnrpc.Resolution, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Peer} returns this + * @return {!proto.lnrpc.ChannelCloseSummary} returns this */ -proto.lnrpc.Peer.prototype.clearErrorsList = function() { - return this.setErrorsList([]); +proto.lnrpc.ChannelCloseSummary.prototype.clearResolutionsList = function() { + return this.setResolutionsList([]); }; @@ -14226,8 +15234,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.TimestampedError.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.TimestampedError.toObject(opt_includeInstance, this); +proto.lnrpc.Resolution.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Resolution.toObject(opt_includeInstance, this); }; @@ -14236,14 +15244,17 @@ proto.lnrpc.TimestampedError.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.TimestampedError} 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.TimestampedError.toObject = function(includeInstance, msg) { +proto.lnrpc.Resolution.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - error: jspb.Message.getFieldWithDefault(msg, 2, "") + resolutionType: jspb.Message.getFieldWithDefault(msg, 1, 0), + outcome: jspb.Message.getFieldWithDefault(msg, 2, 0), + outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), + amountAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), + sweepTxid: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { @@ -14257,23 +15268,23 @@ proto.lnrpc.TimestampedError.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.TimestampedError} + * @return {!proto.lnrpc.Resolution} */ -proto.lnrpc.TimestampedError.deserializeBinary = function(bytes) { +proto.lnrpc.Resolution.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.TimestampedError; - return proto.lnrpc.TimestampedError.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.TimestampedError} 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.TimestampedError} + * @return {!proto.lnrpc.Resolution} */ -proto.lnrpc.TimestampedError.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Resolution.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14281,12 +15292,25 @@ proto.lnrpc.TimestampedError.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(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 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmountAtoms(value); + break; + case 5: var value = /** @type {string} */ (reader.readString()); - msg.setError(value); + msg.setSweepTxid(value); break; default: reader.skipField(); @@ -14301,9 +15325,9 @@ proto.lnrpc.TimestampedError.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.TimestampedError.prototype.serializeBinary = function() { +proto.lnrpc.Resolution.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.TimestampedError.serializeBinaryToWriter(this, writer); + proto.lnrpc.Resolution.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14311,23 +15335,45 @@ proto.lnrpc.TimestampedError.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.TimestampedError} message + * @param {!proto.lnrpc.Resolution} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Resolution.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); + f = message.getResolutionType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + 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.getAmountAtoms(); if (f !== 0) { writer.writeUint64( - 1, + 4, f ); } - f = message.getError(); + f = message.getSweepTxid(); if (f.length > 0) { writer.writeString( - 2, + 5, f ); } @@ -14335,179 +15381,115 @@ proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) /** - * optional uint64 timestamp = 1; - * @return {number} + * optional ResolutionType resolution_type = 1; + * @return {!proto.lnrpc.ResolutionType} */ -proto.lnrpc.TimestampedError.prototype.getTimestamp = 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 - * @return {!proto.lnrpc.TimestampedError} returns this + * @param {!proto.lnrpc.ResolutionType} value + * @return {!proto.lnrpc.Resolution} returns this */ -proto.lnrpc.TimestampedError.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.Resolution.prototype.setResolutionType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional string error = 2; - * @return {string} + * optional ResolutionOutcome outcome = 2; + * @return {!proto.lnrpc.ResolutionOutcome} */ -proto.lnrpc.TimestampedError.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Resolution.prototype.getOutcome = function() { + return /** @type {!proto.lnrpc.ResolutionOutcome} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.TimestampedError} returns this + * @param {!proto.lnrpc.ResolutionOutcome} value + * @return {!proto.lnrpc.Resolution} returns this */ -proto.lnrpc.TimestampedError.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.Resolution.prototype.setOutcome = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional OutPoint outpoint = 3; + * @return {?proto.lnrpc.OutPoint} */ -proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPeersRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Resolution.prototype.getOutpoint = function() { + return /** @type{?proto.lnrpc.OutPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 3)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { - var f, obj = { - latestError: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {?proto.lnrpc.OutPoint|undefined} value + * @return {!proto.lnrpc.Resolution} returns this +*/ +proto.lnrpc.Resolution.prototype.setOutpoint = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPeersRequest} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Resolution} returns this */ -proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPeersRequest; - return proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Resolution.prototype.clearOutpoint = function() { + return this.setOutpoint(undefined); }; /** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPeersRequest} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLatestError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Resolution.prototype.hasOutpoint = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 amount_atoms = 4; + * @return {number} */ -proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Resolution.prototype.getAmountAtoms = 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.ListPeersRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.Resolution} returns this */ -proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLatestError(); - if (f) { - writer.writeBool( - 1, - f - ); - } +proto.lnrpc.Resolution.prototype.setAmountAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional bool latest_error = 1; - * @return {boolean} + * optional string sweep_txid = 5; + * @return {string} */ -proto.lnrpc.ListPeersRequest.prototype.getLatestError = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.Resolution.prototype.getSweepTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListPeersRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.Resolution} returns this */ -proto.lnrpc.ListPeersRequest.prototype.setLatestError = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.Resolution.prototype.setSweepTxid = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -14523,8 +15505,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ClosedChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelsRequest.toObject(opt_includeInstance, this); }; @@ -14533,14 +15515,18 @@ proto.lnrpc.ListPeersResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. 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.ClosedChannelsRequest} 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.ClosedChannelsRequest.toObject = function(includeInstance, msg) { var f, obj = { - peersList: jspb.Message.toObjectList(msg.getPeersList(), - proto.lnrpc.Peer.toObject, includeInstance) + cooperative: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + localForce: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + remoteForce: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + breach: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + fundingCanceled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + abandoned: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -14554,23 +15540,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.ClosedChannelsRequest} */ -proto.lnrpc.ListPeersResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelsRequest.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.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.ListPeersResponse} 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.ListPeersResponse} + * @return {!proto.lnrpc.ClosedChannelsRequest} */ -proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14578,9 +15564,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 {boolean} */ (reader.readBool()); + msg.setCooperative(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLocalForce(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRemoteForce(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBreach(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFundingCanceled(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAbandoned(value); break; default: reader.skipField(); @@ -14595,9 +15600,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.ClosedChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14605,163 +15610,173 @@ 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.ClosedChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPeersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getCooperative(); + if (f) { + writer.writeBool( 1, - f, - proto.lnrpc.Peer.serializeBinaryToWriter + 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 ); } }; /** - * repeated Peer peers = 1; - * @return {!Array} + * optional bool cooperative = 1; + * @return {boolean} */ -proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); +proto.lnrpc.ClosedChannelsRequest.prototype.getCooperative = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ListPeersResponse} returns this -*/ -proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {boolean} value + * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + */ +proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * @param {!proto.lnrpc.Peer=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Peer} + * optional bool local_force = 2; + * @return {boolean} */ -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.ClosedChannelsRequest.prototype.getLocalForce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListPeersResponse} returns this + * @param {boolean} value + * @return {!proto.lnrpc.ClosedChannelsRequest} returns this */ -proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { - return this.setPeersList([]); +proto.lnrpc.ClosedChannelsRequest.prototype.setLocalForce = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; +/** + * optional bool remote_force = 3; + * @return {boolean} + */ +proto.lnrpc.ClosedChannelsRequest.prototype.getRemoteForce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {boolean} value + * @return {!proto.lnrpc.ClosedChannelsRequest} returns this */ -proto.lnrpc.PeerEventSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PeerEventSubscription.toObject(opt_includeInstance, this); +proto.lnrpc.ClosedChannelsRequest.prototype.setRemoteForce = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * optional bool breach = 4; + * @return {boolean} */ -proto.lnrpc.PeerEventSubscription.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.ClosedChannelsRequest.prototype.getBreach = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * @param {boolean} value + * @return {!proto.lnrpc.ClosedChannelsRequest} returns this + */ +proto.lnrpc.ClosedChannelsRequest.prototype.setBreach = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PeerEventSubscription} + * optional bool funding_canceled = 5; + * @return {boolean} */ -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); +proto.lnrpc.ClosedChannelsRequest.prototype.getFundingCanceled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * 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} + * @param {boolean} value + * @return {!proto.lnrpc.ClosedChannelsRequest} returns this */ -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; +proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool abandoned = 6; + * @return {boolean} */ -proto.lnrpc.PeerEventSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ClosedChannelsRequest.prototype.getAbandoned = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * 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 + * @param {boolean} value + * @return {!proto.lnrpc.ClosedChannelsRequest} returns this */ -proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -14777,8 +15792,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PeerEvent.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PeerEvent.toObject(opt_includeInstance, this); +proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelsResponse.toObject(opt_includeInstance, this); }; @@ -14787,14 +15802,14 @@ proto.lnrpc.PeerEvent.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PeerEvent} msg The msg instance to transform. + * @param {!proto.lnrpc.ClosedChannelsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PeerEvent.toObject = function(includeInstance, msg) { +proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0) + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) }; if (includeInstance) { @@ -14808,23 +15823,23 @@ proto.lnrpc.PeerEvent.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PeerEvent} + * @return {!proto.lnrpc.ClosedChannelsResponse} */ -proto.lnrpc.PeerEvent.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PeerEvent; - return proto.lnrpc.PeerEvent.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ClosedChannelsResponse; + return proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PeerEvent} msg The message object to deserialize into. + * @param {!proto.lnrpc.ClosedChannelsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PeerEvent} + * @return {!proto.lnrpc.ClosedChannelsResponse} */ -proto.lnrpc.PeerEvent.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14832,12 +15847,9 @@ proto.lnrpc.PeerEvent.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 2: - var value = /** @type {!proto.lnrpc.PeerEvent.EventType} */ (reader.readEnum()); - msg.setType(value); + var value = new proto.lnrpc.ChannelCloseSummary; + reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); + msg.addChannels(value); break; default: reader.skipField(); @@ -14852,9 +15864,9 @@ proto.lnrpc.PeerEvent.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PeerEvent.prototype.serializeBinary = function() { +proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PeerEvent.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14862,73 +15874,68 @@ proto.lnrpc.PeerEvent.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PeerEvent} message + * @param {!proto.lnrpc.ClosedChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PeerEvent.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getChannelsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f + f, + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter ); } }; /** - * @enum {number} + * repeated ChannelCloseSummary channels = 1; + * @return {!Array} */ -proto.lnrpc.PeerEvent.EventType = { - PEER_ONLINE: 0, - PEER_OFFLINE: 1 +proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); }; + /** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.PeerEvent.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {!Array} value + * @return {!proto.lnrpc.ClosedChannelsResponse} returns this +*/ +proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {string} value - * @return {!proto.lnrpc.PeerEvent} returns this + * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.PeerEvent.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.ClosedChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelCloseSummary, opt_index); }; /** - * optional EventType type = 2; - * @return {!proto.lnrpc.PeerEvent.EventType} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ClosedChannelsResponse} returns this */ -proto.lnrpc.PeerEvent.prototype.getType = function() { - return /** @type {!proto.lnrpc.PeerEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); }; + /** - * @param {!proto.lnrpc.PeerEvent.EventType} value - * @return {!proto.lnrpc.PeerEvent} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.PeerEvent.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - +proto.lnrpc.Peer.repeatedFields_ = [12]; @@ -14945,8 +15952,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Peer.toObject(opt_includeInstance, this); }; @@ -14955,13 +15962,27 @@ proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetInfoRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.Peer} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.Peer.toObject = function(includeInstance, msg) { var f, obj = { - + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 3, ""), + bytesSent: jspb.Message.getFieldWithDefault(msg, 4, 0), + bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), + atomsSent: jspb.Message.getFieldWithDefault(msg, 6, 0), + atomsRecv: jspb.Message.getFieldWithDefault(msg, 7, 0), + inbound: jspb.Message.getBooleanFieldWithDefault(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), + flapCount: jspb.Message.getFieldWithDefault(msg, 13, 0), + lastFlapNs: jspb.Message.getFieldWithDefault(msg, 14, 0), + lastPingPayload: msg.getLastPingPayload_asB64() }; if (includeInstance) { @@ -14975,244 +15996,87 @@ proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetInfoRequest} + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.GetInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Peer.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetInfoRequest; - return proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Peer; + return proto.lnrpc.Peer.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.GetInfoRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.Peer} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetInfoRequest} + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - 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; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GetInfoResponse.repeatedFields_ = [16,12]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GetInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - 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.getBooleanFieldWithDefault(msg, 9, false), - syncedToGraph: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), - testnet: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), - chainsList: jspb.Message.toObjectList(msg.getChainsList(), - proto.lnrpc.Chain.toObject, includeInstance), - urisList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f, - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], - serverActive: jspb.Message.getBooleanFieldWithDefault(msg, 901, false), - routerPruneTarget: jspb.Message.getFieldWithDefault(msg, 902, 0), - routerPruneHeight: jspb.Message.getFieldWithDefault(msg, 903, 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.GetInfoResponse} - */ -proto.lnrpc.GetInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetInfoResponse; - return proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GetInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetInfoResponse} - */ -proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 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 {string} */ (reader.readString()); - msg.setIdentityPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); - break; - case 17: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPendingChannels(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBytesSent(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPeers(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBytesRecv(value); break; case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockHeight(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAtomsSent(value); break; - case 13: + case 7: var value = /** @type {number} */ (reader.readInt64()); - msg.setBestHeaderTimestamp(value); + msg.setAtomsRecv(value); break; - case 9: + case 8: var value = /** @type {boolean} */ (reader.readBool()); - msg.setSyncedToChain(value); + msg.setInbound(value); break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSyncedToGraph(value); + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPingTime(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); + var value = /** @type {!proto.lnrpc.Peer.SyncType} */ (reader.readEnum()); + msg.setSyncType(value); break; - case 19: + 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, new proto.lnrpc.Feature()); }); break; - case 901: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setServerActive(value); + case 12: + var value = new proto.lnrpc.TimestampedError; + reader.readMessage(value,proto.lnrpc.TimestampedError.deserializeBinaryFromReader); + msg.addErrors(value); break; - case 902: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRouterPruneTarget(value); + case 13: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFlapCount(value); break; - case 903: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRouterPruneHeight(value); + case 14: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastFlapNs(value); + break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastPingPayload(value); break; default: reader.skipField(); @@ -15227,9 +16091,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.Peer.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15237,154 +16101,105 @@ 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.Peer} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { var f = undefined; - 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(); + f = message.getPubKey(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getColor(); + f = message.getAddress(); if (f.length > 0) { writer.writeString( - 17, - f - ); - } - f = message.getNumPendingChannels(); - if (f !== 0) { - writer.writeUint32( 3, f ); } - f = message.getNumActiveChannels(); + f = message.getBytesSent(); if (f !== 0) { - writer.writeUint32( + writer.writeUint64( 4, f ); } - f = message.getNumInactiveChannels(); - if (f !== 0) { - writer.writeUint32( - 15, - f - ); - } - f = message.getNumPeers(); + f = message.getBytesRecv(); if (f !== 0) { - writer.writeUint32( + writer.writeUint64( 5, f ); } - f = message.getBlockHeight(); + f = message.getAtomsSent(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 6, f ); } - f = message.getBlockHash(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getBestHeaderTimestamp(); + f = message.getAtomsRecv(); if (f !== 0) { writer.writeInt64( - 13, + 7, f ); } - f = message.getSyncedToChain(); + f = message.getInbound(); if (f) { writer.writeBool( - 9, + 8, f ); } - f = message.getSyncedToGraph(); - if (f) { - writer.writeBool( - 18, + f = message.getPingTime(); + if (f !== 0) { + writer.writeInt64( + 9, f ); } - f = message.getTestnet(); - if (f) { - writer.writeBool( + f = message.getSyncType(); + if (f !== 0.0) { + writer.writeEnum( 10, f ); } - f = message.getChainsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 16, - f, - proto.lnrpc.Chain.serializeBinaryToWriter - ); + 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.getUrisList(); + f = message.getErrorsList(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeRepeatedMessage( 12, - f + f, + proto.lnrpc.TimestampedError.serializeBinaryToWriter ); } - 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); - } - f = message.getServerActive(); - if (f) { - writer.writeBool( - 901, + f = message.getFlapCount(); + if (f !== 0) { + writer.writeInt32( + 13, f ); } - f = message.getRouterPruneTarget(); + f = message.getLastFlapNs(); if (f !== 0) { - writer.writeUint32( - 902, + writer.writeInt64( + 14, f ); } - f = message.getRouterPruneHeight(); - if (f !== 0) { - writer.writeUint32( - 903, + f = message.getLastPingPayload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, f ); } @@ -15392,423 +16207,312 @@ proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) /** - * optional string version = 14; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); -}; - - -/** - * optional string commit_hash = 20; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getCommitHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @enum {number} */ -proto.lnrpc.GetInfoResponse.prototype.setCommitHash = function(value) { - return jspb.Message.setProto3StringField(this, 20, value); +proto.lnrpc.Peer.SyncType = { + UNKNOWN_SYNC: 0, + ACTIVE_SYNC: 1, + PASSIVE_SYNC: 2, + PINNED_SYNC: 3 }; - /** - * optional string identity_pubkey = 1; + * optional string pub_key = 1; * @return {string} */ -proto.lnrpc.GetInfoResponse.prototype.getIdentityPubkey = function() { +proto.lnrpc.Peer.prototype.getPubKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setIdentityPubkey = function(value) { +proto.lnrpc.Peer.prototype.setPubKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string alias = 2; + * optional string address = 3; * @return {string} */ -proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Peer.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.Peer.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional string color = 17; - * @return {string} + * optional uint64 bytes_sent = 4; + * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +proto.lnrpc.Peer.prototype.getBytesSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @param {number} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setColor = function(value) { - return jspb.Message.setProto3StringField(this, 17, value); +proto.lnrpc.Peer.prototype.setBytesSent = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional uint32 num_pending_channels = 3; + * optional uint64 bytes_recv = 5; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.Peer.prototype.getBytesRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional uint32 num_active_channels = 4; + * optional int64 atoms_sent = 6; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.Peer.prototype.getAtomsSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.Peer.prototype.setAtomsSent = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional uint32 num_inactive_channels = 15; + * optional int64 atoms_recv = 7; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getNumInactiveChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +proto.lnrpc.Peer.prototype.getAtomsRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setNumInactiveChannels = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); +proto.lnrpc.Peer.prototype.setAtomsRecv = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional uint32 num_peers = 5; - * @return {number} + * optional bool inbound = 8; + * @return {boolean} */ -proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Peer.prototype.getInbound = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @param {boolean} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.Peer.prototype.setInbound = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; /** - * optional uint32 block_height = 6; + * optional int64 ping_time = 9; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.Peer.prototype.getPingTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.Peer.prototype.setPingTime = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional string block_hash = 8; - * @return {string} + * optional SyncType sync_type = 10; + * @return {!proto.lnrpc.Peer.SyncType} */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.lnrpc.Peer.prototype.getSyncType = function() { + return /** @type {!proto.lnrpc.Peer.SyncType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @param {!proto.lnrpc.Peer.SyncType} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.lnrpc.Peer.prototype.setSyncType = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); }; /** - * optional int64 best_header_timestamp = 13; - * @return {number} + * map features = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.Peer.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + proto.lnrpc.Feature)); }; /** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * optional bool synced_to_chain = 9; - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; - - -/** - * optional bool synced_to_graph = 18; - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToGraph = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToGraph = function(value) { - return jspb.Message.setProto3BooleanField(this, 18, value); -}; - - -/** - * optional bool testnet = 10; - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); -}; +proto.lnrpc.Peer.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); + return this;}; /** - * repeated Chain chains = 16; - * @return {!Array} + * repeated TimestampedError errors = 12; + * @return {!Array} */ -proto.lnrpc.GetInfoResponse.prototype.getChainsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Chain, 16)); +proto.lnrpc.Peer.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.TimestampedError, 12)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @param {!Array} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 16, value); +proto.lnrpc.Peer.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); }; /** - * @param {!proto.lnrpc.Chain=} opt_value + * @param {!proto.lnrpc.TimestampedError=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.Chain} + * @return {!proto.lnrpc.TimestampedError} */ -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.Peer.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.lnrpc.TimestampedError, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { - return this.setChainsList([]); -}; - - -/** - * repeated string uris = 12; - * @return {!Array} - */ -proto.lnrpc.GetInfoResponse.prototype.getUrisList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 12)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { - return jspb.Message.setField(this, 12, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 12, value, opt_index); +proto.lnrpc.Peer.prototype.clearErrorsList = function() { + return this.setErrorsList([]); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GetInfoResponse} returns this + * optional int32 flap_count = 13; + * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { - return this.setUrisList([]); +proto.lnrpc.Peer.prototype.getFlapCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** - * map features = 19; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * @param {number} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 19, opt_noLazyCreate, - proto.lnrpc.Feature)); +proto.lnrpc.Peer.prototype.setFlapCount = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.GetInfoResponse} returns this - */ -proto.lnrpc.GetInfoResponse.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; - - -/** - * optional bool server_active = 901; - * @return {boolean} + * optional int64 last_flap_ns = 14; + * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getServerActive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 901, false)); +proto.lnrpc.Peer.prototype.getLastFlapNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @param {number} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setServerActive = function(value) { - return jspb.Message.setProto3BooleanField(this, 901, value); +proto.lnrpc.Peer.prototype.setLastFlapNs = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); }; /** - * optional uint32 router_prune_target = 902; - * @return {number} + * optional bytes last_ping_payload = 15; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.GetInfoResponse.prototype.getRouterPruneTarget = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 902, 0)); +proto.lnrpc.Peer.prototype.getLastPingPayload = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * optional bytes last_ping_payload = 15; + * This is a type-conversion wrapper around `getLastPingPayload()` + * @return {string} */ -proto.lnrpc.GetInfoResponse.prototype.setRouterPruneTarget = function(value) { - return jspb.Message.setProto3IntField(this, 902, value); +proto.lnrpc.Peer.prototype.getLastPingPayload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastPingPayload())); }; /** - * optional uint32 router_prune_height = 903; - * @return {number} + * optional bytes last_ping_payload = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastPingPayload()` + * @return {!Uint8Array} */ -proto.lnrpc.GetInfoResponse.prototype.getRouterPruneHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 903, 0)); +proto.lnrpc.Peer.prototype.getLastPingPayload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastPingPayload())); }; /** - * @param {number} value - * @return {!proto.lnrpc.GetInfoResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.Peer} returns this */ -proto.lnrpc.GetInfoResponse.prototype.setRouterPruneHeight = function(value) { - return jspb.Message.setProto3IntField(this, 903, value); +proto.lnrpc.Peer.prototype.setLastPingPayload = function(value) { + return jspb.Message.setProto3BytesField(this, 15, value); }; @@ -15828,8 +16532,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GetRecoveryInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetRecoveryInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.TimestampedError.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.TimestampedError.toObject(opt_includeInstance, this); }; @@ -15838,13 +16542,14 @@ proto.lnrpc.GetRecoveryInfoRequest.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetRecoveryInfoRequest} 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.GetRecoveryInfoRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.TimestampedError.toObject = function(includeInstance, msg) { var f, obj = { - + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + error: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -15858,29 +16563,37 @@ proto.lnrpc.GetRecoveryInfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetRecoveryInfoRequest} + * @return {!proto.lnrpc.TimestampedError} */ -proto.lnrpc.GetRecoveryInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.TimestampedError.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetRecoveryInfoRequest; - return proto.lnrpc.GetRecoveryInfoRequest.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.GetRecoveryInfoRequest} 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.GetRecoveryInfoRequest} + * @return {!proto.lnrpc.TimestampedError} */ -proto.lnrpc.GetRecoveryInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.TimestampedError.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.setTimestamp(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; default: reader.skipField(); break; @@ -15894,9 +16607,9 @@ proto.lnrpc.GetRecoveryInfoRequest.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GetRecoveryInfoRequest.prototype.serializeBinary = function() { +proto.lnrpc.TimestampedError.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetRecoveryInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.TimestampedError.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15904,12 +16617,62 @@ proto.lnrpc.GetRecoveryInfoRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetRecoveryInfoRequest} message + * @param {!proto.lnrpc.TimestampedError} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetRecoveryInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.lnrpc.TimestampedError.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.TimestampedError} returns this + */ +proto.lnrpc.TimestampedError.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string error = 2; + * @return {string} + */ +proto.lnrpc.TimestampedError.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.TimestampedError} returns this + */ +proto.lnrpc.TimestampedError.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -15929,8 +16692,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetRecoveryInfoResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPeersRequest.toObject(opt_includeInstance, this); }; @@ -15939,15 +16702,13 @@ proto.lnrpc.GetRecoveryInfoResponse.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetRecoveryInfoResponse} 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.GetRecoveryInfoResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { var f, obj = { - recoveryMode: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - recoveryFinished: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - progress: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) + latestError: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -15961,23 +16722,23 @@ proto.lnrpc.GetRecoveryInfoResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetRecoveryInfoResponse} + * @return {!proto.lnrpc.ListPeersRequest} */ -proto.lnrpc.GetRecoveryInfoResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetRecoveryInfoResponse; - return proto.lnrpc.GetRecoveryInfoResponse.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.GetRecoveryInfoResponse} 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.GetRecoveryInfoResponse} + * @return {!proto.lnrpc.ListPeersRequest} */ -proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15986,15 +16747,7 @@ proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecoveryMode(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecoveryFinished(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setProgress(value); + msg.setLatestError(value); break; default: reader.skipField(); @@ -16009,9 +16762,9 @@ proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.serializeBinary = function() { +proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16019,90 +16772,47 @@ proto.lnrpc.GetRecoveryInfoResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetRecoveryInfoResponse} message + * @param {!proto.lnrpc.ListPeersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRecoveryMode(); + f = message.getLatestError(); if (f) { writer.writeBool( 1, f ); } - f = message.getRecoveryFinished(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getProgress(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } }; /** - * optional bool recovery_mode = 1; + * optional bool latest_error = 1; * @return {boolean} */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryMode = function() { +proto.lnrpc.ListPeersRequest.prototype.getLatestError = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this + * @return {!proto.lnrpc.ListPeersRequest} returns this */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryMode = function(value) { +proto.lnrpc.ListPeersRequest.prototype.setLatestError = function(value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * optional bool recovery_finished = 2; - * @return {boolean} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryFinished = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryFinished = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional double progress = 3; - * @return {number} - */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.getProgress = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - /** - * @param {number} value - * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.GetRecoveryInfoResponse.prototype.setProgress = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - +proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; @@ -16119,8 +16829,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ListPeersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPeersResponse.toObject(opt_includeInstance, this); }; @@ -16129,14 +16839,14 @@ proto.lnrpc.Chain.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ListPeersResponse} 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.ListPeersResponse.toObject = function(includeInstance, msg) { var f, obj = { - chain: jspb.Message.getFieldWithDefault(msg, 1, ""), - network: jspb.Message.getFieldWithDefault(msg, 2, "") + peersList: jspb.Message.toObjectList(msg.getPeersList(), + proto.lnrpc.Peer.toObject, includeInstance) }; if (includeInstance) { @@ -16150,23 +16860,23 @@ 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.ListPeersResponse} */ -proto.lnrpc.Chain.deserializeBinary = function(bytes) { +proto.lnrpc.ListPeersResponse.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.ListPeersResponse; + return proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Chain} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListPeersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Chain} + * @return {!proto.lnrpc.ListPeersResponse} */ -proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16174,12 +16884,9 @@ proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { 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); + var value = new proto.lnrpc.Peer; + reader.readMessage(value,proto.lnrpc.Peer.deserializeBinaryFromReader); + msg.addPeers(value); break; default: reader.skipField(); @@ -16194,9 +16901,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.ListPeersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Chain.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16204,62 +16911,58 @@ 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.ListPeersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Chain.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListPeersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChain(); + f = message.getPeersList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getNetwork(); - if (f.length > 0) { - writer.writeString( - 2, - f + f, + proto.lnrpc.Peer.serializeBinaryToWriter ); } }; /** - * optional string chain = 1; - * @return {string} + * repeated Peer peers = 1; + * @return {!Array} */ -proto.lnrpc.Chain.prototype.getChain = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); }; /** - * @param {string} value - * @return {!proto.lnrpc.Chain} returns this - */ -proto.lnrpc.Chain.prototype.setChain = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {!Array} value + * @return {!proto.lnrpc.ListPeersResponse} returns this +*/ +proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional string network = 2; - * @return {string} + * @param {!proto.lnrpc.Peer=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.Chain.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ListPeersResponse.prototype.addPeers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Peer, opt_index); }; /** - * @param {string} value - * @return {!proto.lnrpc.Chain} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ListPeersResponse} returns this */ -proto.lnrpc.Chain.prototype.setNetwork = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { + return this.setPeersList([]); }; @@ -16279,8 +16982,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PeerEventSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PeerEventSubscription.toObject(opt_includeInstance, this); }; @@ -16289,15 +16992,13 @@ proto.lnrpc.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.PeerEventSubscription} 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.PeerEventSubscription.toObject = function(includeInstance, msg) { var f, obj = { - blockSha: msg.getBlockSha_asB64(), - blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - numConfsLeft: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; if (includeInstance) { @@ -16311,41 +17012,29 @@ 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.PeerEventSubscription} */ -proto.lnrpc.ConfirmationUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PeerEventSubscription.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.PeerEventSubscription; + return proto.lnrpc.PeerEventSubscription.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.PeerEventSubscription} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConfirmationUpdate} + * @return {!proto.lnrpc.PeerEventSubscription} */ -proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PeerEventSubscription.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockSha(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockHeight(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumConfsLeft(value); - break; default: reader.skipField(); break; @@ -16359,9 +17048,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.PeerEventSubscription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16369,111 +17058,12 @@ 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.PeerEventSubscription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockSha_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getNumConfsLeft(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional bytes block_sha = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes block_sha = 1; - * This is a type-conversion wrapper around `getBlockSha()` - * @return {string} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockSha())); -}; - - -/** - * optional bytes block_sha = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockSha()` - * @return {!Uint8Array} - */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockSha())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ConfirmationUpdate} returns this - */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockSha = function(value) { - return 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 - * @return {!proto.lnrpc.ConfirmationUpdate} returns this - */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockHeight = function(value) { - return 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 - * @return {!proto.lnrpc.ConfirmationUpdate} returns this - */ -proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); }; @@ -16493,8 +17083,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.PeerEvent.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PeerEvent.toObject(opt_includeInstance, this); }; @@ -16503,13 +17093,14 @@ proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelOpenUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.PeerEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.PeerEvent.toObject = function(includeInstance, msg) { var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -16523,23 +17114,23 @@ proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelOpenUpdate} + * @return {!proto.lnrpc.PeerEvent} */ -proto.lnrpc.ChannelOpenUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PeerEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelOpenUpdate; - return proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.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.ChannelOpenUpdate} 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.ChannelOpenUpdate} + * @return {!proto.lnrpc.PeerEvent} */ -proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PeerEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16547,9 +17138,12 @@ proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {!proto.lnrpc.PeerEvent.EventType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -16564,9 +17158,9 @@ proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { +proto.lnrpc.PeerEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PeerEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16574,57 +17168,70 @@ proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelOpenUpdate} message + * @param {!proto.lnrpc.PeerEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PeerEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f ); } }; /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * @enum {number} */ -proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.PeerEvent.EventType = { + PEER_ONLINE: 0, + PEER_OFFLINE: 1 +}; + +/** + * optional string pub_key = 1; + * @return {string} + */ +proto.lnrpc.PeerEvent.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelOpenUpdate} returns this -*/ -proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.lnrpc.PeerEvent} returns this + */ +proto.lnrpc.PeerEvent.prototype.setPubKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelOpenUpdate} returns this + * optional EventType type = 2; + * @return {!proto.lnrpc.PeerEvent.EventType} */ -proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); +proto.lnrpc.PeerEvent.prototype.getType = function() { + return /** @type {!proto.lnrpc.PeerEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.lnrpc.PeerEvent.EventType} value + * @return {!proto.lnrpc.PeerEvent} returns this */ -proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.PeerEvent.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; @@ -16644,8 +17251,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetInfoRequest.toObject(opt_includeInstance, this); }; @@ -16654,14 +17261,13 @@ proto.lnrpc.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.GetInfoRequest} 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.GetInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - closingTxid: msg.getClosingTxid_asB64(), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; if (includeInstance) { @@ -16675,37 +17281,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.GetInfoRequest} */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.GetInfoRequest.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.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.ChannelCloseUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.GetInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseUpdate} + * @return {!proto.lnrpc.GetInfoRequest} */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetInfoRequest.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; @@ -16719,9 +17317,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.GetInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16729,89 +17327,22 @@ 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.GetInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetInfoRequest.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 - * @return {!proto.lnrpc.ChannelCloseUpdate} returns this - */ -proto.lnrpc.ChannelCloseUpdate.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * optional bool success = 2; - * @return {boolean} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - /** - * @param {boolean} value - * @return {!proto.lnrpc.ChannelCloseUpdate} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - +proto.lnrpc.GetInfoResponse.repeatedFields_ = [16,12]; @@ -16828,8 +17359,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetInfoResponse.toObject(opt_includeInstance, this); }; @@ -16838,17 +17369,34 @@ proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.GetInfoResponse} 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.GetInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - force: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - atomsPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0), - deliveryAddress: jspb.Message.getFieldWithDefault(msg, 5, "") + 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.getBooleanFieldWithDefault(msg, 9, false), + syncedToGraph: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + testnet: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + chainsList: jspb.Message.toObjectList(msg.getChainsList(), + proto.lnrpc.Chain.toObject, includeInstance), + urisList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f, + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], + serverActive: jspb.Message.getBooleanFieldWithDefault(msg, 901, false), + routerPruneTarget: jspb.Message.getFieldWithDefault(msg, 902, 0), + routerPruneHeight: jspb.Message.getFieldWithDefault(msg, 903, 0) }; if (includeInstance) { @@ -16862,49 +17410,115 @@ 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.GetInfoResponse} */ -proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.GetInfoResponse.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.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.CloseChannelRequest} 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.CloseChannelRequest} + * @return {!proto.lnrpc.GetInfoResponse} */ -proto.lnrpc.CloseChannelRequest.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 = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); + var value = /** @type {string} */ (reader.readString()); + msg.setIdentityPubkey(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setColor(value); break; case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumPendingChannels(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAtomsPerByte(value); + 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.setDeliveryAddress(value); + 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, new proto.lnrpc.Feature()); + }); + break; + case 901: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setServerActive(value); + break; + case 902: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRouterPruneTarget(value); + break; + case 903: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRouterPruneHeight(value); break; default: reader.skipField(); @@ -16919,9 +17533,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.GetInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16929,569 +17543,578 @@ 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.GetInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( + 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, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + f ); } - f = message.getForce(); - if (f) { - writer.writeBool( + f = message.getAlias(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getTargetConf(); + f = message.getColor(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getNumPendingChannels(); if (f !== 0) { - writer.writeInt32( + writer.writeUint32( 3, f ); } - f = message.getAtomsPerByte(); + f = message.getNumActiveChannels(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 4, f ); } - f = message.getDeliveryAddress(); - if (f.length > 0) { - writer.writeString( + 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); + } + f = message.getServerActive(); + if (f) { + writer.writeBool( + 901, + f + ); + } + f = message.getRouterPruneTarget(); + if (f !== 0) { + writer.writeUint32( + 902, + f + ); + } + f = message.getRouterPruneHeight(); + if (f !== 0) { + writer.writeUint32( + 903, + f + ); + } }; /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * optional string version = 14; + * @return {string} */ -proto.lnrpc.CloseChannelRequest.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this -*/ -proto.lnrpc.CloseChannelRequest.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.lnrpc.GetInfoResponse} returns this + */ +proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 14, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.CloseChannelRequest} returns this + * optional string commit_hash = 20; + * @return {string} */ -proto.lnrpc.CloseChannelRequest.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); +proto.lnrpc.GetInfoResponse.prototype.getCommitHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseChannelRequest.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.GetInfoResponse.prototype.setCommitHash = function(value) { + return jspb.Message.setProto3StringField(this, 20, value); }; /** - * optional bool force = 2; - * @return {boolean} + * optional string identity_pubkey = 1; + * @return {string} */ -proto.lnrpc.CloseChannelRequest.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.lnrpc.GetInfoResponse.prototype.getIdentityPubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseChannelRequest.prototype.setForce = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.lnrpc.GetInfoResponse.prototype.setIdentityPubkey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional int32 target_conf = 3; - * @return {number} + * optional string alias = 2; + * @return {string} */ -proto.lnrpc.CloseChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 atoms_per_byte = 4; - * @return {number} + * optional string color = 17; + * @return {string} */ -proto.lnrpc.CloseChannelRequest.prototype.getAtomsPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.GetInfoResponse.prototype.getColor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseChannelRequest.prototype.setAtomsPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.GetInfoResponse.prototype.setColor = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); }; /** - * optional string delivery_address = 5; - * @return {string} + * optional uint32 num_pending_channels = 3; + * @return {number} */ -proto.lnrpc.CloseChannelRequest.prototype.getDeliveryAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.CloseChannelRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseChannelRequest.prototype.setDeliveryAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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 uint32 num_active_channels = 4; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate.oneofGroups_ = [[1,3]]; +proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + /** - * @enum {number} + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.UpdateCase = { - UPDATE_NOT_SET: 0, - CLOSE_PENDING: 1, - CHAN_CLOSE: 3 +proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; + /** - * @return {proto.lnrpc.CloseStatusUpdate.UpdateCase} + * optional uint32 num_inactive_channels = 15; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate.prototype.getUpdateCase = function() { - return /** @type {proto.lnrpc.CloseStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0])); +proto.lnrpc.GetInfoResponse.prototype.getNumInactiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CloseStatusUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.GetInfoResponse.prototype.setNumInactiveChannels = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CloseStatusUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 num_peers = 5; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - closePending: (f = msg.getClosePending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - chanClose: (f = msg.getChanClose()) && proto.lnrpc.ChannelCloseUpdate.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CloseStatusUpdate} + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CloseStatusUpdate; - return proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CloseStatusUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CloseStatusUpdate} + * optional uint32 block_height = 6; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.setClosePending(value); - break; - case 3: - var value = new proto.lnrpc.ChannelCloseUpdate; - reader.readMessage(value,proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader); - msg.setChanClose(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CloseStatusUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string block_hash = 8; + * @return {string} */ -proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClosePending(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } - f = message.getChanClose(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter - ); - } +proto.lnrpc.GetInfoResponse.prototype.getBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** - * optional PendingUpdate close_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} + * @param {string} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.prototype.getClosePending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); +proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); }; /** - * @param {?proto.lnrpc.PendingUpdate|undefined} value - * @return {!proto.lnrpc.CloseStatusUpdate} returns this -*/ -proto.lnrpc.CloseStatusUpdate.prototype.setClosePending = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); + * optional int64 best_header_timestamp = 13; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.CloseStatusUpdate} returns this + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.prototype.clearClosePending = function() { - return this.setClosePending(undefined); +proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); }; /** - * Returns whether this field is set. + * optional bool synced_to_chain = 9; * @return {boolean} */ -proto.lnrpc.CloseStatusUpdate.prototype.hasClosePending = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; /** - * optional ChannelCloseUpdate chan_close = 3; - * @return {?proto.lnrpc.ChannelCloseUpdate} + * @param {boolean} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.prototype.getChanClose = function() { - return /** @type{?proto.lnrpc.ChannelCloseUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseUpdate, 3)); +proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; /** - * @param {?proto.lnrpc.ChannelCloseUpdate|undefined} value - * @return {!proto.lnrpc.CloseStatusUpdate} returns this -*/ -proto.lnrpc.CloseStatusUpdate.prototype.setChanClose = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); + * optional bool synced_to_graph = 18; + * @return {boolean} + */ +proto.lnrpc.GetInfoResponse.prototype.getSyncedToGraph = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.CloseStatusUpdate} returns this + * @param {boolean} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.CloseStatusUpdate.prototype.clearChanClose = function() { - return this.setChanClose(undefined); +proto.lnrpc.GetInfoResponse.prototype.setSyncedToGraph = function(value) { + return jspb.Message.setProto3BooleanField(this, 18, value); }; /** - * Returns whether this field is set. + * optional bool testnet = 10; * @return {boolean} */ -proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {boolean} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated Chain chains = 16; + * @return {!Array} */ -proto.lnrpc.PendingUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - txid: msg.getTxid_asB64(), - outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; +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 + * @return {!proto.lnrpc.GetInfoResponse} returns this +*/ +proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 16, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingUpdate} + * @param {!proto.lnrpc.Chain=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Chain} */ -proto.lnrpc.PendingUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingUpdate; - return proto.lnrpc.PendingUpdate.deserializeBinaryFromReader(msg, reader); +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.PendingUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingUpdate} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { + return this.setChainsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated string uris = 12; + * @return {!Array} */ -proto.lnrpc.PendingUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingUpdate.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.PendingUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!Array} value + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } +proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { + return jspb.Message.setField(this, 12, value || []); }; /** - * optional bytes txid = 1; - * @return {!(string|Uint8Array)} + * @param {string} value + * @param {number=} opt_index + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 12, value, opt_index); }; /** - * optional bytes txid = 1; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); +proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { + return this.setUrisList([]); }; /** - * 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} + * map features = 19; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); +proto.lnrpc.GetInfoResponse.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 19, opt_noLazyCreate, + proto.lnrpc.Feature)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PendingUpdate} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.prototype.setTxid = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.GetInfoResponse.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); + return this;}; + + +/** + * optional bool server_active = 901; + * @return {boolean} + */ +proto.lnrpc.GetInfoResponse.prototype.getServerActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 901, false)); }; /** - * optional uint32 output_index = 2; + * @param {boolean} value + * @return {!proto.lnrpc.GetInfoResponse} returns this + */ +proto.lnrpc.GetInfoResponse.prototype.setServerActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 901, value); +}; + + +/** + * optional uint32 router_prune_target = 902; * @return {number} */ -proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.GetInfoResponse.prototype.getRouterPruneTarget = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 902, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PendingUpdate} returns this + * @return {!proto.lnrpc.GetInfoResponse} returns this */ -proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.GetInfoResponse.prototype.setRouterPruneTarget = function(value) { + return jspb.Message.setProto3IntField(this, 902, value); +}; + + +/** + * optional uint32 router_prune_height = 903; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getRouterPruneHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 903, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.GetInfoResponse} returns this + */ +proto.lnrpc.GetInfoResponse.prototype.setRouterPruneHeight = function(value) { + return jspb.Message.setProto3IntField(this, 903, value); }; @@ -17511,8 +18134,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ReadyForPsbtFunding.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ReadyForPsbtFunding.toObject(opt_includeInstance, this); +proto.lnrpc.GetRecoveryInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetRecoveryInfoRequest.toObject(opt_includeInstance, this); }; @@ -17521,15 +18144,13 @@ proto.lnrpc.ReadyForPsbtFunding.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ReadyForPsbtFunding} 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.ReadyForPsbtFunding.toObject = function(includeInstance, msg) { +proto.lnrpc.GetRecoveryInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - fundingAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - fundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), - psbt: msg.getPsbt_asB64() + }; if (includeInstance) { @@ -17543,23 +18164,126 @@ proto.lnrpc.ReadyForPsbtFunding.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ReadyForPsbtFunding} + * @return {!proto.lnrpc.GetRecoveryInfoRequest} */ -proto.lnrpc.ReadyForPsbtFunding.deserializeBinary = function(bytes) { +proto.lnrpc.GetRecoveryInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ReadyForPsbtFunding; - return proto.lnrpc.ReadyForPsbtFunding.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.ReadyForPsbtFunding} 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.ReadyForPsbtFunding} + * @return {!proto.lnrpc.GetRecoveryInfoRequest} */ -proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetRecoveryInfoRequest.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.GetRecoveryInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GetRecoveryInfoRequest.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.GetRecoveryInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GetRecoveryInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.GetRecoveryInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetRecoveryInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.GetRecoveryInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GetRecoveryInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + recoveryMode: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + recoveryFinished: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + progress: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.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.GetRecoveryInfoResponse} + */ +proto.lnrpc.GetRecoveryInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.GetRecoveryInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GetRecoveryInfoResponse} + */ +proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17567,16 +18291,16 @@ proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setFundingAddress(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecoveryMode(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFundingAmount(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecoveryFinished(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPsbt(value); + var value = /** @type {number} */ (reader.readDouble()); + msg.setProgress(value); break; default: reader.skipField(); @@ -17591,9 +18315,9 @@ proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ReadyForPsbtFunding.prototype.serializeBinary = function() { +proto.lnrpc.GetRecoveryInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17601,29 +18325,29 @@ proto.lnrpc.ReadyForPsbtFunding.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ReadyForPsbtFunding} message + * @param {!proto.lnrpc.GetRecoveryInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFundingAddress(); - if (f.length > 0) { - writer.writeString( + f = message.getRecoveryMode(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getFundingAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getRecoveryFinished(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getPsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getProgress(); + if (f !== 0.0) { + writer.writeDouble( 3, f ); @@ -17632,80 +18356,56 @@ proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter = function(message, writ /** - * optional string funding_address = 1; - * @return {string} - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this - */ -proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 funding_amount = 2; - * @return {number} + * optional bool recovery_mode = 1; + * @return {boolean} */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this + * @param {boolean} value + * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this */ -proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional bytes psbt = 3; - * @return {!(string|Uint8Array)} + * optional bool recovery_finished = 2; + * @return {boolean} */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryFinished = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * optional bytes psbt = 3; - * This is a type-conversion wrapper around `getPsbt()` - * @return {string} + * @param {boolean} value + * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPsbt())); +proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryFinished = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * 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} + * optional double progress = 3; + * @return {number} */ -proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPsbt())); +proto.lnrpc.GetRecoveryInfoResponse.prototype.getProgress = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this + * @param {number} value + * @return {!proto.lnrpc.GetRecoveryInfoResponse} returns this */ -proto.lnrpc.ReadyForPsbtFunding.prototype.setPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.lnrpc.GetRecoveryInfoResponse.prototype.setProgress = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); }; @@ -17725,8 +18425,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.Chain.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Chain.toObject(opt_includeInstance, this); }; @@ -17735,27 +18435,14 @@ proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.Chain} 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.Chain.toObject = function(includeInstance, msg) { var f, obj = { - nodePubkey: msg.getNodePubkey_asB64(), - nodePubkeyString: jspb.Message.getFieldWithDefault(msg, 3, ""), - localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), - targetConf: jspb.Message.getFieldWithDefault(msg, 6, 0), - atomsPerByte: jspb.Message.getFieldWithDefault(msg, 7, 0), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 9, 0), - remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 10, 0), - minConfs: jspb.Message.getFieldWithDefault(msg, 11, 0), - spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), - closeAddress: jspb.Message.getFieldWithDefault(msg, 13, ""), - fundingShim: (f = msg.getFundingShim()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), - remoteMaxValueInFlightMAtoms: jspb.Message.getFieldWithDefault(msg, 15, 0), - remoteMaxHtlcs: jspb.Message.getFieldWithDefault(msg, 16, 0) + chain: jspb.Message.getFieldWithDefault(msg, 1, ""), + network: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -17769,89 +18456,36 @@ 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.Chain} */ -proto.lnrpc.OpenChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Chain.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.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.OpenChannelRequest} 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.OpenChannelRequest} + * @return {!proto.lnrpc.Chain} */ -proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); - break; - case 3: + case 1: 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.setPushAtoms(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAtomsPerByte(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlcMAtoms(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); + msg.setChain(value); break; - case 13: + case 2: 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.setRemoteMaxValueInFlightMAtoms(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRemoteMaxHtlcs(value); + msg.setNetwork(value); break; default: reader.skipField(); @@ -17866,9 +18500,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.Chain.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.Chain.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17876,461 +18510,430 @@ 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.Chain} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Chain.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodePubkey_asU8(); + f = message.getChain(); if (f.length > 0) { - writer.writeBytes( - 2, + writer.writeString( + 1, f ); } - f = message.getNodePubkeyString(); + f = message.getNetwork(); if (f.length > 0) { writer.writeString( - 3, - f - ); - } - f = message.getLocalFundingAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getPushAtoms(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getAtomsPerByte(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 8, + 2, f ); } - f = message.getMinHtlcMAtoms(); - 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.getRemoteMaxValueInFlightMAtoms(); - if (f !== 0) { - writer.writeUint64( - 15, - f - ); - } - f = message.getRemoteMaxHtlcs(); - if (f !== 0) { - writer.writeUint32( - 16, - f - ); - } -}; - - -/** - * optional bytes node_pubkey = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes node_pubkey = 2; - * This is a type-conversion wrapper around `getNodePubkey()` + * optional string chain = 1; * @return {string} */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); -}; - - -/** - * optional bytes node_pubkey = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {!Uint8Array} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); +proto.lnrpc.Chain.prototype.getChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.Chain} returns this */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.Chain.prototype.setChain = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string node_pubkey_string = 3; + * optional string network = 2; * @return {string} */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkeyString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.Chain.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * @return {!proto.lnrpc.Chain} returns this */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.lnrpc.Chain.prototype.setNetwork = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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 - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 push_atoms = 5; - * @return {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.OpenChannelRequest.prototype.getPushAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConfirmationUpdate.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ConfirmationUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.prototype.setPushAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ConfirmationUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + blockSha: msg.getBlockSha_asB64(), + blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + numConfsLeft: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int32 target_conf = 6; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ConfirmationUpdate} */ -proto.lnrpc.OpenChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ConfirmationUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ConfirmationUpdate; + return proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ConfirmationUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ConfirmationUpdate} */ -proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockSha(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlockHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumConfsLeft(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 atoms_per_byte = 7; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.OpenChannelRequest.prototype.getAtomsPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.ConfirmationUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ConfirmationUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.prototype.setAtomsPerByte = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockSha_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getNumConfsLeft(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } }; /** - * optional bool private = 8; - * @return {boolean} + * optional bytes block_sha = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.OpenChannelRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * optional bytes block_sha = 1; + * This is a type-conversion wrapper around `getBlockSha()` + * @return {string} */ -proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockSha())); }; /** - * optional int64 min_htlc_m_atoms = 9; - * @return {number} + * 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.OpenChannelRequest.prototype.getMinHtlcMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockSha())); }; /** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ConfirmationUpdate} returns this */ -proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.lnrpc.ConfirmationUpdate.prototype.setBlockSha = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 remote_csv_delay = 10; + * optional int32 block_height = 2; * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.ConfirmationUpdate.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * @return {!proto.lnrpc.ConfirmationUpdate} returns this */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteCsvDelay = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.ConfirmationUpdate.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int32 min_confs = 11; + * optional uint32 num_confs_left = 3; * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.ConfirmationUpdate.prototype.getNumConfsLeft = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * @return {!proto.lnrpc.ConfirmationUpdate} returns this */ -proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; -/** - * optional bool spend_unconfirmed = 12; - * @return {boolean} - */ -proto.lnrpc.OpenChannelRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); -}; - -/** - * @param {boolean} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this - */ -proto.lnrpc.OpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { - return jspb.Message.setProto3BooleanField(this, 12, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string close_address = 13; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.OpenChannelRequest.prototype.getCloseAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.OpenChannelRequest.prototype.setCloseAddress = function(value) { - return jspb.Message.setProto3StringField(this, 13, value); -}; - +proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + }; -/** - * 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)); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {?proto.lnrpc.FundingShim|undefined} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this -*/ -proto.lnrpc.OpenChannelRequest.prototype.setFundingShim = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChannelOpenUpdate} + */ +proto.lnrpc.ChannelOpenUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelOpenUpdate; + return proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelOpenUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelOpenUpdate} */ -proto.lnrpc.OpenChannelRequest.prototype.clearFundingShim = function() { - return this.setFundingShim(undefined); +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; }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.OpenChannelRequest.prototype.hasFundingShim = function() { - return jspb.Message.getField(this, 14) != null; +proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint64 remote_max_value_in_flight_m_atoms = 15; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ChannelOpenUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxValueInFlightMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelPoint(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } }; /** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * optional ChannelPoint channel_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxValueInFlightMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); +proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; /** - * optional uint32 remote_max_htlcs = 16; - * @return {number} - */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.ChannelOpenUpdate} returns this +*/ +proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.lnrpc.OpenChannelRequest} returns this + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelOpenUpdate} returns this */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxHtlcs = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); +proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { + return this.setChannelPoint(undefined); }; - -/** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.OpenStatusUpdate.UpdateCase = { - UPDATE_NOT_SET: 0, - CHAN_PENDING: 1, - CHAN_OPEN: 3, - PSBT_FUND: 5 +proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * @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])); -}; + @@ -18347,8 +18950,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelCloseUpdate.toObject(opt_includeInstance, this); }; @@ -18357,16 +18960,14 @@ proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.OpenStatusUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelCloseUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenStatusUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelCloseUpdate.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), - psbtFund: (f = msg.getPsbtFund()) && proto.lnrpc.ReadyForPsbtFunding.toObject(includeInstance, f), - pendingChanId: msg.getPendingChanId_asB64() + closingTxid: msg.getClosingTxid_asB64(), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -18380,23 +18981,23 @@ proto.lnrpc.OpenStatusUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OpenStatusUpdate} + * @return {!proto.lnrpc.ChannelCloseUpdate} */ -proto.lnrpc.OpenStatusUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelCloseUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OpenStatusUpdate; - return proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.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.OpenStatusUpdate} 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.OpenStatusUpdate} + * @return {!proto.lnrpc.ChannelCloseUpdate} */ -proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18404,23 +19005,12 @@ proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) 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; - 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); + msg.setClosingTxid(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); break; default: reader.skipField(); @@ -18435,9 +19025,9 @@ proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { +proto.lnrpc.ChannelCloseUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18445,40 +19035,23 @@ proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OpenStatusUpdate} message + * @param {!proto.lnrpc.ChannelCloseUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPending(); - if (f != null) { - writer.writeMessage( + f = message.getClosingTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( 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 ); } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, f ); } @@ -18486,155 +19059,62 @@ proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter = function(message, writer) /** - * optional PendingUpdate chan_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingUpdate|undefined} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this -*/ -proto.lnrpc.OpenStatusUpdate.prototype.setChanPending = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenStatusUpdate} returns this - */ -proto.lnrpc.OpenStatusUpdate.prototype.clearChanPending = function() { - return this.setChanPending(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChannelOpenUpdate chan_open = 3; - * @return {?proto.lnrpc.ChannelOpenUpdate} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { - return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); -}; - - -/** - * @param {?proto.lnrpc.ChannelOpenUpdate|undefined} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this -*/ -proto.lnrpc.OpenStatusUpdate.prototype.setChanOpen = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenStatusUpdate} returns this + * optional bytes closing_txid = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { - return this.setChanOpen(undefined); +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes closing_txid = 1; + * This is a type-conversion wrapper around `getClosingTxid()` + * @return {string} */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getClosingTxid())); }; /** - * optional ReadyForPsbtFunding psbt_fund = 5; - * @return {?proto.lnrpc.ReadyForPsbtFunding} + * 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.OpenStatusUpdate.prototype.getPsbtFund = function() { - return /** @type{?proto.lnrpc.ReadyForPsbtFunding} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ReadyForPsbtFunding, 5)); -}; - - -/** - * @param {?proto.lnrpc.ReadyForPsbtFunding|undefined} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this -*/ -proto.lnrpc.OpenStatusUpdate.prototype.setPsbtFund = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getClosingTxid())); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.OpenStatusUpdate} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelCloseUpdate} returns this */ -proto.lnrpc.OpenStatusUpdate.prototype.clearPsbtFund = function() { - return this.setPsbtFund(undefined); +proto.lnrpc.ChannelCloseUpdate.prototype.setClosingTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Returns whether this field is set. + * optional bool success = 2; * @return {boolean} */ -proto.lnrpc.OpenStatusUpdate.prototype.hasPsbtFund = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bytes pending_chan_id = 4; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes pending_chan_id = 4; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); -}; - - -/** - * 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 `getPendingChanId()` - * @return {!Uint8Array} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); +proto.lnrpc.ChannelCloseUpdate.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.OpenStatusUpdate} returns this + * @param {boolean} value + * @return {!proto.lnrpc.ChannelCloseUpdate} returns this */ -proto.lnrpc.OpenStatusUpdate.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -18654,8 +19134,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.KeyLocator.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.KeyLocator.toObject(opt_includeInstance, this); +proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CloseChannelRequest.toObject(opt_includeInstance, this); }; @@ -18664,14 +19144,17 @@ proto.lnrpc.KeyLocator.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.KeyLocator} 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.KeyLocator.toObject = function(includeInstance, msg) { +proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - keyFamily: jspb.Message.getFieldWithDefault(msg, 1, 0), - keyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + force: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), + atomsPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0), + deliveryAddress: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { @@ -18685,23 +19168,23 @@ proto.lnrpc.KeyLocator.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.KeyLocator} + * @return {!proto.lnrpc.CloseChannelRequest} */ -proto.lnrpc.KeyLocator.deserializeBinary = function(bytes) { +proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.KeyLocator; - return proto.lnrpc.KeyLocator.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.KeyLocator} 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.KeyLocator} + * @return {!proto.lnrpc.CloseChannelRequest} */ -proto.lnrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18709,12 +19192,25 @@ proto.lnrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setKeyFamily(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.setKeyIndex(value); + msg.setTargetConf(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAtomsPerByte(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDeliveryAddress(value); break; default: reader.skipField(); @@ -18729,9 +19225,9 @@ proto.lnrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.KeyLocator.prototype.serializeBinary = function() { +proto.lnrpc.CloseChannelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.KeyLocator.serializeBinaryToWriter(this, writer); + proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18739,23 +19235,45 @@ proto.lnrpc.KeyLocator.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.KeyLocator} message + * @param {!proto.lnrpc.CloseChannelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.KeyLocator.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyFamily(); - 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.getKeyIndex(); + f = message.getTargetConf(); if (f !== 0) { writer.writeInt32( - 2, + 3, + f + ); + } + f = message.getAtomsPerByte(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDeliveryAddress(); + if (f.length > 0) { + writer.writeString( + 5, f ); } @@ -18763,42 +19281,141 @@ proto.lnrpc.KeyLocator.serializeBinaryToWriter = function(message, writer) { /** - * optional int32 key_family = 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 + * @return {!proto.lnrpc.CloseChannelRequest} returns this +*/ +proto.lnrpc.CloseChannelRequest.prototype.setChannelPoint = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.CloseChannelRequest} returns this + */ +proto.lnrpc.CloseChannelRequest.prototype.clearChannelPoint = function() { + return 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; + * @return {boolean} + */ +proto.lnrpc.CloseChannelRequest.prototype.getForce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.CloseChannelRequest} returns this + */ +proto.lnrpc.CloseChannelRequest.prototype.setForce = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional int32 target_conf = 3; * @return {number} */ -proto.lnrpc.KeyLocator.prototype.getKeyFamily = 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 - * @return {!proto.lnrpc.KeyLocator} returns this + * @return {!proto.lnrpc.CloseChannelRequest} returns this */ -proto.lnrpc.KeyLocator.prototype.setKeyFamily = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int32 key_index = 2; + * optional int64 atoms_per_byte = 4; * @return {number} */ -proto.lnrpc.KeyLocator.prototype.getKeyIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.CloseChannelRequest.prototype.getAtomsPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.KeyLocator} returns this + * @return {!proto.lnrpc.CloseChannelRequest} returns this */ -proto.lnrpc.KeyLocator.prototype.setKeyIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.CloseChannelRequest.prototype.setAtomsPerByte = function(value) { + return 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 + * @return {!proto.lnrpc.CloseChannelRequest} returns this + */ +proto.lnrpc.CloseChannelRequest.prototype.setDeliveryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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 + */ +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) { @@ -18814,8 +19431,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.KeyDescriptor.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.KeyDescriptor.toObject(opt_includeInstance, this); +proto.lnrpc.CloseStatusUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CloseStatusUpdate.toObject(opt_includeInstance, this); }; @@ -18824,14 +19441,14 @@ proto.lnrpc.KeyDescriptor.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.KeyDescriptor} 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.KeyDescriptor.toObject = function(includeInstance, msg) { +proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { var f, obj = { - rawKeyBytes: msg.getRawKeyBytes_asB64(), - keyLoc: (f = msg.getKeyLoc()) && proto.lnrpc.KeyLocator.toObject(includeInstance, f) + closePending: (f = msg.getClosePending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), + chanClose: (f = msg.getChanClose()) && proto.lnrpc.ChannelCloseUpdate.toObject(includeInstance, f) }; if (includeInstance) { @@ -18845,23 +19462,23 @@ proto.lnrpc.KeyDescriptor.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.KeyDescriptor} + * @return {!proto.lnrpc.CloseStatusUpdate} */ -proto.lnrpc.KeyDescriptor.deserializeBinary = function(bytes) { +proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.KeyDescriptor; - return proto.lnrpc.KeyDescriptor.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.KeyDescriptor} 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.KeyDescriptor} + * @return {!proto.lnrpc.CloseStatusUpdate} */ -proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18869,13 +19486,14 @@ proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRawKeyBytes(value); + var value = new proto.lnrpc.PendingUpdate; + reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); + msg.setClosePending(value); break; - case 2: - var value = new proto.lnrpc.KeyLocator; - reader.readMessage(value,proto.lnrpc.KeyLocator.deserializeBinaryFromReader); - msg.setKeyLoc(value); + case 3: + var value = new proto.lnrpc.ChannelCloseUpdate; + reader.readMessage(value,proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader); + msg.setChanClose(value); break; default: reader.skipField(); @@ -18890,9 +19508,9 @@ proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.KeyDescriptor.prototype.serializeBinary = function() { +proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.KeyDescriptor.serializeBinaryToWriter(this, writer); + proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18900,97 +19518,93 @@ proto.lnrpc.KeyDescriptor.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.KeyDescriptor} message + * @param {!proto.lnrpc.CloseStatusUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.KeyDescriptor.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRawKeyBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getClosePending(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.PendingUpdate.serializeBinaryToWriter ); } - f = message.getKeyLoc(); + f = message.getChanClose(); if (f != null) { writer.writeMessage( - 2, + 3, f, - proto.lnrpc.KeyLocator.serializeBinaryToWriter + proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter ); } }; /** - * optional bytes raw_key_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes raw_key_bytes = 1; - * This is a type-conversion wrapper around `getRawKeyBytes()` - * @return {string} + * optional PendingUpdate close_pending = 1; + * @return {?proto.lnrpc.PendingUpdate} */ -proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRawKeyBytes())); +proto.lnrpc.CloseStatusUpdate.prototype.getClosePending = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); }; /** - * 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} + * @param {?proto.lnrpc.PendingUpdate|undefined} value + * @return {!proto.lnrpc.CloseStatusUpdate} returns this +*/ +proto.lnrpc.CloseStatusUpdate.prototype.setClosePending = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.CloseStatusUpdate} returns this */ -proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRawKeyBytes())); +proto.lnrpc.CloseStatusUpdate.prototype.clearClosePending = function() { + return this.setClosePending(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.KeyDescriptor} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.KeyDescriptor.prototype.setRawKeyBytes = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.CloseStatusUpdate.prototype.hasClosePending = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional KeyLocator key_loc = 2; - * @return {?proto.lnrpc.KeyLocator} + * optional ChannelCloseUpdate chan_close = 3; + * @return {?proto.lnrpc.ChannelCloseUpdate} */ -proto.lnrpc.KeyDescriptor.prototype.getKeyLoc = function() { - return /** @type{?proto.lnrpc.KeyLocator} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.KeyLocator, 2)); +proto.lnrpc.CloseStatusUpdate.prototype.getChanClose = function() { + return /** @type{?proto.lnrpc.ChannelCloseUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseUpdate, 3)); }; /** - * @param {?proto.lnrpc.KeyLocator|undefined} value - * @return {!proto.lnrpc.KeyDescriptor} returns this + * @param {?proto.lnrpc.ChannelCloseUpdate|undefined} value + * @return {!proto.lnrpc.CloseStatusUpdate} returns this */ -proto.lnrpc.KeyDescriptor.prototype.setKeyLoc = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.lnrpc.CloseStatusUpdate.prototype.setChanClose = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.KeyDescriptor} returns this + * @return {!proto.lnrpc.CloseStatusUpdate} returns this */ -proto.lnrpc.KeyDescriptor.prototype.clearKeyLoc = function() { - return this.setKeyLoc(undefined); +proto.lnrpc.CloseStatusUpdate.prototype.clearChanClose = function() { + return this.setChanClose(undefined); }; @@ -18998,8 +19612,8 @@ proto.lnrpc.KeyDescriptor.prototype.clearKeyLoc = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.KeyDescriptor.prototype.hasKeyLoc = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -19019,8 +19633,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChanPointShim.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanPointShim.toObject(opt_includeInstance, this); +proto.lnrpc.PendingUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingUpdate.toObject(opt_includeInstance, this); }; @@ -19029,18 +19643,14 @@ proto.lnrpc.ChanPointShim.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChanPointShim} 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.ChanPointShim.toObject = function(includeInstance, msg) { +proto.lnrpc.PendingUpdate.toObject = function(includeInstance, msg) { var f, obj = { - 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) + txid: msg.getTxid_asB64(), + outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -19054,23 +19664,23 @@ proto.lnrpc.ChanPointShim.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanPointShim} + * @return {!proto.lnrpc.PendingUpdate} */ -proto.lnrpc.ChanPointShim.deserializeBinary = function(bytes) { +proto.lnrpc.PendingUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanPointShim; - return proto.lnrpc.ChanPointShim.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.ChanPointShim} 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.ChanPointShim} + * @return {!proto.lnrpc.PendingUpdate} */ -proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19078,30 +19688,12 @@ proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - 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); + msg.setTxid(value); break; - case 6: + case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setThawHeight(value); + msg.setOutputIndex(value); break; default: reader.skipField(); @@ -19116,9 +19708,9 @@ proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChanPointShim.prototype.serializeBinary = function() { +proto.lnrpc.PendingUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanPointShim.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19126,53 +19718,23 @@ proto.lnrpc.ChanPointShim.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanPointShim} message + * @param {!proto.lnrpc.PendingUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - 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(); + f = message.getTxid_asU8(); if (f.length > 0) { writer.writeBytes( - 5, + 1, f ); } - f = message.getThawHeight(); + f = message.getOutputIndex(); if (f !== 0) { writer.writeUint32( - 6, + 2, f ); } @@ -19180,196 +19742,62 @@ proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { /** - * optional int64 amt = 1; - * @return {number} - */ -proto.lnrpc.ChanPointShim.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.setAmt = function(value) { - return 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 - * @return {!proto.lnrpc.ChanPointShim} returns this -*/ -proto.lnrpc.ChanPointShim.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.clearChanPoint = function() { - return 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 - * @return {!proto.lnrpc.ChanPointShim} returns this -*/ -proto.lnrpc.ChanPointShim.prototype.setLocalKey = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.clearLocalKey = function() { - return 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.ChanPointShim.prototype.getRemoteKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRemoteKey())); -}; - - -/** - * 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 - * @return {!proto.lnrpc.ChanPointShim} returns this - */ -proto.lnrpc.ChanPointShim.prototype.setRemoteKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional bytes pending_chan_id = 5; + * optional bytes txid = 1; * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChanPointShim.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.PendingUpdate.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes pending_chan_id = 5; - * This is a type-conversion wrapper around `getPendingChanId()` + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` * @return {string} */ -proto.lnrpc.ChanPointShim.prototype.getPendingChanId_asB64 = function() { +proto.lnrpc.PendingUpdate.prototype.getTxid_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); + this.getTxid())); }; /** - * optional bytes pending_chan_id = 5; + * 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 `getPendingChanId()` + * This is a type-conversion wrapper around `getTxid()` * @return {!Uint8Array} */ -proto.lnrpc.ChanPointShim.prototype.getPendingChanId_asU8 = function() { +proto.lnrpc.PendingUpdate.prototype.getTxid_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); + this.getTxid())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChanPointShim} returns this + * @return {!proto.lnrpc.PendingUpdate} returns this */ -proto.lnrpc.ChanPointShim.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.lnrpc.PendingUpdate.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 thaw_height = 6; + * optional uint32 output_index = 2; * @return {number} */ -proto.lnrpc.ChanPointShim.prototype.getThawHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChanPointShim} returns this + * @return {!proto.lnrpc.PendingUpdate} returns this */ -proto.lnrpc.ChanPointShim.prototype.setThawHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -19389,8 +19817,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PsbtShim.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PsbtShim.toObject(opt_includeInstance, this); +proto.lnrpc.ReadyForPsbtFunding.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ReadyForPsbtFunding.toObject(opt_includeInstance, this); }; @@ -19399,15 +19827,15 @@ proto.lnrpc.PsbtShim.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PsbtShim} 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.PsbtShim.toObject = function(includeInstance, msg) { +proto.lnrpc.ReadyForPsbtFunding.toObject = function(includeInstance, msg) { var f, obj = { - pendingChanId: msg.getPendingChanId_asB64(), - basePsbt: msg.getBasePsbt_asB64(), - noPublish: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + fundingAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + fundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), + psbt: msg.getPsbt_asB64() }; if (includeInstance) { @@ -19421,23 +19849,23 @@ proto.lnrpc.PsbtShim.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PsbtShim} + * @return {!proto.lnrpc.ReadyForPsbtFunding} */ -proto.lnrpc.PsbtShim.deserializeBinary = function(bytes) { +proto.lnrpc.ReadyForPsbtFunding.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PsbtShim; - return proto.lnrpc.PsbtShim.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.PsbtShim} 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.PsbtShim} + * @return {!proto.lnrpc.ReadyForPsbtFunding} */ -proto.lnrpc.PsbtShim.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19445,16 +19873,16 @@ proto.lnrpc.PsbtShim.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); + var value = /** @type {string} */ (reader.readString()); + msg.setFundingAddress(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBasePsbt(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFundingAmount(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setNoPublish(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPsbt(value); break; default: reader.skipField(); @@ -19469,9 +19897,9 @@ proto.lnrpc.PsbtShim.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PsbtShim.prototype.serializeBinary = function() { +proto.lnrpc.ReadyForPsbtFunding.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PsbtShim.serializeBinaryToWriter(this, writer); + proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19479,29 +19907,29 @@ proto.lnrpc.PsbtShim.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PsbtShim} message + * @param {!proto.lnrpc.ReadyForPsbtFunding} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PsbtShim.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPendingChanId_asU8(); + f = message.getFundingAddress(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getBasePsbt_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getFundingAmount(); + if (f !== 0) { + writer.writeInt64( 2, f ); } - f = message.getNoPublish(); - if (f) { - writer.writeBool( + f = message.getPsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( 3, f ); @@ -19510,133 +19938,90 @@ proto.lnrpc.PsbtShim.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes pending_chan_id = 1; - * @return {!(string|Uint8Array)} + * optional string funding_address = 1; + * @return {string} */ -proto.lnrpc.PsbtShim.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes pending_chan_id = 1; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} + * @param {string} value + * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this */ -proto.lnrpc.PsbtShim.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); +proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * 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} + * optional int64 funding_amount = 2; + * @return {number} */ -proto.lnrpc.PsbtShim.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); +proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PsbtShim} returns this + * @param {number} value + * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this */ -proto.lnrpc.PsbtShim.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bytes base_psbt = 2; + * optional bytes psbt = 3; * @return {!(string|Uint8Array)} */ -proto.lnrpc.PsbtShim.prototype.getBasePsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes base_psbt = 2; - * This is a type-conversion wrapper around `getBasePsbt()` + * optional bytes psbt = 3; + * This is a type-conversion wrapper around `getPsbt()` * @return {string} */ -proto.lnrpc.PsbtShim.prototype.getBasePsbt_asB64 = function() { +proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBasePsbt())); + this.getPsbt())); }; /** - * optional bytes base_psbt = 2; + * 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 `getBasePsbt()` + * This is a type-conversion wrapper around `getPsbt()` * @return {!Uint8Array} */ -proto.lnrpc.PsbtShim.prototype.getBasePsbt_asU8 = function() { +proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBasePsbt())); + this.getPsbt())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PsbtShim} returns this - */ -proto.lnrpc.PsbtShim.prototype.setBasePsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional bool no_publish = 3; - * @return {boolean} - */ -proto.lnrpc.PsbtShim.prototype.getNoPublish = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.PsbtShim} returns this + * @return {!proto.lnrpc.ReadyForPsbtFunding} returns this */ -proto.lnrpc.PsbtShim.prototype.setNoPublish = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.lnrpc.ReadyForPsbtFunding.prototype.setPsbt = function(value) { + return jspb.Message.setProto3BytesField(this, 3, 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>} + * List of repeated fields within this message type. + * @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])); -}; +proto.lnrpc.BatchOpenChannelRequest.repeatedFields_ = [1]; @@ -19653,8 +20038,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FundingShim.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingShim.toObject(opt_includeInstance, this); +proto.lnrpc.BatchOpenChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BatchOpenChannelRequest.toObject(opt_includeInstance, this); }; @@ -19663,14 +20048,19 @@ proto.lnrpc.FundingShim.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingShim} msg The msg instance to transform. + * @param {!proto.lnrpc.BatchOpenChannelRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingShim.toObject = function(includeInstance, msg) { +proto.lnrpc.BatchOpenChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanPointShim: (f = msg.getChanPointShim()) && proto.lnrpc.ChanPointShim.toObject(includeInstance, f), - psbtShim: (f = msg.getPsbtShim()) && proto.lnrpc.PsbtShim.toObject(includeInstance, f) + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.BatchOpenChannel.toObject, includeInstance), + targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0), + atomsPerByte: jspb.Message.getFieldWithDefault(msg, 3, 0), + minConfs: jspb.Message.getFieldWithDefault(msg, 4, 0), + spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + label: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -19684,23 +20074,23 @@ proto.lnrpc.FundingShim.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingShim} + * @return {!proto.lnrpc.BatchOpenChannelRequest} */ -proto.lnrpc.FundingShim.deserializeBinary = function(bytes) { +proto.lnrpc.BatchOpenChannelRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingShim; - return proto.lnrpc.FundingShim.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.BatchOpenChannelRequest; + return proto.lnrpc.BatchOpenChannelRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.FundingShim} msg The message object to deserialize into. + * @param {!proto.lnrpc.BatchOpenChannelRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingShim} + * @return {!proto.lnrpc.BatchOpenChannelRequest} */ -proto.lnrpc.FundingShim.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BatchOpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19708,14 +20098,29 @@ proto.lnrpc.FundingShim.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChanPointShim; - reader.readMessage(value,proto.lnrpc.ChanPointShim.deserializeBinaryFromReader); - msg.setChanPointShim(value); + var value = new proto.lnrpc.BatchOpenChannel; + reader.readMessage(value,proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader); + msg.addChannels(value); break; case 2: - var value = new proto.lnrpc.PsbtShim; - reader.readMessage(value,proto.lnrpc.PsbtShim.deserializeBinaryFromReader); - msg.setPsbtShim(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAtomsPerByte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSpendUnconfirmed(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); break; default: reader.skipField(); @@ -19730,9 +20135,9 @@ proto.lnrpc.FundingShim.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FundingShim.prototype.serializeBinary = function() { +proto.lnrpc.BatchOpenChannelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingShim.serializeBinaryToWriter(this, writer); + proto.lnrpc.BatchOpenChannelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19740,102 +20145,183 @@ proto.lnrpc.FundingShim.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingShim} message + * @param {!proto.lnrpc.BatchOpenChannelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingShim.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BatchOpenChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPointShim(); - if (f != null) { - writer.writeMessage( + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.lnrpc.ChanPointShim.serializeBinaryToWriter + proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter ); } - f = message.getPsbtShim(); - if (f != null) { - writer.writeMessage( + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( 2, - f, - proto.lnrpc.PsbtShim.serializeBinaryToWriter + f + ); + } + f = message.getAtomsPerByte(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getSpendUnconfirmed(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 6, + f ); } }; /** - * optional ChanPointShim chan_point_shim = 1; - * @return {?proto.lnrpc.ChanPointShim} + * repeated BatchOpenChannel channels = 1; + * @return {!Array} */ -proto.lnrpc.FundingShim.prototype.getChanPointShim = function() { - return /** @type{?proto.lnrpc.ChanPointShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChanPointShim, 1)); +proto.lnrpc.BatchOpenChannelRequest.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.BatchOpenChannel, 1)); }; /** - * @param {?proto.lnrpc.ChanPointShim|undefined} value - * @return {!proto.lnrpc.FundingShim} returns this + * @param {!Array} value + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this */ -proto.lnrpc.FundingShim.prototype.setChanPointShim = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingShim.oneofGroups_[0], value); +proto.lnrpc.BatchOpenChannelRequest.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingShim} returns this + * @param {!proto.lnrpc.BatchOpenChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.BatchOpenChannel} */ -proto.lnrpc.FundingShim.prototype.clearChanPointShim = function() { - return this.setChanPointShim(undefined); +proto.lnrpc.BatchOpenChannelRequest.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.BatchOpenChannel, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this */ -proto.lnrpc.FundingShim.prototype.hasChanPointShim = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.BatchOpenChannelRequest.prototype.clearChannelsList = function() { + return this.setChannelsList([]); }; /** - * optional PsbtShim psbt_shim = 2; - * @return {?proto.lnrpc.PsbtShim} + * optional int32 target_conf = 2; + * @return {number} */ -proto.lnrpc.FundingShim.prototype.getPsbtShim = function() { - return /** @type{?proto.lnrpc.PsbtShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PsbtShim, 2)); +proto.lnrpc.BatchOpenChannelRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {?proto.lnrpc.PsbtShim|undefined} value - * @return {!proto.lnrpc.FundingShim} returns this -*/ -proto.lnrpc.FundingShim.prototype.setPsbtShim = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingShim.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.setTargetConf = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingShim} returns this + * optional int64 atoms_per_byte = 3; + * @return {number} */ -proto.lnrpc.FundingShim.prototype.clearPsbtShim = function() { - return this.setPsbtShim(undefined); +proto.lnrpc.BatchOpenChannelRequest.prototype.getAtomsPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Returns whether this field is set. + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.setAtomsPerByte = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 min_confs = 4; + * @return {number} + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.setMinConfs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool spend_unconfirmed = 5; * @return {boolean} */ -proto.lnrpc.FundingShim.prototype.hasPsbtShim = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.BatchOpenChannelRequest.prototype.getSpendUnconfirmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional string label = 6; + * @return {string} + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.BatchOpenChannelRequest} returns this + */ +proto.lnrpc.BatchOpenChannelRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; @@ -19855,8 +20341,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FundingShimCancel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingShimCancel.toObject(opt_includeInstance, this); +proto.lnrpc.BatchOpenChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BatchOpenChannel.toObject(opt_includeInstance, this); }; @@ -19865,13 +20351,21 @@ proto.lnrpc.FundingShimCancel.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingShimCancel} msg The msg instance to transform. + * @param {!proto.lnrpc.BatchOpenChannel} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingShimCancel.toObject = function(includeInstance, msg) { +proto.lnrpc.BatchOpenChannel.toObject = function(includeInstance, msg) { var f, obj = { - pendingChanId: msg.getPendingChanId_asB64() + nodePubkey: msg.getNodePubkey_asB64(), + localFundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), + pushAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), + pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), + remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 6, 0), + closeAddress: jspb.Message.getFieldWithDefault(msg, 7, ""), + pendingChanId: msg.getPendingChanId_asB64(), + commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -19885,23 +20379,23 @@ proto.lnrpc.FundingShimCancel.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingShimCancel} + * @return {!proto.lnrpc.BatchOpenChannel} */ -proto.lnrpc.FundingShimCancel.deserializeBinary = function(bytes) { +proto.lnrpc.BatchOpenChannel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingShimCancel; - return proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.BatchOpenChannel; + return proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.FundingShimCancel} msg The message object to deserialize into. + * @param {!proto.lnrpc.BatchOpenChannel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingShimCancel} + * @return {!proto.lnrpc.BatchOpenChannel} */ -proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19909,9 +20403,41 @@ proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNodePubkey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalFundingAmount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPushAtoms(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinHtlcMAtoms(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRemoteCsvDelay(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setCloseAddress(value); + break; + case 8: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPendingChanId(value); break; + case 9: + var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); + msg.setCommitmentType(value); + break; default: reader.skipField(); break; @@ -19925,9 +20451,9 @@ proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FundingShimCancel.prototype.serializeBinary = function() { +proto.lnrpc.BatchOpenChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingShimCancel.serializeBinaryToWriter(this, writer); + proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19935,258 +20461,256 @@ proto.lnrpc.FundingShimCancel.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingShimCancel} message + * @param {!proto.lnrpc.BatchOpenChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingShimCancel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPendingChanId_asU8(); + f = message.getNodePubkey_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } + f = message.getLocalFundingAmount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPushAtoms(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getMinHtlcMAtoms(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getRemoteCsvDelay(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getCloseAddress(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getCommitmentType(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } }; /** - * optional bytes pending_chan_id = 1; + * optional bytes node_pubkey = 1; * @return {!(string|Uint8Array)} */ -proto.lnrpc.FundingShimCancel.prototype.getPendingChanId = function() { +proto.lnrpc.BatchOpenChannel.prototype.getNodePubkey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes pending_chan_id = 1; - * This is a type-conversion wrapper around `getPendingChanId()` + * optional bytes node_pubkey = 1; + * This is a type-conversion wrapper around `getNodePubkey()` * @return {string} */ -proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asB64 = function() { +proto.lnrpc.BatchOpenChannel.prototype.getNodePubkey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); + this.getNodePubkey())); }; /** - * optional bytes pending_chan_id = 1; + * 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 `getPendingChanId()` + * This is a type-conversion wrapper around `getNodePubkey()` * @return {!Uint8Array} */ -proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asU8 = function() { +proto.lnrpc.BatchOpenChannel.prototype.getNodePubkey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); + this.getNodePubkey())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingShimCancel} returns this + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -proto.lnrpc.FundingShimCancel.prototype.setPendingChanId = function(value) { +proto.lnrpc.BatchOpenChannel.prototype.setNodePubkey = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * optional int64 local_funding_amount = 2; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getLocalFundingAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -proto.lnrpc.FundingPsbtVerify.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingPsbtVerify.toObject(opt_includeInstance, this); +proto.lnrpc.BatchOpenChannel.prototype.setLocalFundingAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * optional int64 push_atoms = 3; + * @return {number} */ -proto.lnrpc.FundingPsbtVerify.toObject = function(includeInstance, msg) { - var f, obj = { - fundedPsbt: msg.getFundedPsbt_asB64(), - pendingChanId: msg.getPendingChanId_asB64() - }; +proto.lnrpc.BatchOpenChannel.prototype.getPushAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setPushAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingPsbtVerify} + * optional bool private = 4; + * @return {boolean} */ -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); +proto.lnrpc.BatchOpenChannel.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * 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} + * @param {boolean} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -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; +proto.lnrpc.BatchOpenChannel.prototype.setPrivate = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 min_htlc_m_atoms = 5; + * @return {number} */ -proto.lnrpc.FundingPsbtVerify.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.BatchOpenChannel.prototype.getMinHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * 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 + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -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 - ); - } +proto.lnrpc.BatchOpenChannel.prototype.setMinHtlcMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional bytes funded_psbt = 1; - * @return {!(string|Uint8Array)} + * optional uint32 remote_csv_delay = 6; + * @return {number} */ -proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.BatchOpenChannel.prototype.getRemoteCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * optional bytes funded_psbt = 1; - * This is a type-conversion wrapper around `getFundedPsbt()` - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundedPsbt())); +proto.lnrpc.BatchOpenChannel.prototype.setRemoteCsvDelay = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * 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} + * optional string close_address = 7; + * @return {string} */ -proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundedPsbt())); +proto.lnrpc.BatchOpenChannel.prototype.getCloseAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtVerify} returns this + * @param {string} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -proto.lnrpc.FundingPsbtVerify.prototype.setFundedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.BatchOpenChannel.prototype.setCloseAddress = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * optional bytes pending_chan_id = 2; + * optional bytes pending_chan_id = 8; * @return {!(string|Uint8Array)} */ -proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.BatchOpenChannel.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** - * optional bytes pending_chan_id = 2; + * optional bytes pending_chan_id = 8; * This is a type-conversion wrapper around `getPendingChanId()` * @return {string} */ -proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asB64 = function() { +proto.lnrpc.BatchOpenChannel.prototype.getPendingChanId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPendingChanId())); }; /** - * optional bytes pending_chan_id = 2; + * optional bytes pending_chan_id = 8; * 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.FundingPsbtVerify.prototype.getPendingChanId_asU8 = function() { +proto.lnrpc.BatchOpenChannel.prototype.getPendingChanId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPendingChanId())); }; @@ -20194,14 +20718,39 @@ proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtVerify} returns this + * @return {!proto.lnrpc.BatchOpenChannel} returns this */ -proto.lnrpc.FundingPsbtVerify.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.BatchOpenChannel.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional CommitmentType commitment_type = 9; + * @return {!proto.lnrpc.CommitmentType} + */ +proto.lnrpc.BatchOpenChannel.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.lnrpc.CommitmentType} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setCommitmentType = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.BatchOpenChannelResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -20217,8 +20766,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FundingPsbtFinalize.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingPsbtFinalize.toObject(opt_includeInstance, this); +proto.lnrpc.BatchOpenChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BatchOpenChannelResponse.toObject(opt_includeInstance, this); }; @@ -20227,15 +20776,14 @@ proto.lnrpc.FundingPsbtFinalize.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.BatchOpenChannelResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingPsbtFinalize.toObject = function(includeInstance, msg) { +proto.lnrpc.BatchOpenChannelResponse.toObject = function(includeInstance, msg) { var f, obj = { - signedPsbt: msg.getSignedPsbt_asB64(), - pendingChanId: msg.getPendingChanId_asB64(), - finalRawTx: msg.getFinalRawTx_asB64() + pendingChannelsList: jspb.Message.toObjectList(msg.getPendingChannelsList(), + proto.lnrpc.PendingUpdate.toObject, includeInstance) }; if (includeInstance) { @@ -20249,23 +20797,23 @@ proto.lnrpc.FundingPsbtFinalize.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingPsbtFinalize} + * @return {!proto.lnrpc.BatchOpenChannelResponse} */ -proto.lnrpc.FundingPsbtFinalize.deserializeBinary = function(bytes) { +proto.lnrpc.BatchOpenChannelResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingPsbtFinalize; - return proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.BatchOpenChannelResponse; + return proto.lnrpc.BatchOpenChannelResponse.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.BatchOpenChannelResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingPsbtFinalize} + * @return {!proto.lnrpc.BatchOpenChannelResponse} */ -proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BatchOpenChannelResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20273,16 +20821,9 @@ proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader = function(msg, read 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; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFinalRawTx(value); + var value = new proto.lnrpc.PendingUpdate; + reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); + msg.addPendingChannels(value); break; default: reader.skipField(); @@ -20297,9 +20838,9 @@ proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FundingPsbtFinalize.prototype.serializeBinary = function() { +proto.lnrpc.BatchOpenChannelResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter(this, writer); + proto.lnrpc.BatchOpenChannelResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20307,191 +20848,62 @@ proto.lnrpc.FundingPsbtFinalize.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingPsbtFinalize} message + * @param {!proto.lnrpc.BatchOpenChannelResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BatchOpenChannelResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignedPsbt_asU8(); + f = message.getPendingChannelsList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.PendingUpdate.serializeBinaryToWriter ); } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFinalRawTx_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes signed_psbt = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * 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 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.FundingPsbtFinalize.prototype.getSignedPsbt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignedPsbt())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtFinalize} returns this - */ -proto.lnrpc.FundingPsbtFinalize.prototype.setSignedPsbt = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes pending_chan_id = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.FundingPsbtFinalize.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.FundingPsbtFinalize.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.FundingPsbtFinalize.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtFinalize} returns this - */ -proto.lnrpc.FundingPsbtFinalize.prototype.setPendingChanId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional bytes final_raw_tx = 3; - * @return {!(string|Uint8Array)} + * repeated PendingUpdate pending_channels = 1; + * @return {!Array} */ -proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.BatchOpenChannelResponse.prototype.getPendingChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingUpdate, 1)); }; /** - * optional bytes final_raw_tx = 3; - * This is a type-conversion wrapper around `getFinalRawTx()` - * @return {string} - */ -proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFinalRawTx())); + * @param {!Array} value + * @return {!proto.lnrpc.BatchOpenChannelResponse} returns this +*/ +proto.lnrpc.BatchOpenChannelResponse.prototype.setPendingChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional bytes final_raw_tx = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFinalRawTx()` - * @return {!Uint8Array} + * @param {!proto.lnrpc.PendingUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingUpdate} */ -proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFinalRawTx())); +proto.lnrpc.BatchOpenChannelResponse.prototype.addPendingChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.PendingUpdate, opt_index); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.FundingPsbtFinalize} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.BatchOpenChannelResponse} returns this */ -proto.lnrpc.FundingPsbtFinalize.prototype.setFinalRawTx = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.lnrpc.BatchOpenChannelResponse.prototype.clearPendingChannelsList = function() { + return this.setPendingChannelsList([]); }; -/** - * 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) { @@ -20507,8 +20919,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FundingTransitionMsg.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingTransitionMsg.toObject(opt_includeInstance, this); +proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OpenChannelRequest.toObject(opt_includeInstance, this); }; @@ -20517,16 +20929,29 @@ proto.lnrpc.FundingTransitionMsg.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingTransitionMsg} 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.FundingTransitionMsg.toObject = function(includeInstance, msg) { +proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - 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) + nodePubkey: msg.getNodePubkey_asB64(), + nodePubkeyString: jspb.Message.getFieldWithDefault(msg, 3, ""), + localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), + pushAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), + targetConf: jspb.Message.getFieldWithDefault(msg, 6, 0), + atomsPerByte: jspb.Message.getFieldWithDefault(msg, 7, 0), + pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 9, 0), + remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 10, 0), + minConfs: jspb.Message.getFieldWithDefault(msg, 11, 0), + spendUnconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), + closeAddress: jspb.Message.getFieldWithDefault(msg, 13, ""), + fundingShim: (f = msg.getFundingShim()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), + remoteMaxValueInFlightMAtoms: jspb.Message.getFieldWithDefault(msg, 15, 0), + remoteMaxHtlcs: jspb.Message.getFieldWithDefault(msg, 16, 0), + maxLocalCsv: jspb.Message.getFieldWithDefault(msg, 17, 0), + commitmentType: jspb.Message.getFieldWithDefault(msg, 18, 0) }; if (includeInstance) { @@ -20540,48 +20965,97 @@ proto.lnrpc.FundingTransitionMsg.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingTransitionMsg} + * @return {!proto.lnrpc.OpenChannelRequest} */ -proto.lnrpc.FundingTransitionMsg.deserializeBinary = function(bytes) { +proto.lnrpc.OpenChannelRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingTransitionMsg; - return proto.lnrpc.FundingTransitionMsg.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.FundingTransitionMsg} 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.FundingTransitionMsg} + * @return {!proto.lnrpc.OpenChannelRequest} */ -proto.lnrpc.FundingTransitionMsg.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: - var value = new proto.lnrpc.FundingShim; - reader.readMessage(value,proto.lnrpc.FundingShim.deserializeBinaryFromReader); - msg.setShimRegister(value); - break; case 2: - var value = new proto.lnrpc.FundingShimCancel; - reader.readMessage(value,proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader); - msg.setShimCancel(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNodePubkey(value); break; case 3: - var value = new proto.lnrpc.FundingPsbtVerify; - reader.readMessage(value,proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader); - msg.setPsbtVerify(value); + var value = /** @type {string} */ (reader.readString()); + msg.setNodePubkeyString(value); break; case 4: - var value = new proto.lnrpc.FundingPsbtFinalize; - reader.readMessage(value,proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader); - msg.setPsbtFinalize(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalFundingAmount(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPushAtoms(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAtomsPerByte(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinHtlcMAtoms(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.setRemoteMaxValueInFlightMAtoms(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRemoteMaxHtlcs(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxLocalCsv(value); + break; + case 18: + var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); + msg.setCommitmentType(value); break; default: reader.skipField(); @@ -20596,9 +21070,9 @@ proto.lnrpc.FundingTransitionMsg.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FundingTransitionMsg.prototype.serializeBinary = function() { +proto.lnrpc.OpenChannelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter(this, writer); + proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20606,576 +21080,511 @@ proto.lnrpc.FundingTransitionMsg.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingTransitionMsg} message + * @param {!proto.lnrpc.OpenChannelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getShimRegister(); + f = message.getNodePubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getNodePubkeyString(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLocalFundingAmount(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getPushAtoms(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getAtomsPerByte(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getMinHtlcMAtoms(); + 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( - 1, + 14, f, proto.lnrpc.FundingShim.serializeBinaryToWriter ); } - f = message.getShimCancel(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.FundingShimCancel.serializeBinaryToWriter + f = message.getRemoteMaxValueInFlightMAtoms(); + if (f !== 0) { + writer.writeUint64( + 15, + f ); } - f = message.getPsbtVerify(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter + f = message.getRemoteMaxHtlcs(); + if (f !== 0) { + writer.writeUint32( + 16, + f ); } - f = message.getPsbtFinalize(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter + f = message.getMaxLocalCsv(); + if (f !== 0) { + writer.writeUint32( + 17, + f + ); + } + f = message.getCommitmentType(); + if (f !== 0.0) { + writer.writeEnum( + 18, + f ); } }; /** - * optional FundingShim shim_register = 1; - * @return {?proto.lnrpc.FundingShim} + * optional bytes node_pubkey = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.FundingTransitionMsg.prototype.getShimRegister = function() { - return /** @type{?proto.lnrpc.FundingShim} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 1)); -}; - - -/** - * @param {?proto.lnrpc.FundingShim|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setShimRegister = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this + * optional bytes node_pubkey = 2; + * This is a type-conversion wrapper around `getNodePubkey()` + * @return {string} */ -proto.lnrpc.FundingTransitionMsg.prototype.clearShimRegister = function() { - return this.setShimRegister(undefined); +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodePubkey())); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes node_pubkey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodePubkey()` + * @return {!Uint8Array} */ -proto.lnrpc.FundingTransitionMsg.prototype.hasShimRegister = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodePubkey())); }; /** - * optional FundingShimCancel shim_cancel = 2; - * @return {?proto.lnrpc.FundingShimCancel} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingTransitionMsg.prototype.getShimCancel = function() { - return /** @type{?proto.lnrpc.FundingShimCancel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingShimCancel, 2)); +proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * @param {?proto.lnrpc.FundingShimCancel|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setShimCancel = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); + * optional string node_pubkey_string = 3; + * @return {string} + */ +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkeyString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this + * @param {string} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingTransitionMsg.prototype.clearShimCancel = function() { - return this.setShimCancel(undefined); +proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional int64 local_funding_amount = 4; + * @return {number} */ -proto.lnrpc.FundingTransitionMsg.prototype.hasShimCancel = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.OpenChannelRequest.prototype.getLocalFundingAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * optional FundingPsbtVerify psbt_verify = 3; - * @return {?proto.lnrpc.FundingPsbtVerify} + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingTransitionMsg.prototype.getPsbtVerify = function() { - return /** @type{?proto.lnrpc.FundingPsbtVerify} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtVerify, 3)); +proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {?proto.lnrpc.FundingPsbtVerify|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setPsbtVerify = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); + * optional int64 push_atoms = 5; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getPushAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtVerify = function() { - return this.setPsbtVerify(undefined); +proto.lnrpc.OpenChannelRequest.prototype.setPushAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional int32 target_conf = 6; + * @return {number} */ -proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtVerify = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.OpenChannelRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * optional FundingPsbtFinalize psbt_finalize = 4; - * @return {?proto.lnrpc.FundingPsbtFinalize} + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingTransitionMsg.prototype.getPsbtFinalize = function() { - return /** @type{?proto.lnrpc.FundingPsbtFinalize} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtFinalize, 4)); +proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * @param {?proto.lnrpc.FundingPsbtFinalize|undefined} value - * @return {!proto.lnrpc.FundingTransitionMsg} returns this -*/ -proto.lnrpc.FundingTransitionMsg.prototype.setPsbtFinalize = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); + * optional int64 atoms_per_byte = 7; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getAtomsPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.FundingTransitionMsg} returns this + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtFinalize = function() { - return this.setPsbtFinalize(undefined); +proto.lnrpc.OpenChannelRequest.prototype.setAtomsPerByte = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * Returns whether this field is set. + * optional bool private = 8; * @return {boolean} */ -proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtFinalize = function() { - return jspb.Message.getField(this, 4) != null; +proto.lnrpc.OpenChannelRequest.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {boolean} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingStateStepResp.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FundingStateStepResp.toObject(opt_includeInstance, this); +proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FundingStateStepResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 min_htlc_m_atoms = 9; + * @return {number} */ -proto.lnrpc.FundingStateStepResp.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.OpenChannelRequest.prototype.getMinHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FundingStateStepResp} + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingStateStepResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FundingStateStepResp; - return proto.lnrpc.FundingStateStepResp.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMAtoms = function(value) { + return 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.FundingStateStepResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FundingStateStepResp} + * optional uint32 remote_csv_delay = 10; + * @return {number} */ -proto.lnrpc.FundingStateStepResp.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.OpenChannelRequest.prototype.getRemoteCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.FundingStateStepResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.OpenChannelRequest.prototype.setRemoteCsvDelay = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FundingStateStepResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int32 min_confs = 11; + * @return {number} */ -proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.OpenChannelRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; +/** + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this + */ +proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional bool spend_unconfirmed = 12; + * @return {boolean} */ -proto.lnrpc.PendingHTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingHTLC.toObject(opt_includeInstance, this); +proto.lnrpc.OpenChannelRequest.prototype.getSpendUnconfirmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingHTLC} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {boolean} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.toObject = function(includeInstance, msg) { - var f, obj = { - incoming: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - outpoint: jspb.Message.getFieldWithDefault(msg, 3, ""), - maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), - stage: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.OpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { + return jspb.Message.setProto3BooleanField(this, 12, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingHTLC} + * optional string close_address = 13; + * @return {string} */ -proto.lnrpc.PendingHTLC.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingHTLC; - return proto.lnrpc.PendingHTLC.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.OpenChannelRequest.prototype.getCloseAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingHTLC} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingHTLC} + * @param {string} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncoming(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setOutpoint(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaturityHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlocksTilMaturity(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.OpenChannelRequest.prototype.setCloseAddress = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional FundingShim funding_shim = 14; + * @return {?proto.lnrpc.FundingShim} */ -proto.lnrpc.PendingHTLC.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.OpenChannelRequest.prototype.getFundingShim = function() { + return /** @type{?proto.lnrpc.FundingShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 14)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingHTLC} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncoming(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getOutpoint(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMaturityHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBlocksTilMaturity(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getStage(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } + * @param {?proto.lnrpc.FundingShim|undefined} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this +*/ +proto.lnrpc.OpenChannelRequest.prototype.setFundingShim = function(value) { + return jspb.Message.setWrapperField(this, 14, value); }; /** - * optional bool incoming = 1; - * @return {boolean} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.prototype.getIncoming = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.OpenChannelRequest.prototype.clearFundingShim = function() { + return this.setFundingShim(undefined); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.PendingHTLC} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.OpenChannelRequest.prototype.hasFundingShim = function() { + return jspb.Message.getField(this, 14) != null; }; /** - * optional int64 amount = 2; + * optional uint64 remote_max_value_in_flight_m_atoms = 15; * @return {number} */ -proto.lnrpc.PendingHTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxValueInFlightMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxValueInFlightMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); }; /** - * optional string outpoint = 3; - * @return {string} + * optional uint32 remote_max_htlcs = 16; + * @return {number} */ -proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.PendingHTLC} returns this + * @param {number} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxHtlcs = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); }; /** - * optional uint32 maturity_height = 4; + * optional uint32 max_local_csv = 17; * @return {number} */ -proto.lnrpc.PendingHTLC.prototype.getMaturityHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.OpenChannelRequest.prototype.getMaxLocalCsv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.prototype.setMaturityHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.OpenChannelRequest.prototype.setMaxLocalCsv = function(value) { + return jspb.Message.setProto3IntField(this, 17, value); }; /** - * optional int32 blocks_til_maturity = 5; - * @return {number} + * optional CommitmentType commitment_type = 18; + * @return {!proto.lnrpc.CommitmentType} */ -proto.lnrpc.PendingHTLC.prototype.getBlocksTilMaturity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.OpenChannelRequest.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this + * @param {!proto.lnrpc.CommitmentType} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this */ -proto.lnrpc.PendingHTLC.prototype.setBlocksTilMaturity = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.OpenChannelRequest.prototype.setCommitmentType = function(value) { + return jspb.Message.setProto3EnumField(this, 18, value); }; + /** - * optional uint32 stage = 6; - * @return {number} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.lnrpc.PendingHTLC.prototype.getStage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - +proto.lnrpc.OpenStatusUpdate.oneofGroups_ = [[1,3,5]]; /** - * @param {number} value - * @return {!proto.lnrpc.PendingHTLC} returns this + * @enum {number} */ -proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +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])); +}; @@ -21192,8 +21601,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); }; @@ -21202,13 +21611,16 @@ proto.lnrpc.PendingChannelsRequest.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. 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.OpenStatusUpdate} 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.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), + psbtFund: (f = msg.getPsbtFund()) && proto.lnrpc.ReadyForPsbtFunding.toObject(includeInstance, f), + pendingChanId: msg.getPendingChanId_asB64() }; if (includeInstance) { @@ -21222,29 +21634,48 @@ 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.OpenStatusUpdate} */ -proto.lnrpc.PendingChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.OpenStatusUpdate.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.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.PendingChannelsRequest} 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.PendingChannelsRequest} + * @return {!proto.lnrpc.OpenStatusUpdate} */ -proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +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; + 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(); break; @@ -21258,9 +21689,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.OpenStatusUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21268,63 +21699,233 @@ 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.OpenStatusUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter = function(message, writer) { +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 + ); + } + 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 + ); + } }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PendingChannelsResponse.repeatedFields_ = [2,3,4,5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional PendingUpdate chan_pending = 1; + * @return {?proto.lnrpc.PendingUpdate} */ -proto.lnrpc.PendingChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * @param {?proto.lnrpc.PendingUpdate|undefined} value + * @return {!proto.lnrpc.OpenStatusUpdate} returns this +*/ +proto.lnrpc.OpenStatusUpdate.prototype.setChanPending = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.OpenStatusUpdate} returns this + */ +proto.lnrpc.OpenStatusUpdate.prototype.clearChanPending = function() { + return this.setChanPending(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChannelOpenUpdate chan_open = 3; + * @return {?proto.lnrpc.ChannelOpenUpdate} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { + return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); +}; + + +/** + * @param {?proto.lnrpc.ChannelOpenUpdate|undefined} value + * @return {!proto.lnrpc.OpenStatusUpdate} returns this +*/ +proto.lnrpc.OpenStatusUpdate.prototype.setChanOpen = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.OpenStatusUpdate} returns this + */ +proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { + return this.setChanOpen(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ReadyForPsbtFunding psbt_fund = 5; + * @return {?proto.lnrpc.ReadyForPsbtFunding} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getPsbtFund = function() { + return /** @type{?proto.lnrpc.ReadyForPsbtFunding} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ReadyForPsbtFunding, 5)); +}; + + +/** + * @param {?proto.lnrpc.ReadyForPsbtFunding|undefined} value + * @return {!proto.lnrpc.OpenStatusUpdate} returns this +*/ +proto.lnrpc.OpenStatusUpdate.prototype.setPsbtFund = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.OpenStatusUpdate} returns this + */ +proto.lnrpc.OpenStatusUpdate.prototype.clearPsbtFund = function() { + return this.setPsbtFund(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.OpenStatusUpdate.prototype.hasPsbtFund = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes pending_chan_id = 4; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes pending_chan_id = 4; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); +}; + + +/** + * 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 `getPendingChanId()` + * @return {!Uint8Array} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.OpenStatusUpdate} returns this + */ +proto.lnrpc.OpenStatusUpdate.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.KeyLocator.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.KeyLocator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.KeyLocator} 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.KeyLocator.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) + keyFamily: jspb.Message.getFieldWithDefault(msg, 1, 0), + keyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -21338,23 +21939,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.KeyLocator} */ -proto.lnrpc.PendingChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.KeyLocator.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.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.PendingChannelsResponse} 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.PendingChannelsResponse} + * @return {!proto.lnrpc.KeyLocator} */ -proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21362,28 +21963,12 @@ 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 = /** @type {number} */ (reader.readInt32()); + msg.setKeyFamily(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.readInt32()); + msg.setKeyIndex(value); break; default: reader.skipField(); @@ -21398,9 +21983,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.KeyLocator.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.KeyLocator.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21408,54 +21993,65 @@ 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.KeyLocator} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.KeyLocator.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalLimboBalance(); + f = message.getKeyFamily(); if (f !== 0) { - writer.writeInt64( + writer.writeInt32( 1, f ); } - f = message.getPendingOpenChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getKeyIndex(); + if (f !== 0) { + writer.writeInt32( 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 + f ); } }; +/** + * optional int32 key_family = 1; + * @return {number} + */ +proto.lnrpc.KeyLocator.prototype.getKeyFamily = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.KeyLocator} returns this + */ +proto.lnrpc.KeyLocator.prototype.setKeyFamily = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 key_index = 2; + * @return {number} + */ +proto.lnrpc.KeyLocator.prototype.getKeyIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.KeyLocator} returns this + */ +proto.lnrpc.KeyLocator.prototype.setKeyIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + @@ -21472,8 +22068,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.KeyDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.KeyDescriptor.toObject(opt_includeInstance, this); }; @@ -21482,21 +22078,14 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.toObject = function * @param {boolean|undefined} includeInstance Deprecated. 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.KeyDescriptor} 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.KeyDescriptor.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), - localChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), - initiator: jspb.Message.getFieldWithDefault(msg, 8, 0), - commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0) + rawKeyBytes: msg.getRawKeyBytes_asB64(), + keyLoc: (f = msg.getKeyLoc()) && proto.lnrpc.KeyLocator.toObject(includeInstance, f) }; if (includeInstance) { @@ -21510,23 +22099,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.KeyDescriptor} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinary = function(bytes) { +proto.lnrpc.KeyDescriptor.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.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.PendingChannelsResponse.PendingChannel} 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.PendingChannelsResponse.PendingChannel} + * @return {!proto.lnrpc.KeyDescriptor} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21534,40 +22123,13 @@ 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 {!Uint8Array} */ (reader.readBytes()); + msg.setRawKeyBytes(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.setLocalChanReserveAtoms(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteChanReserveAtoms(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); + var value = new proto.lnrpc.KeyLocator; + reader.readMessage(value,proto.lnrpc.KeyLocator.deserializeBinaryFromReader); + msg.setKeyLoc(value); break; default: reader.skipField(); @@ -21582,9 +22144,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.KeyDescriptor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.KeyDescriptor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21592,237 +22154,106 @@ 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.KeyDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.KeyDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRemoteNodePub(); + f = message.getRawKeyBytes_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( + f = message.getKeyLoc(); + if (f != null) { + writer.writeMessage( 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.getLocalChanReserveAtoms(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getRemoteChanReserveAtoms(); - 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 + f, + proto.lnrpc.KeyLocator.serializeBinaryToWriter ); } }; /** - * optional string remote_node_pub = 1; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + * optional bytes raw_key_bytes = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional string channel_point = 2; + * optional bytes raw_key_bytes = 1; + * This is a type-conversion wrapper around `getRawKeyBytes()` * @return {string} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRawKeyBytes())); }; /** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + * 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.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRawKeyBytes())); }; /** - * optional int64 capacity = 3; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.KeyDescriptor} returns this */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.KeyDescriptor.prototype.setRawKeyBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + * optional KeyLocator key_loc = 2; + * @return {?proto.lnrpc.KeyLocator} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.KeyDescriptor.prototype.getKeyLoc = function() { + return /** @type{?proto.lnrpc.KeyLocator} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.KeyLocator, 2)); }; /** - * optional int64 local_balance = 4; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + * @param {?proto.lnrpc.KeyLocator|undefined} value + * @return {!proto.lnrpc.KeyDescriptor} returns this +*/ +proto.lnrpc.KeyDescriptor.prototype.setKeyLoc = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + * Clears the message field making it undefined. + * @return {!proto.lnrpc.KeyDescriptor} returns this */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.KeyDescriptor.prototype.clearKeyLoc = function() { + return this.setKeyLoc(undefined); }; /** - * 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 - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 local_chan_reserve_atoms = 6; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalChanReserveAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalChanReserveAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 remote_chan_reserve_atoms = 7; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteChanReserveAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserveAtoms = function(value) { - return 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 - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setInitiator = function(value) { - return 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 - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCommitmentType = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); +proto.lnrpc.KeyDescriptor.prototype.hasKeyLoc = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -21842,8 +22273,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChanPointShim.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanPointShim.toObject(opt_includeInstance, this); }; @@ -21852,17 +22283,18 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = func * @param {boolean|undefined} includeInstance Deprecated. 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.ChanPointShim} 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.ChanPointShim.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), - commitSize: jspb.Message.getFieldWithDefault(msg, 5, 0), - feePerKb: jspb.Message.getFieldWithDefault(msg, 6, 0) + 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) { @@ -21876,23 +22308,23 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + * @return {!proto.lnrpc.ChanPointShim} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinary = function(bytes) { +proto.lnrpc.ChanPointShim.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.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.PendingChannelsResponse.PendingOpenChannel} 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.PendingChannelsResponse.PendingOpenChannel} + * @return {!proto.lnrpc.ChanPointShim} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21900,25 +22332,30 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmt(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfirmationHeight(value); + 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 {number} */ (reader.readInt64()); - msg.setCommitFee(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRemoteKey(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitSize(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKb(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setThawHeight(value); break; default: reader.skipField(); @@ -21933,9 +22370,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.ChanPointShim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanPointShim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21943,44 +22380,52 @@ 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.ChanPointShim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); + f = message.getAmt(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getChanPoint(); if (f != null) { writer.writeMessage( - 1, + 2, f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getConfirmationHeight(); - if (f !== 0) { - writer.writeUint32( - 2, - f + f = message.getLocalKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.KeyDescriptor.serializeBinaryToWriter ); } - f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( + f = message.getRemoteKey_asU8(); + if (f.length > 0) { + writer.writeBytes( 4, f ); } - f = message.getCommitSize(); - if (f !== 0) { - writer.writeInt64( + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( 5, f ); } - f = message.getFeePerKb(); + f = message.getThawHeight(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 6, f ); @@ -21989,30 +22434,48 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + * optional int64 amt = 1; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); +proto.lnrpc.ChanPointShim.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + * @param {number} value + * @return {!proto.lnrpc.ChanPointShim} returns this + */ +proto.lnrpc.ChanPointShim.prototype.setAmt = function(value) { + return 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 + * @return {!proto.lnrpc.ChanPointShim} returns this */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.lnrpc.ChanPointShim.prototype.setChanPoint = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + * @return {!proto.lnrpc.ChanPointShim} returns this */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); +proto.lnrpc.ChanPointShim.prototype.clearChanPoint = function() { + return this.setChanPoint(undefined); }; @@ -22020,79 +22483,146 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.ChanPointShim.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint32 confirmation_height = 2; - * @return {number} + * optional KeyDescriptor local_key = 3; + * @return {?proto.lnrpc.KeyDescriptor} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getConfirmationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChanPointShim.prototype.getLocalKey = function() { + return /** @type{?proto.lnrpc.KeyDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.KeyDescriptor, 3)); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + * @param {?proto.lnrpc.KeyDescriptor|undefined} value + * @return {!proto.lnrpc.ChanPointShim} returns this +*/ +proto.lnrpc.ChanPointShim.prototype.setLocalKey = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChanPointShim} returns this */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmationHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ChanPointShim.prototype.clearLocalKey = function() { + return this.setLocalKey(undefined); }; /** - * optional int64 commit_fee = 4; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChanPointShim.prototype.hasLocalKey = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + * optional bytes remote_key = 4; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.ChanPointShim.prototype.getRemoteKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional int64 commit_size = 5; - * @return {number} + * optional bytes remote_key = 4; + * This is a type-conversion wrapper around `getRemoteKey()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChanPointShim.prototype.getRemoteKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRemoteKey())); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + * 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.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitSize = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ChanPointShim.prototype.getRemoteKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRemoteKey())); }; /** - * optional int64 fee_per_kb = 6; + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChanPointShim} returns this + */ +proto.lnrpc.ChanPointShim.prototype.setRemoteKey = function(value) { + return 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 + * @return {!proto.lnrpc.ChanPointShim} returns this + */ +proto.lnrpc.ChanPointShim.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional uint32 thaw_height = 6; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKb = function() { +proto.lnrpc.ChanPointShim.prototype.getThawHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + * @return {!proto.lnrpc.ChanPointShim} returns this */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKb = function(value) { +proto.lnrpc.ChanPointShim.prototype.setThawHeight = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; @@ -22113,8 +22643,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PsbtShim.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PsbtShim.toObject(opt_includeInstance, this); }; @@ -22123,15 +22653,15 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = fun * @param {boolean|undefined} includeInstance Deprecated. 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.PsbtShim} 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.PsbtShim.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) + pendingChanId: msg.getPendingChanId_asB64(), + basePsbt: msg.getBasePsbt_asB64(), + noPublish: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -22145,23 +22675,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.PsbtShim} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinary = function(bytes) { +proto.lnrpc.PsbtShim.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.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.PendingChannelsResponse.WaitingCloseChannel} 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.PendingChannelsResponse.WaitingCloseChannel} + * @return {!proto.lnrpc.PsbtShim} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PsbtShim.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22169,18 +22699,16 @@ 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 {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBasePsbt(value); break; case 3: - var value = new proto.lnrpc.PendingChannelsResponse.Commitments; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader); - msg.setCommitments(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoPublish(value); break; default: reader.skipField(); @@ -22195,9 +22723,9 @@ 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.PsbtShim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.PsbtShim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22205,131 +22733,165 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} message + * @param {!proto.lnrpc.PsbtShim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PsbtShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter + f ); } - f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getBasePsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); } - f = message.getCommitments(); - if (f != null) { - writer.writeMessage( + f = message.getNoPublish(); + if (f) { + writer.writeBool( 3, - f, - proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter + f ); } }; /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + * optional bytes pending_chan_id = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); +proto.lnrpc.PsbtShim.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * 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())); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this + * 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.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); +proto.lnrpc.PsbtShim.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.PsbtShim} returns this */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.PsbtShim.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional int64 limbo_balance = 2; - * @return {number} + * optional bytes base_psbt = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PsbtShim.prototype.getBasePsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this + * optional bytes base_psbt = 2; + * This is a type-conversion wrapper around `getBasePsbt()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.PsbtShim.prototype.getBasePsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBasePsbt())); }; /** - * optional Commitments commitments = 3; - * @return {?proto.lnrpc.PendingChannelsResponse.Commitments} + * 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.PendingChannelsResponse.WaitingCloseChannel.prototype.getCommitments = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.Commitments} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.Commitments, 3)); +proto.lnrpc.PsbtShim.prototype.getBasePsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBasePsbt())); }; /** - * @param {?proto.lnrpc.PendingChannelsResponse.Commitments|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setCommitments = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.PsbtShim} returns this + */ +proto.lnrpc.PsbtShim.prototype.setBasePsbt = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this + * optional bool no_publish = 3; + * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearCommitments = function() { - return this.setCommitments(undefined); +proto.lnrpc.PsbtShim.prototype.getNoPublish = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.lnrpc.PsbtShim} returns this */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasCommitments = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.PsbtShim.prototype.setNoPublish = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, 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 + */ +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) { @@ -22345,8 +22907,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.Commitments.toObject(opt_includeInstance, this); +proto.lnrpc.FundingShim.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingShim.toObject(opt_includeInstance, this); }; @@ -22355,18 +22917,14 @@ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.Commitments} 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.PendingChannelsResponse.Commitments.toObject = function(includeInstance, msg) { +proto.lnrpc.FundingShim.toObject = function(includeInstance, msg) { var f, obj = { - localTxid: jspb.Message.getFieldWithDefault(msg, 1, ""), - remoteTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), - remotePendingTxid: jspb.Message.getFieldWithDefault(msg, 3, ""), - localCommitFeeAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), - remoteCommitFeeAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), - remotePendingCommitFeeAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0) + chanPointShim: (f = msg.getChanPointShim()) && proto.lnrpc.ChanPointShim.toObject(includeInstance, f), + psbtShim: (f = msg.getPsbtShim()) && proto.lnrpc.PsbtShim.toObject(includeInstance, f) }; if (includeInstance) { @@ -22380,23 +22938,23 @@ proto.lnrpc.PendingChannelsResponse.Commitments.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} + * @return {!proto.lnrpc.FundingShim} */ -proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinary = function(bytes) { +proto.lnrpc.FundingShim.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.Commitments; - return proto.lnrpc.PendingChannelsResponse.Commitments.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.PendingChannelsResponse.Commitments} 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.PendingChannelsResponse.Commitments} + * @return {!proto.lnrpc.FundingShim} */ -proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingShim.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22404,28 +22962,14 @@ proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setLocalTxid(value); + var value = new proto.lnrpc.ChanPointShim; + reader.readMessage(value,proto.lnrpc.ChanPointShim.deserializeBinaryFromReader); + msg.setChanPointShim(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.setLocalCommitFeeAtoms(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemoteCommitFeeAtoms(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemotePendingCommitFeeAtoms(value); + var value = new proto.lnrpc.PsbtShim; + reader.readMessage(value,proto.lnrpc.PsbtShim.deserializeBinaryFromReader); + msg.setPsbtShim(value); break; default: reader.skipField(); @@ -22440,9 +22984,9 @@ proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.serializeBinary = function() { +proto.lnrpc.FundingShim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingShim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22450,162 +22994,102 @@ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.Commitments} message + * @param {!proto.lnrpc.FundingShim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLocalTxid(); - if (f.length > 0) { - writer.writeString( + f = message.getChanPointShim(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.ChanPointShim.serializeBinaryToWriter ); } - f = message.getRemoteTxid(); - if (f.length > 0) { - writer.writeString( + f = message.getPsbtShim(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getRemotePendingTxid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getLocalCommitFeeAtoms(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getRemoteCommitFeeAtoms(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getRemotePendingCommitFeeAtoms(); - if (f !== 0) { - writer.writeUint64( - 6, - f + f, + proto.lnrpc.PsbtShim.serializeBinaryToWriter ); } }; /** - * optional string local_txid = 1; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalTxid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string remote_txid = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string remote_pending_txid = 3; - * @return {string} + * optional ChanPointShim chan_point_shim = 1; + * @return {?proto.lnrpc.ChanPointShim} */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.FundingShim.prototype.getChanPointShim = function() { + return /** @type{?proto.lnrpc.ChanPointShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChanPointShim, 1)); }; /** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + * @param {?proto.lnrpc.ChanPointShim|undefined} value + * @return {!proto.lnrpc.FundingShim} returns this +*/ +proto.lnrpc.FundingShim.prototype.setChanPointShim = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingShim.oneofGroups_[0], value); }; /** - * optional uint64 local_commit_fee_atoms = 4; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.FundingShim} returns this */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalCommitFeeAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.FundingShim.prototype.clearChanPointShim = function() { + return this.setChanPointShim(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalCommitFeeAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.FundingShim.prototype.hasChanPointShim = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint64 remote_commit_fee_atoms = 5; - * @return {number} + * optional PsbtShim psbt_shim = 2; + * @return {?proto.lnrpc.PsbtShim} */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteCommitFeeAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.FundingShim.prototype.getPsbtShim = function() { + return /** @type{?proto.lnrpc.PsbtShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PsbtShim, 2)); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this - */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteCommitFeeAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + * @param {?proto.lnrpc.PsbtShim|undefined} value + * @return {!proto.lnrpc.FundingShim} returns this +*/ +proto.lnrpc.FundingShim.prototype.setPsbtShim = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingShim.oneofGroups_[0], value); }; /** - * optional uint64 remote_pending_commit_fee_atoms = 6; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.FundingShim} returns this */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingCommitFeeAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.FundingShim.prototype.clearPsbtShim = function() { + return this.setPsbtShim(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingCommitFeeAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.FundingShim.prototype.hasPsbtShim = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -22625,8 +23109,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.FundingShimCancel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingShimCancel.toObject(opt_includeInstance, this); }; @@ -22635,14 +23119,13 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. 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.FundingShimCancel} 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.FundingShimCancel.toObject = function(includeInstance, msg) { var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - closingTxid: jspb.Message.getFieldWithDefault(msg, 2, "") + pendingChanId: msg.getPendingChanId_asB64() }; if (includeInstance) { @@ -22656,23 +23139,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.FundingShimCancel} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinary = function(bytes) { +proto.lnrpc.FundingShimCancel.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.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.PendingChannelsResponse.ClosedChannel} 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.PendingChannelsResponse.ClosedChannel} + * @return {!proto.lnrpc.FundingShimCancel} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22680,13 +23163,8 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; default: reader.skipField(); @@ -22701,9 +23179,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.FundingShimCancel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingShimCancel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22711,24 +23189,16 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} message + * @param {!proto.lnrpc.FundingShimCancel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingShimCancel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getClosingTxid(); + f = message.getPendingChanId_asU8(); if (f.length > 0) { - writer.writeString( - 2, + writer.writeBytes( + 1, f ); } @@ -22736,68 +23206,48 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = func /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this + * optional bytes pending_chan_id = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); +proto.lnrpc.FundingShimCancel.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes pending_chan_id = 1; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * optional string closing_txid = 2; - * @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.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; /** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.FundingShimCancel} returns this */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.FundingShimCancel.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_ = [8]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -22813,8 +23263,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.FundingPsbtVerify.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingPsbtVerify.toObject(opt_includeInstance, this); }; @@ -22823,21 +23273,15 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = func * @param {boolean|undefined} includeInstance Deprecated. 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.FundingPsbtVerify} 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.FundingPsbtVerify.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), - anchor: jspb.Message.getFieldWithDefault(msg, 9, 0) + fundedPsbt: msg.getFundedPsbt_asB64(), + pendingChanId: msg.getPendingChanId_asB64(), + skipFinalize: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -22851,23 +23295,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.FundingPsbtVerify} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinary = function(bytes) { +proto.lnrpc.FundingPsbtVerify.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.FundingPsbtVerify; + return proto.lnrpc.FundingPsbtVerify.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.FundingPsbtVerify} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} + * @return {!proto.lnrpc.FundingPsbtVerify} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22875,38 +23319,16 @@ 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 = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundedPsbt(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaturityHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlocksTilMaturity(value); - 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); - break; - case 9: - var value = /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (reader.readEnum()); - msg.setAnchor(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkipFinalize(value); break; default: reader.skipField(); @@ -22921,9 +23343,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.FundingPsbtVerify.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22931,438 +23353,431 @@ 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.FundingPsbtVerify} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( + f = message.getFundedPsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter + f ); } - f = message.getClosingTxid(); + f = message.getPendingChanId_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); } - f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getSkipFinalize(); + if (f) { + writer.writeBool( 3, f ); } - f = message.getMaturityHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getBlocksTilMaturity(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getRecoveredBalance(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getPendingHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.lnrpc.PendingHTLC.serializeBinaryToWriter - ); - } - f = message.getAnchor(); - if (f !== 0.0) { - writer.writeEnum( - 9, - f - ); - } }; /** - * @enum {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState = { - LIMBO: 0, - RECOVERED: 1, - LOST: 2 -}; - -/** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + * optional bytes funded_psbt = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** - * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setChannel = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * optional bytes funded_psbt = 1; + * This is a type-conversion wrapper around `getFundedPsbt()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = function() { - return this.setChannel(undefined); +proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundedPsbt())); }; /** - * Returns whether this field is set. - * @return {boolean} + * 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.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundedPsbt())); }; /** - * optional string closing_txid = 2; - * @return {string} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.FundingPsbtVerify} returns this */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.FundingPsbtVerify.prototype.setFundedPsbt = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {string} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * optional bytes pending_chan_id = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional int64 limbo_balance = 3; - * @return {number} + * optional bytes pending_chan_id = 2; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * 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.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; /** - * optional uint32 maturity_height = 4; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.FundingPsbtVerify} returns this */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getMaturityHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.FundingPsbtVerify.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * optional bool skip_finalize = 3; + * @return {boolean} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setMaturityHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.FundingPsbtVerify.prototype.getSkipFinalize = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * optional int32 blocks_til_maturity = 5; - * @return {number} + * @param {boolean} value + * @return {!proto.lnrpc.FundingPsbtVerify} returns this */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getBlocksTilMaturity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.FundingPsbtVerify.prototype.setSkipFinalize = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; -/** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMaturity = function(value) { - return 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)); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.FundingPsbtFinalize.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingPsbtFinalize.toObject(opt_includeInstance, this); }; /** - * repeated PendingHTLC pending_htlcs = 8; - * @return {!Array} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse.ForceClosedChannel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingHTLC, 8)); -}; - +proto.lnrpc.FundingPsbtFinalize.toObject = function(includeInstance, msg) { + var f, obj = { + signedPsbt: msg.getSignedPsbt_asB64(), + pendingChanId: msg.getPendingChanId_asB64(), + finalRawTx: msg.getFinalRawTx_asB64() + }; -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this -*/ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {!proto.lnrpc.PendingHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingHTLC} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.FundingPsbtFinalize} */ -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.FundingPsbtFinalize.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.FundingPsbtFinalize; + return proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * 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.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { - return this.setPendingHtlcsList([]); +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; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFinalRawTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional AnchorState anchor = 9; - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getAnchor = function() { - return /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.FundingPsbtFinalize.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} value - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + * 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.PendingChannelsResponse.ForceClosedChannel.prototype.setAnchor = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); +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 + ); + } + f = message.getFinalRawTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional int64 total_limbo_balance = 1; - * @return {number} + * optional bytes signed_psbt = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this + * optional bytes signed_psbt = 1; + * This is a type-conversion wrapper around `getSignedPsbt()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignedPsbt())); }; /** - * repeated PendingOpenChannel pending_open_channels = 2; - * @return {!Array} + * 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.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignedPsbt())); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.FundingPsbtFinalize} returns this */ -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.FundingPsbtFinalize.prototype.setSignedPsbt = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this + * optional bytes pending_chan_id = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { - return this.setPendingOpenChannelsList([]); +proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * repeated ClosedChannel pending_closing_channels = 3; - * @return {!Array} + * optional bytes pending_chan_id = 2; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingClosingChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ClosedChannel, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingClosingChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} + * 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.PendingChannelsResponse.prototype.addPendingClosingChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.PendingChannelsResponse.ClosedChannel, opt_index); +proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.FundingPsbtFinalize} returns this */ -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { - return this.setPendingClosingChannelsList([]); +proto.lnrpc.FundingPsbtFinalize.prototype.setPendingChanId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * repeated ForceClosedChannel pending_force_closing_channels = 4; - * @return {!Array} + * optional bytes final_raw_tx = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} + * optional bytes final_raw_tx = 3; + * This is a type-conversion wrapper around `getFinalRawTx()` + * @return {string} */ -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.FundingPsbtFinalize.prototype.getFinalRawTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFinalRawTx())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this + * optional bytes final_raw_tx = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFinalRawTx()` + * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { - return this.setPendingForceClosingChannelsList([]); +proto.lnrpc.FundingPsbtFinalize.prototype.getFinalRawTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFinalRawTx())); }; /** - * repeated WaitingCloseChannel waiting_close_channels = 5; - * @return {!Array} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.FundingPsbtFinalize} returns this */ -proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); +proto.lnrpc.FundingPsbtFinalize.prototype.setFinalRawTx = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; -/** - * @param {!Array} value - * @return {!proto.lnrpc.PendingChannelsResponse} returns this -*/ -proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, 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 + */ +proto.lnrpc.FundingTransitionMsg.oneofGroups_ = [[1,2,3,4]]; /** - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} + * @enum {number} */ -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.FundingTransitionMsg.TriggerCase = { + TRIGGER_NOT_SET: 0, + SHIM_REGISTER: 1, + SHIM_CANCEL: 2, + PSBT_VERIFY: 3, + PSBT_FINALIZE: 4 }; - /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PendingChannelsResponse} returns this + * @return {proto.lnrpc.FundingTransitionMsg.TriggerCase} */ -proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { - return this.setWaitingCloseChannelsList([]); +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) { /** * Creates an object representation of this proto. @@ -23376,8 +23791,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.FundingTransitionMsg.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingTransitionMsg.toObject(opt_includeInstance, this); }; @@ -23386,13 +23801,16 @@ proto.lnrpc.ChannelEventSubscription.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. 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.FundingTransitionMsg} 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.FundingTransitionMsg.toObject = function(includeInstance, msg) { var f, obj = { - + 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) { @@ -23406,29 +23824,49 @@ 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.FundingTransitionMsg} */ -proto.lnrpc.ChannelEventSubscription.deserializeBinary = function(bytes) { +proto.lnrpc.FundingTransitionMsg.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.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.ChannelEventSubscription} 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.ChannelEventSubscription} + * @return {!proto.lnrpc.FundingTransitionMsg} */ -proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingTransitionMsg.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.lnrpc.FundingShim; + reader.readMessage(value,proto.lnrpc.FundingShim.deserializeBinaryFromReader); + msg.setShimRegister(value); + break; + case 2: + var value = new proto.lnrpc.FundingShimCancel; + reader.readMessage(value,proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader); + msg.setShimCancel(value); + break; + case 3: + var value = new proto.lnrpc.FundingPsbtVerify; + reader.readMessage(value,proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader); + msg.setPsbtVerify(value); + break; + case 4: + var value = new proto.lnrpc.FundingPsbtFinalize; + reader.readMessage(value,proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader); + msg.setPsbtFinalize(value); + break; default: reader.skipField(); break; @@ -23442,9 +23880,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.FundingTransitionMsg.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23452,262 +23890,72 @@ 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.FundingTransitionMsg} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter = function(message, writer) { var f = undefined; -}; - - - -/** - * 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 -}; - -/** - * @return {proto.lnrpc.ChannelEventUpdate.ChannelCase} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getChannelCase = function() { - return /** @type {proto.lnrpc.ChannelEventUpdate.ChannelCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEventUpdate.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), - pendingOpenChannel: (f = msg.getPendingOpenChannel()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - type: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEventUpdate} - */ -proto.lnrpc.ChannelEventUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.ChannelEventUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEventUpdate} - */ -proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Channel; - reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); - msg.setOpenChannel(value); - break; - case 2: - var value = 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 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(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelEventUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEventUpdate.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.ChannelEventUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOpenChannel(); + f = message.getShimRegister(); if (f != null) { writer.writeMessage( 1, f, - proto.lnrpc.Channel.serializeBinaryToWriter + proto.lnrpc.FundingShim.serializeBinaryToWriter ); } - f = message.getClosedChannel(); + f = message.getShimCancel(); if (f != null) { writer.writeMessage( 2, f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter + proto.lnrpc.FundingShimCancel.serializeBinaryToWriter ); } - f = message.getActiveChannel(); + f = message.getPsbtVerify(); if (f != null) { writer.writeMessage( 3, f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter ); } - f = message.getInactiveChannel(); + f = message.getPsbtFinalize(); 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 + proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter ); } }; /** - * @enum {number} - */ -proto.lnrpc.ChannelEventUpdate.UpdateType = { - OPEN_CHANNEL: 0, - CLOSED_CHANNEL: 1, - ACTIVE_CHANNEL: 2, - INACTIVE_CHANNEL: 3, - PENDING_OPEN_CHANNEL: 4 -}; - -/** - * optional Channel open_channel = 1; - * @return {?proto.lnrpc.Channel} + * optional FundingShim shim_register = 1; + * @return {?proto.lnrpc.FundingShim} */ -proto.lnrpc.ChannelEventUpdate.prototype.getOpenChannel = function() { - return /** @type{?proto.lnrpc.Channel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Channel, 1)); +proto.lnrpc.FundingTransitionMsg.prototype.getShimRegister = function() { + return /** @type{?proto.lnrpc.FundingShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 1)); }; /** - * @param {?proto.lnrpc.Channel|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @param {?proto.lnrpc.FundingShim|undefined} value + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.setOpenChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +proto.lnrpc.FundingTransitionMsg.prototype.setShimRegister = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.clearOpenChannel = function() { - return this.setOpenChannel(undefined); +proto.lnrpc.FundingTransitionMsg.prototype.clearShimRegister = function() { + return this.setShimRegister(undefined); }; @@ -23715,36 +23963,36 @@ proto.lnrpc.ChannelEventUpdate.prototype.clearOpenChannel = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelEventUpdate.prototype.hasOpenChannel = function() { +proto.lnrpc.FundingTransitionMsg.prototype.hasShimRegister = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional ChannelCloseSummary closed_channel = 2; - * @return {?proto.lnrpc.ChannelCloseSummary} + * optional FundingShimCancel shim_cancel = 2; + * @return {?proto.lnrpc.FundingShimCancel} */ -proto.lnrpc.ChannelEventUpdate.prototype.getClosedChannel = function() { - return /** @type{?proto.lnrpc.ChannelCloseSummary} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseSummary, 2)); +proto.lnrpc.FundingTransitionMsg.prototype.getShimCancel = function() { + return /** @type{?proto.lnrpc.FundingShimCancel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingShimCancel, 2)); }; /** - * @param {?proto.lnrpc.ChannelCloseSummary|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @param {?proto.lnrpc.FundingShimCancel|undefined} value + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.setClosedChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +proto.lnrpc.FundingTransitionMsg.prototype.setShimCancel = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.clearClosedChannel = function() { - return this.setClosedChannel(undefined); +proto.lnrpc.FundingTransitionMsg.prototype.clearShimCancel = function() { + return this.setShimCancel(undefined); }; @@ -23752,36 +24000,36 @@ proto.lnrpc.ChannelEventUpdate.prototype.clearClosedChannel = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelEventUpdate.prototype.hasClosedChannel = function() { +proto.lnrpc.FundingTransitionMsg.prototype.hasShimCancel = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional ChannelPoint active_channel = 3; - * @return {?proto.lnrpc.ChannelPoint} + * optional FundingPsbtVerify psbt_verify = 3; + * @return {?proto.lnrpc.FundingPsbtVerify} */ -proto.lnrpc.ChannelEventUpdate.prototype.getActiveChannel = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 3)); +proto.lnrpc.FundingTransitionMsg.prototype.getPsbtVerify = function() { + return /** @type{?proto.lnrpc.FundingPsbtVerify} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtVerify, 3)); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @param {?proto.lnrpc.FundingPsbtVerify|undefined} value + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.setActiveChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +proto.lnrpc.FundingTransitionMsg.prototype.setPsbtVerify = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.clearActiveChannel = function() { - return this.setActiveChannel(undefined); +proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtVerify = function() { + return this.setPsbtVerify(undefined); }; @@ -23789,36 +24037,36 @@ proto.lnrpc.ChannelEventUpdate.prototype.clearActiveChannel = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelEventUpdate.prototype.hasActiveChannel = function() { +proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtVerify = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional ChannelPoint inactive_channel = 4; - * @return {?proto.lnrpc.ChannelPoint} + * optional FundingPsbtFinalize psbt_finalize = 4; + * @return {?proto.lnrpc.FundingPsbtFinalize} */ -proto.lnrpc.ChannelEventUpdate.prototype.getInactiveChannel = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); +proto.lnrpc.FundingTransitionMsg.prototype.getPsbtFinalize = function() { + return /** @type{?proto.lnrpc.FundingPsbtFinalize} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtFinalize, 4)); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @param {?proto.lnrpc.FundingPsbtFinalize|undefined} value + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.setInactiveChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +proto.lnrpc.FundingTransitionMsg.prototype.setPsbtFinalize = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this + * @return {!proto.lnrpc.FundingTransitionMsg} returns this */ -proto.lnrpc.ChannelEventUpdate.prototype.clearInactiveChannel = function() { - return this.setInactiveChannel(undefined); +proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtFinalize = function() { + return this.setPsbtFinalize(undefined); }; @@ -23826,66 +24074,11 @@ proto.lnrpc.ChannelEventUpdate.prototype.clearInactiveChannel = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelEventUpdate.prototype.hasInactiveChannel = function() { +proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtFinalize = function() { return jspb.Message.getField(this, 4) != null; }; -/** - * optional PendingUpdate pending_open_channel = 6; - * @return {?proto.lnrpc.PendingUpdate} - */ -proto.lnrpc.ChannelEventUpdate.prototype.getPendingOpenChannel = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 6)); -}; - - -/** - * @param {?proto.lnrpc.PendingUpdate|undefined} value - * @return {!proto.lnrpc.ChannelEventUpdate} returns this -*/ -proto.lnrpc.ChannelEventUpdate.prototype.setPendingOpenChannel = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.clearPendingOpenChannel = function() { - return this.setPendingOpenChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -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 - * @return {!proto.lnrpc.ChannelEventUpdate} returns this - */ -proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - @@ -23902,8 +24095,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.FundingStateStepResp.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingStateStepResp.toObject(opt_includeInstance, this); }; @@ -23912,11 +24105,11 @@ proto.lnrpc.WalletBalanceRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. 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.FundingStateStepResp} 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.FundingStateStepResp.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -23932,23 +24125,23 @@ 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.FundingStateStepResp} */ -proto.lnrpc.WalletBalanceRequest.deserializeBinary = function(bytes) { +proto.lnrpc.FundingStateStepResp.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.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.WalletBalanceRequest} 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.WalletBalanceRequest} + * @return {!proto.lnrpc.FundingStateStepResp} */ -proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingStateStepResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23968,9 +24161,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.FundingStateStepResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23978,11 +24171,11 @@ 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.FundingStateStepResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -24003,8 +24196,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingHTLC.toObject(opt_includeInstance, this); }; @@ -24013,15 +24206,18 @@ proto.lnrpc.WalletBalanceResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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.PendingHTLC} 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.PendingHTLC.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) + incoming: jspb.Message.getBooleanFieldWithDefault(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) { @@ -24035,23 +24231,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.PendingHTLC} */ -proto.lnrpc.WalletBalanceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PendingHTLC.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.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.WalletBalanceResponse} 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.WalletBalanceResponse} + * @return {!proto.lnrpc.PendingHTLC} */ -proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24059,16 +24255,28 @@ 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 {boolean} */ (reader.readBool()); + msg.setIncoming(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setConfirmedBalance(value); + msg.setAmount(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnconfirmedBalance(value); + var value = /** @type {string} */ (reader.readString()); + msg.setOutpoint(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaturityHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlocksTilMaturity(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStage(value); break; default: reader.skipField(); @@ -24083,9 +24291,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.PendingHTLC.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24093,87 +24301,162 @@ 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.PendingHTLC} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getIncoming(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getConfirmedBalance(); + f = message.getAmount(); if (f !== 0) { writer.writeInt64( 2, f ); } - f = message.getUnconfirmedBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getOutpoint(); + if (f.length > 0) { + writer.writeString( 3, f ); } + f = message.getMaturityHeight(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBlocksTilMaturity(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getStage(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional int64 total_balance = 1; - * @return {number} + * optional bool incoming = 1; + * @return {boolean} */ -proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.PendingHTLC.prototype.getIncoming = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this + * @param {boolean} value + * @return {!proto.lnrpc.PendingHTLC} returns this */ -proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional int64 confirmed_balance = 2; + * optional int64 amount = 2; * @return {number} */ -proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { +proto.lnrpc.PendingHTLC.prototype.getAmount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this + * @return {!proto.lnrpc.PendingHTLC} returns this */ -proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { +proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int64 unconfirmed_balance = 3; - * @return {number} + * optional string outpoint = 3; + * @return {string} */ -proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.WalletBalanceResponse} returns this + * @param {string} value + * @return {!proto.lnrpc.PendingHTLC} returns this */ -proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint32 maturity_height = 4; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getMaturityHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingHTLC} returns this + */ +proto.lnrpc.PendingHTLC.prototype.setMaturityHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 blocks_til_maturity = 5; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getBlocksTilMaturity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingHTLC} returns this + */ +proto.lnrpc.PendingHTLC.prototype.setBlocksTilMaturity = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint32 stage = 6; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getStage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingHTLC} returns this + */ +proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -24193,8 +24476,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); +proto.lnrpc.PendingChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsRequest.toObject(opt_includeInstance, this); }; @@ -24203,11 +24486,11 @@ proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.PendingChannelsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBalanceRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.PendingChannelsRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -24223,23 +24506,23 @@ proto.lnrpc.ChannelBalanceRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBalanceRequest} + * @return {!proto.lnrpc.PendingChannelsRequest} */ -proto.lnrpc.ChannelBalanceRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBalanceRequest; - return proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PendingChannelsRequest; + return proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBalanceRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBalanceRequest} + * @return {!proto.lnrpc.PendingChannelsRequest} */ -proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24259,9 +24542,9 @@ proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelBalanceRequest.prototype.serializeBinary = function() { +proto.lnrpc.PendingChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24269,16 +24552,23 @@ proto.lnrpc.ChannelBalanceRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBalanceRequest} message + * @param {!proto.lnrpc.PendingChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; +/** + * 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) { @@ -24294,8 +24584,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.toObject(opt_includeInstance, this); }; @@ -24304,16 +24594,21 @@ proto.lnrpc.ChannelBalanceResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse} 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.PendingChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxInboundAmount: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxOutboundAmount: jspb.Message.getFieldWithDefault(msg, 4, 0) + 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) { @@ -24327,23 +24622,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.PendingChannelsResponse} */ -proto.lnrpc.ChannelBalanceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.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.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.ChannelBalanceResponse} 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.ChannelBalanceResponse} + * @return {!proto.lnrpc.PendingChannelsResponse} */ -proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24352,19 +24647,27 @@ proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, r switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); + msg.setTotalLimboBalance(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPendingOpenBalance(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 {number} */ (reader.readInt64()); - msg.setMaxInboundAmount(value); + var value = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader); + msg.addPendingClosingChannels(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxOutboundAmount(value); + 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); break; default: reader.skipField(); @@ -24379,9 +24682,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.PendingChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24389,122 +24692,54 @@ 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.PendingChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalance(); + f = message.getTotalLimboBalance(); if (f !== 0) { writer.writeInt64( 1, f ); } - f = message.getPendingOpenBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getPendingOpenChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 2, - f + f, + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter ); } - f = message.getMaxInboundAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getPendingClosingChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, - f + f, + proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter ); } - f = message.getMaxOutboundAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getPendingForceClosingChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 4, - f + f, + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter + ); + } + f = message.getWaitingCloseChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter ); } }; -/** - * optional int64 balance = 1; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 pending_open_balance = 2; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 max_inbound_amount = 3; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getMaxInboundAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.setMaxInboundAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 max_outbound_amount = 4; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getMaxOutboundAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ChannelBalanceResponse} returns this - */ -proto.lnrpc.ChannelBalanceResponse.prototype.setMaxOutboundAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.QueryRoutesRequest.repeatedFields_ = [6,7,10,16,17]; @@ -24521,8 +24756,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingChannelsResponse.PendingChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(opt_includeInstance, this); }; @@ -24531,31 +24766,24 @@ proto.lnrpc.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse.PendingChannel} 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.PendingChannelsResponse.PendingChannel.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - amt: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMAtoms: 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.getBooleanFieldWithDefault(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: (f = jspb.Message.getRepeatedField(msg, 17)) == null ? undefined : f + remoteNodePub: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), + shortChanId: jspb.Message.getFieldWithDefault(msg, 900, ""), + capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + localBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), + remoteBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), + localChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteChanReserveAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), + initiator: jspb.Message.getFieldWithDefault(msg, 8, 0), + commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0), + numForwardingPackages: jspb.Message.getFieldWithDefault(msg, 10, 0), + chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 11, "") }; if (includeInstance) { @@ -24569,23 +24797,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.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.QueryRoutesRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.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.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.QueryRoutesRequest} 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.QueryRoutesRequest} + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24594,75 +24822,51 @@ proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + msg.setRemoteNodePub(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChannelPoint(value); break; - case 12: + case 900: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChanId(value); + break; + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtMAtoms(value); + msg.setCapacity(value); break; case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalBalance(value); break; case 5: - var value = new proto.lnrpc.FeeLimit; - reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); - msg.setFeeLimit(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteBalance(value); break; case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIgnoredNodes(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalChanReserveAtoms(value); break; case 7: - var value = new proto.lnrpc.EdgeLocator; - reader.readMessage(value,proto.lnrpc.EdgeLocator.deserializeBinaryFromReader); - msg.addIgnoredEdges(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteChanReserveAtoms(value); break; case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setSourcePubKey(value); + var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); + msg.setInitiator(value); break; case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUseMissionControl(value); + var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); + msg.setCommitmentType(value); break; case 10: - var value = new proto.lnrpc.NodePair; - reader.readMessage(value,proto.lnrpc.NodePair.deserializeBinaryFromReader); - msg.addIgnoredPairs(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumForwardingPackages(value); break; case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvLimit(value); - break; - 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 values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addDestFeatures(values[i]); - } + var value = /** @type {string} */ (reader.readString()); + msg.setChanStatusFlags(value); break; default: reader.skipField(); @@ -24677,9 +24881,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.PendingChannelsResponse.PendingChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24687,122 +24891,93 @@ 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.PendingChannelsResponse.PendingChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getRemoteNodePub(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + f = message.getChannelPoint(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getAmtMAtoms(); + f = message.getShortChanId(); + if (f.length > 0) { + writer.writeString( + 900, + f + ); + } + f = message.getCapacity(); if (f !== 0) { writer.writeInt64( - 12, + 3, f ); } - f = message.getFinalCltvDelta(); + f = message.getLocalBalance(); if (f !== 0) { - writer.writeInt32( + writer.writeInt64( 4, f ); } - f = message.getFeeLimit(); - if (f != null) { - writer.writeMessage( + f = message.getRemoteBalance(); + if (f !== 0) { + writer.writeInt64( 5, - f, - proto.lnrpc.FeeLimit.serializeBinaryToWriter + f ); } - f = message.getIgnoredNodesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getLocalChanReserveAtoms(); + if (f !== 0) { + writer.writeInt64( 6, f ); } - f = message.getIgnoredEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getRemoteChanReserveAtoms(); + if (f !== 0) { + writer.writeInt64( 7, - f, - proto.lnrpc.EdgeLocator.serializeBinaryToWriter + f ); } - f = message.getSourcePubKey(); - if (f.length > 0) { - writer.writeString( + f = message.getInitiator(); + if (f !== 0.0) { + writer.writeEnum( 8, f ); } - f = message.getUseMissionControl(); - if (f) { - writer.writeBool( + f = message.getCommitmentType(); + if (f !== 0.0) { + writer.writeEnum( 9, f ); } - f = message.getIgnoredPairsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - proto.lnrpc.NodePair.serializeBinaryToWriter - ); - } - f = message.getCltvLimit(); + f = message.getNumForwardingPackages(); if (f !== 0) { - writer.writeUint32( - 11, - f - ); - } - 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, + writer.writeInt64( + 10, f ); } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 16, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter - ); - } - f = message.getDestFeaturesList(); + f = message.getChanStatusFlags(); if (f.length > 0) { - writer.writePackedEnum( - 17, + writer.writeString( + 11, f ); } @@ -24810,459 +24985,489 @@ proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, write /** - * optional string pub_key = 1; + * optional string remote_node_pub = 1; * @return {string} */ -proto.lnrpc.QueryRoutesRequest.prototype.getPubKey = function() { +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional int64 amt = 2; - * @return {number} + * optional string channel_point = 2; + * @return {string} */ -proto.lnrpc.QueryRoutesRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 amt_m_atoms = 12; - * @return {number} + * optional string short_chan_id = 900; + * @return {string} */ -proto.lnrpc.QueryRoutesRequest.prototype.getAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getShortChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 900, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setShortChanId = function(value) { + return jspb.Message.setProto3StringField(this, 900, value); }; /** - * optional int32 final_cltv_delta = 4; + * optional int64 capacity = 3; * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setFinalCltvDelta = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional FeeLimit fee_limit = 5; - * @return {?proto.lnrpc.FeeLimit} + * optional int64 local_balance = 4; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.getFeeLimit = function() { - return /** @type{?proto.lnrpc.FeeLimit} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 5)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.lnrpc.FeeLimit|undefined} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setFeeLimit = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * optional int64 remote_balance = 5; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.clearFeeLimit = function() { - return this.setFeeLimit(undefined); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 5) != null; +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * repeated bytes ignored_nodes = 6; - * @return {!(Array|Array)} + * optional int64 local_chan_reserve_atoms = 6; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 6)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalChanReserveAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * repeated bytes ignored_nodes = 6; - * This is a type-conversion wrapper around `getIgnoredNodesList()` - * @return {!Array} + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIgnoredNodesList())); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalChanReserveAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 6, 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} + * optional int64 remote_chan_reserve_atoms = 7; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIgnoredNodesList())); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteChanReserveAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredNodesList = function(value) { - return jspb.Message.setField(this, 6, value || []); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserveAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * optional Initiator initiator = 8; + * @return {!proto.lnrpc.Initiator} */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredNodes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getInitiator = function() { + return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {!proto.lnrpc.Initiator} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredNodesList = function() { - return this.setIgnoredNodesList([]); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setInitiator = function(value) { + return jspb.Message.setProto3EnumField(this, 8, value); }; /** - * repeated EdgeLocator ignored_edges = 7; - * @return {!Array} + * optional CommitmentType commitment_type = 9; + * @return {!proto.lnrpc.CommitmentType} */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredEdgesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.EdgeLocator, 7)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); + * @param {!proto.lnrpc.CommitmentType} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCommitmentType = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); }; /** - * @param {!proto.lnrpc.EdgeLocator=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.EdgeLocator} + * optional int64 num_forwarding_packages = 10; + * @return {number} */ -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.PendingChannelsResponse.PendingChannel.prototype.getNumForwardingPackages = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredEdgesList = function() { - return this.setIgnoredEdgesList([]); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setNumForwardingPackages = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); }; /** - * optional string source_pub_key = 8; + * optional string chan_status_flags = 11; * @return {string} */ -proto.lnrpc.QueryRoutesRequest.prototype.getSourcePubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChanStatusFlags = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setSourcePubKey = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChanStatusFlags = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); }; -/** - * optional bool use_mission_control = 9; - * @return {boolean} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getUseMissionControl = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); -}; - -/** - * @param {boolean} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.setUseMissionControl = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated NodePair ignored_pairs = 10; - * @return {!Array} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredPairsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodePair, 10)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredPairsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject(opt_includeInstance, this); }; /** - * @param {!proto.lnrpc.NodePair=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodePair} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -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.PendingChannelsResponse.PendingOpenChannel.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), + commitSize: jspb.Message.getFieldWithDefault(msg, 5, 0), + feePerKb: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredPairsList = function() { - return this.setIgnoredPairsList([]); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint32 cltv_limit = 11; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.QueryRoutesRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; + return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.QueryRoutesRequest.prototype.setCltvLimit = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.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.setCommitSize(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeePerKb(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * map dest_custom_records = 13; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.QueryRoutesRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 13, opt_noLazyCreate, - null)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this - */ -proto.lnrpc.QueryRoutesRequest.prototype.clearDestCustomRecordsMap = function() { - this.getDestCustomRecordsMap().clear(); - return this;}; - - -/** - * optional uint64 outgoing_chan_id = 14; - * @return {string} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesRequest.prototype.getOutgoingChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.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.getCommitSize(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getFeePerKb(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } }; /** - * @param {string} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.QueryRoutesRequest.prototype.setOutgoingChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 14, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; /** - * optional bytes last_hop_pubkey = 15; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); + * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this +*/ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional bytes last_hop_pubkey = 15; - * This is a type-conversion wrapper around `getLastHopPubkey()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastHopPubkey())); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = function() { + return this.setChannel(undefined); }; /** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastHopPubkey())); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * optional uint32 confirmation_height = 2; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.setLastHopPubkey = function(value) { - return jspb.Message.setProto3BytesField(this, 15, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getConfirmationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * repeated RouteHint route_hints = 16; - * @return {!Array} + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 16)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this -*/ -proto.lnrpc.QueryRoutesRequest.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 16, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} + * optional int64 commit_fee = 4; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.RouteHint, opt_index); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * repeated FeatureBit dest_features = 17; - * @return {!Array} + * optional int64 commit_size = 5; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.getDestFeaturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 17)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.setDestFeaturesList = function(value) { - return jspb.Message.setField(this, 17, value || []); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitSize = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * @param {!proto.lnrpc.FeatureBit} value - * @param {number=} opt_index - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * optional int64 fee_per_kb = 6; + * @return {number} */ -proto.lnrpc.QueryRoutesRequest.prototype.addDestFeatures = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 17, value, opt_index); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKb = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this */ -proto.lnrpc.QueryRoutesRequest.prototype.clearDestFeaturesList = function() { - return this.setDestFeaturesList([]); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKb = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; @@ -25282,8 +25487,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject(opt_includeInstance, this); }; @@ -25292,14 +25497,16 @@ proto.lnrpc.NodePair.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse.WaitingCloseChannel} 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.PendingChannelsResponse.WaitingCloseChannel.toObject = function(includeInstance, msg) { var f, obj = { - from: msg.getFrom_asB64(), - to: msg.getTo_asB64() + 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), + closingTxid: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -25313,23 +25520,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.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.NodePair.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.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.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.NodePair} 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.NodePair} + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25337,12 +25544,22 @@ proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFrom(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 {!Uint8Array} */ (reader.readBytes()); - msg.setTo(value); + 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; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxid(value); break; default: reader.skipField(); @@ -25357,9 +25574,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.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodePair.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25367,23 +25584,39 @@ 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.PendingChannelsResponse.WaitingCloseChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodePair.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFrom_asU8(); - if (f.length > 0) { - writer.writeBytes( + 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.getTo_asU8(); + f = message.getCommitments(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter + ); + } + f = message.getClosingTxid(); if (f.length > 0) { - writer.writeBytes( - 2, + writer.writeString( + 4, f ); } @@ -25391,86 +25624,112 @@ proto.lnrpc.NodePair.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes from = 1; - * @return {!(string|Uint8Array)} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.NodePair.prototype.getFrom = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; /** - * optional bytes from = 1; - * This is a type-conversion wrapper around `getFrom()` - * @return {string} + * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this +*/ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this */ -proto.lnrpc.NodePair.prototype.getFrom_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFrom())); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { + return this.setChannel(undefined); }; /** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.NodePair.prototype.getFrom_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFrom())); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.NodePair} returns this + * optional int64 limbo_balance = 2; + * @return {number} */ -proto.lnrpc.NodePair.prototype.setFrom = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getLimboBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * optional bytes to = 2; - * @return {!(string|Uint8Array)} + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this */ -proto.lnrpc.NodePair.prototype.getTo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalance = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bytes to = 2; - * This is a type-conversion wrapper around `getTo()` - * @return {string} + * optional Commitments commitments = 3; + * @return {?proto.lnrpc.PendingChannelsResponse.Commitments} */ -proto.lnrpc.NodePair.prototype.getTo_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTo())); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getCommitments = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.Commitments} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.Commitments, 3)); }; /** - * 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.PendingChannelsResponse.Commitments|undefined} value + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this +*/ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setCommitments = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this */ -proto.lnrpc.NodePair.prototype.getTo_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTo())); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearCommitments = function() { + return this.setCommitments(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.NodePair} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.NodePair.prototype.setTo = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasCommitments = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string closing_txid = 4; + * @return {string} + */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getClosingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setClosingTxid = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -25490,8 +25749,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingChannelsResponse.Commitments.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.Commitments.toObject(opt_includeInstance, this); }; @@ -25500,14 +25759,18 @@ proto.lnrpc.EdgeLocator.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse.Commitments} 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.PendingChannelsResponse.Commitments.toObject = function(includeInstance, msg) { var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - directionReverse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + localTxid: jspb.Message.getFieldWithDefault(msg, 1, ""), + remoteTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), + remotePendingTxid: jspb.Message.getFieldWithDefault(msg, 3, ""), + localCommitFeeAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), + remoteCommitFeeAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), + remotePendingCommitFeeAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -25521,23 +25784,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.PendingChannelsResponse.Commitments} */ -proto.lnrpc.EdgeLocator.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.Commitments.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.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.EdgeLocator} 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.EdgeLocator} + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} */ -proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25545,12 +25808,28 @@ proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChannelId(value); + var value = /** @type {string} */ (reader.readString()); + msg.setLocalTxid(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDirectionReverse(value); + 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.setLocalCommitFeeAtoms(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemoteCommitFeeAtoms(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemotePendingCommitFeeAtoms(value); break; default: reader.skipField(); @@ -25565,9 +25844,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.PendingChannelsResponse.Commitments.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.EdgeLocator.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25575,72 +25854,165 @@ 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.PendingChannelsResponse.Commitments} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EdgeLocator.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getLocalTxid(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getDirectionReverse(); - if (f) { - writer.writeBool( + f = message.getRemoteTxid(); + if (f.length > 0) { + writer.writeString( 2, f ); } + f = message.getRemotePendingTxid(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLocalCommitFeeAtoms(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getRemoteCommitFeeAtoms(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getRemotePendingCommitFeeAtoms(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } }; /** - * optional uint64 channel_id = 1; + * optional string local_txid = 1; * @return {string} */ -proto.lnrpc.EdgeLocator.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.EdgeLocator} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this */ -proto.lnrpc.EdgeLocator.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalTxid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bool direction_reverse = 2; - * @return {boolean} + * optional string remote_txid = 2; + * @return {string} */ -proto.lnrpc.EdgeLocator.prototype.getDirectionReverse = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.EdgeLocator} returns this + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this */ -proto.lnrpc.EdgeLocator.prototype.setDirectionReverse = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteTxid = function(value) { + return 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, "")); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this */ -proto.lnrpc.QueryRoutesResponse.repeatedFields_ = [1]; +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingTxid = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 local_commit_fee_atoms = 4; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalCommitFeeAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalCommitFeeAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 remote_commit_fee_atoms = 5; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteCommitFeeAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteCommitFeeAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 remote_pending_commit_fee_atoms = 6; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingCommitFeeAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} returns this + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingCommitFeeAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + @@ -25657,8 +26029,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingChannelsResponse.ClosedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject(opt_includeInstance, this); }; @@ -25667,15 +26039,14 @@ proto.lnrpc.QueryRoutesResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse.ClosedChannel} 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.PendingChannelsResponse.ClosedChannel.toObject = function(includeInstance, msg) { var f, obj = { - routesList: jspb.Message.toObjectList(msg.getRoutesList(), - proto.lnrpc.Route.toObject, includeInstance), - successProb: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) + channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), + closingTxid: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -25689,23 +26060,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.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.QueryRoutesResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.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.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.QueryRoutesResponse} 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.QueryRoutesResponse} + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25713,13 +26084,13 @@ 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 = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); break; case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setSuccessProb(value); + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxid(value); break; default: reader.skipField(); @@ -25734,9 +26105,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.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25744,23 +26115,23 @@ 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.PendingChannelsResponse.ClosedChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRoutesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChannel(); + if (f != null) { + writer.writeMessage( 1, f, - proto.lnrpc.Route.serializeBinaryToWriter + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getSuccessProb(); - if (f !== 0.0) { - writer.writeDouble( + f = message.getClosingTxid(); + if (f.length > 0) { + writer.writeString( 2, f ); @@ -25769,62 +26140,68 @@ proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writ /** - * repeated Route routes = 1; - * @return {!Array} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.QueryRoutesResponse.prototype.getRoutesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Route, 1)); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.QueryRoutesResponse} returns this + * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this */ -proto.lnrpc.QueryRoutesResponse.prototype.setRoutesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.Route=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Route} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this */ -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.PendingChannelsResponse.ClosedChannel.prototype.clearChannel = function() { + return this.setChannel(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.QueryRoutesResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { - return this.setRoutesList([]); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional double success_prob = 2; - * @return {number} + * optional string closing_txid = 2; + * @return {string} */ -proto.lnrpc.QueryRoutesResponse.prototype.getSuccessProb = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.QueryRoutesResponse} returns this + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} returns this */ -proto.lnrpc.QueryRoutesResponse.prototype.setSuccessProb = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_ = [8]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -25840,8 +26217,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject(opt_includeInstance, this); }; @@ -25850,23 +26227,21 @@ proto.lnrpc.Hop.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.PendingChannelsResponse.ForceClosedChannel} 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.PendingChannelsResponse.ForceClosedChannel.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), - amtToForwardMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeMAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), - pubKey: jspb.Message.getFieldWithDefault(msg, 8, ""), - tlvPayload: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), - mppRecord: (f = msg.getMppRecord()) && proto.lnrpc.MPPRecord.toObject(includeInstance, f), - customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [] + 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) { @@ -25880,23 +26255,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.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.Hop.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.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.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.Hop} 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.Hop} + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25904,51 +26279,38 @@ proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setChanCapacity(value); + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxid(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtToForward(value); + msg.setLimboBalance(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaturityHeight(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpiry(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlocksTilMaturity(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtToForwardMAtoms(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeMAtoms(value); + msg.setRecoveredBalance(value); break; case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(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.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, ""); - }); + var value = /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (reader.readEnum()); + msg.setAnchor(value); break; default: reader.skipField(); @@ -25963,9 +26325,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.PendingChannelsResponse.ForceClosedChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Hop.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25973,309 +26335,433 @@ 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.PendingChannelsResponse.ForceClosedChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getChannel(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getChanCapacity(); - if (f !== 0) { - writer.writeInt64( + f = message.getClosingTxid(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getAmtToForward(); + f = message.getLimboBalance(); if (f !== 0) { writer.writeInt64( 3, f ); } - f = message.getFee(); + f = message.getMaturityHeight(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 4, f ); } - f = message.getExpiry(); + f = message.getBlocksTilMaturity(); if (f !== 0) { - writer.writeUint32( + writer.writeInt32( 5, f ); } - f = message.getAmtToForwardMAtoms(); + f = message.getRecoveredBalance(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getFeeMAtoms(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getPubKey(); + f = message.getPendingHtlcsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 8, - f + f, + proto.lnrpc.PendingHTLC.serializeBinaryToWriter ); } - f = message.getTlvPayload(); - if (f) { - writer.writeBool( + f = message.getAnchor(); + if (f !== 0.0) { + writer.writeEnum( 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 uint64 chan_id = 1; - * @return {string} + * @enum {number} */ -proto.lnrpc.Hop.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +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 - * @return {!proto.lnrpc.Hop} returns this + * @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this +*/ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this */ -proto.lnrpc.Hop.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = function() { + return this.setChannel(undefined); }; /** - * optional int64 chan_capacity = 2; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Hop.prototype.getChanCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {number} value - * @return {!proto.lnrpc.Hop} returns this + * optional string closing_txid = 2; + * @return {string} */ -proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional int64 amt_to_forward = 3; + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 limbo_balance = 3; * @return {number} */ -proto.lnrpc.Hop.prototype.getAmtToForward = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Hop} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this */ -proto.lnrpc.Hop.prototype.setAmtToForward = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 fee = 4; + * optional uint32 maturity_height = 4; * @return {number} */ -proto.lnrpc.Hop.prototype.getFee = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getMaturityHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Hop} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this */ -proto.lnrpc.Hop.prototype.setFee = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setMaturityHeight = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional uint32 expiry = 5; + * optional int32 blocks_til_maturity = 5; * @return {number} */ -proto.lnrpc.Hop.prototype.getExpiry = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getBlocksTilMaturity = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Hop} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this */ -proto.lnrpc.Hop.prototype.setExpiry = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMaturity = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 amt_to_forward_m_atoms = 6; + * optional int64 recovered_balance = 6; * @return {number} */ -proto.lnrpc.Hop.prototype.getAmtToForwardMAtoms = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Hop} returns this + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this */ -proto.lnrpc.Hop.prototype.setAmtToForwardMAtoms = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional int64 fee_m_atoms = 7; + * 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 + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this +*/ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { + return 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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { + return this.setPendingHtlcsList([]); +}; + + +/** + * optional AnchorState anchor = 9; + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getAnchor = function() { + return /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} value + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setAnchor = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + +/** + * optional int64 total_limbo_balance = 1; * @return {number} */ -proto.lnrpc.Hop.prototype.getFeeMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Hop} returns this + * @return {!proto.lnrpc.PendingChannelsResponse} returns this */ -proto.lnrpc.Hop.prototype.setFeeMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string pub_key = 8; - * @return {string} + * repeated PendingOpenChannel pending_open_channels = 2; + * @return {!Array} */ -proto.lnrpc.Hop.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); }; /** - * @param {string} value - * @return {!proto.lnrpc.Hop} returns this + * @param {!Array} value + * @return {!proto.lnrpc.PendingChannelsResponse} returns this +*/ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.Hop.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.lnrpc.PendingChannelsResponse.prototype.addPendingOpenChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, opt_index); }; /** - * optional bool tlv_payload = 9; - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PendingChannelsResponse} returns this */ -proto.lnrpc.Hop.prototype.getTlvPayload = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { + return this.setPendingOpenChannelsList([]); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Hop} returns this + * repeated ClosedChannel pending_closing_channels = 3; + * @return {!Array} */ -proto.lnrpc.Hop.prototype.setTlvPayload = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingClosingChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ClosedChannel, 3)); }; /** - * optional MPPRecord mpp_record = 10; - * @return {?proto.lnrpc.MPPRecord} + * @param {!Array} value + * @return {!proto.lnrpc.PendingChannelsResponse} returns this +*/ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingClosingChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.Hop.prototype.getMppRecord = function() { - return /** @type{?proto.lnrpc.MPPRecord} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.MPPRecord, 10)); +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 {?proto.lnrpc.MPPRecord|undefined} value - * @return {!proto.lnrpc.Hop} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PendingChannelsResponse} returns this + */ +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { + return this.setPendingClosingChannelsList([]); +}; + + +/** + * repeated ForceClosedChannel pending_force_closing_channels = 4; + * @return {!Array} + */ +proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.PendingChannelsResponse} returns this */ -proto.lnrpc.Hop.prototype.setMppRecord = function(value) { - return jspb.Message.setWrapperField(this, 10, value); +proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.Hop} returns this + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.Hop.prototype.clearMppRecord = function() { - return this.setMppRecord(undefined); +proto.lnrpc.PendingChannelsResponse.prototype.addPendingForceClosingChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PendingChannelsResponse} returns this */ -proto.lnrpc.Hop.prototype.hasMppRecord = function() { - return jspb.Message.getField(this, 10) != null; +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { + return this.setPendingForceClosingChannelsList([]); }; /** - * map custom_records = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * repeated WaitingCloseChannel waiting_close_channels = 5; + * @return {!Array} */ -proto.lnrpc.Hop.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - null)); +proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Hop} returns this + * @param {!Array} value + * @return {!proto.lnrpc.PendingChannelsResponse} returns this +*/ +proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.Hop.prototype.clearCustomRecordsMap = function() { - this.getCustomRecordsMap().clear(); - return this;}; +proto.lnrpc.PendingChannelsResponse.prototype.addWaitingCloseChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PendingChannelsResponse} returns this + */ +proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { + return this.setWaitingCloseChannelsList([]); +}; @@ -26294,8 +26780,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.MPPRecord.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MPPRecord.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelEventSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEventSubscription.toObject(opt_includeInstance, this); }; @@ -26304,14 +26790,13 @@ proto.lnrpc.MPPRecord.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.MPPRecord} 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.MPPRecord.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelEventSubscription.toObject = function(includeInstance, msg) { var f, obj = { - paymentAddr: msg.getPaymentAddr_asB64(), - totalAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 10, 0) + }; if (includeInstance) { @@ -26325,37 +26810,29 @@ proto.lnrpc.MPPRecord.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MPPRecord} + * @return {!proto.lnrpc.ChannelEventSubscription} */ -proto.lnrpc.MPPRecord.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEventSubscription.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MPPRecord; - return proto.lnrpc.MPPRecord.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.MPPRecord} 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.MPPRecord} + * @return {!proto.lnrpc.ChannelEventSubscription} */ -proto.lnrpc.MPPRecord.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 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmtMAtoms(value); - break; default: reader.skipField(); break; @@ -26369,9 +26846,9 @@ proto.lnrpc.MPPRecord.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.MPPRecord.prototype.serializeBinary = function() { +proto.lnrpc.ChannelEventSubscription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.MPPRecord.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26379,99 +26856,48 @@ proto.lnrpc.MPPRecord.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MPPRecord} message + * @param {!proto.lnrpc.ChannelEventSubscription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MPPRecord.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getTotalAmtMAtoms(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } }; -/** - * optional bytes payment_addr = 11; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MPPRecord.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} + * 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.MPPRecord.prototype.getPaymentAddr_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentAddr())); -}; - +proto.lnrpc.ChannelEventUpdate.oneofGroups_ = [[1,2,3,4,6,7]]; /** - * 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.MPPRecord.prototype.getPaymentAddr_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentAddr())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MPPRecord} returns this - */ -proto.lnrpc.MPPRecord.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); -}; - - -/** - * optional int64 total_amt_m_atoms = 10; - * @return {number} + * @enum {number} */ -proto.lnrpc.MPPRecord.prototype.getTotalAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.ChannelEventUpdate.ChannelCase = { + CHANNEL_NOT_SET: 0, + OPEN_CHANNEL: 1, + CLOSED_CHANNEL: 2, + ACTIVE_CHANNEL: 3, + INACTIVE_CHANNEL: 4, + PENDING_OPEN_CHANNEL: 6, + FULLY_RESOLVED_CHANNEL: 7 }; - /** - * @param {number} value - * @return {!proto.lnrpc.MPPRecord} returns this + * @return {proto.lnrpc.ChannelEventUpdate.ChannelCase} */ -proto.lnrpc.MPPRecord.prototype.setTotalAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.ChannelEventUpdate.prototype.getChannelCase = function() { + return /** @type {proto.lnrpc.ChannelEventUpdate.ChannelCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0])); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Route.repeatedFields_ = [4]; - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -26485,8 +26911,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelEventUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEventUpdate.toObject(opt_includeInstance, this); }; @@ -26495,19 +26921,19 @@ proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelEventUpdate} 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.ChannelEventUpdate.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), - totalFeesMAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 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), + fullyResolvedChannel: (f = msg.getFullyResolvedChannel()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + type: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -26521,23 +26947,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.ChannelEventUpdate} */ -proto.lnrpc.Route.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEventUpdate.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.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.Route} 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.Route} + * @return {!proto.lnrpc.ChannelEventUpdate} */ -proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26545,29 +26971,38 @@ proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTotalTimeLock(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.readInt64()); - msg.setTotalFees(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.readInt64()); - msg.setTotalAmt(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.Hop; - reader.readMessage(value,proto.lnrpc.Hop.deserializeBinaryFromReader); - msg.addHops(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFeesMAtoms(value); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setInactiveChannel(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmtMAtoms(value); + var value = new proto.lnrpc.PendingUpdate; + reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); + msg.setPendingOpenChannel(value); + break; + case 7: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setFullyResolvedChannel(value); + break; + case 5: + var value = /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -26582,9 +27017,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.ChannelEventUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Route.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26592,52 +27027,64 @@ 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.ChannelEventUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalTimeLock(); - if (f !== 0) { - writer.writeUint32( + f = message.getOpenChannel(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.Channel.serializeBinaryToWriter ); } - f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( + f = message.getClosedChannel(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter ); } - f = message.getTotalAmt(); - if (f !== 0) { - writer.writeInt64( + f = message.getActiveChannel(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getHopsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getInactiveChannel(); + if (f != null) { + writer.writeMessage( 4, f, - proto.lnrpc.Hop.serializeBinaryToWriter + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getTotalFeesMAtoms(); - if (f !== 0) { - writer.writeInt64( - 5, - f + f = message.getPendingOpenChannel(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.lnrpc.PendingUpdate.serializeBinaryToWriter ); } - f = message.getTotalAmtMAtoms(); - if (f !== 0) { - writer.writeInt64( - 6, + f = message.getFullyResolvedChannel(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 5, f ); } @@ -26645,130 +27092,254 @@ proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { /** - * optional uint32 total_time_lock = 1; - * @return {number} + * @enum {number} */ -proto.lnrpc.Route.prototype.getTotalTimeLock = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ChannelEventUpdate.UpdateType = { + OPEN_CHANNEL: 0, + CLOSED_CHANNEL: 1, + ACTIVE_CHANNEL: 2, + INACTIVE_CHANNEL: 3, + PENDING_OPEN_CHANNEL: 4, + FULLY_RESOLVED_CHANNEL: 5 +}; + +/** + * 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 {number} value - * @return {!proto.lnrpc.Route} returns this + * @param {?proto.lnrpc.Channel|undefined} value + * @return {!proto.lnrpc.ChannelEventUpdate} returns this +*/ +proto.lnrpc.ChannelEventUpdate.prototype.setOpenChannel = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEventUpdate} returns this */ -proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.ChannelEventUpdate.prototype.clearOpenChannel = function() { + return this.setOpenChannel(undefined); }; /** - * optional int64 total_fees = 2; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Route.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelEventUpdate.prototype.hasOpenChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this + * optional ChannelCloseSummary closed_channel = 2; + * @return {?proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.Route.prototype.setTotalFees = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ChannelEventUpdate.prototype.getClosedChannel = function() { + return /** @type{?proto.lnrpc.ChannelCloseSummary} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseSummary, 2)); }; /** - * optional int64 total_amt = 3; - * @return {number} + * @param {?proto.lnrpc.ChannelCloseSummary|undefined} value + * @return {!proto.lnrpc.ChannelEventUpdate} returns this +*/ +proto.lnrpc.ChannelEventUpdate.prototype.setClosedChannel = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEventUpdate} returns this */ -proto.lnrpc.Route.prototype.getTotalAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelEventUpdate.prototype.clearClosedChannel = function() { + return this.setClosedChannel(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Route.prototype.setTotalAmt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ChannelEventUpdate.prototype.hasClosedChannel = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * repeated Hop hops = 4; - * @return {!Array} + * optional ChannelPoint active_channel = 3; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.Route.prototype.getHopsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); +proto.lnrpc.ChannelEventUpdate.prototype.getActiveChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 3)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.Route} returns this + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.ChannelEventUpdate} returns this */ -proto.lnrpc.Route.prototype.setHopsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.lnrpc.ChannelEventUpdate.prototype.setActiveChannel = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); }; /** - * @param {!proto.lnrpc.Hop=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Hop} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEventUpdate} returns this */ -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.ChannelEventUpdate.prototype.clearActiveChannel = function() { + return this.setActiveChannel(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Route} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Route.prototype.clearHopsList = function() { - return this.setHopsList([]); +proto.lnrpc.ChannelEventUpdate.prototype.hasActiveChannel = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional int64 total_fees_m_atoms = 5; - * @return {number} + * optional ChannelPoint inactive_channel = 4; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.Route.prototype.getTotalFeesMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChannelEventUpdate.prototype.getInactiveChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); }; /** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.ChannelEventUpdate} returns this +*/ +proto.lnrpc.ChannelEventUpdate.prototype.setInactiveChannel = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEventUpdate} returns this */ -proto.lnrpc.Route.prototype.setTotalFeesMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ChannelEventUpdate.prototype.clearInactiveChannel = function() { + return this.setInactiveChannel(undefined); }; /** - * optional int64 total_amt_m_atoms = 6; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Route.prototype.getTotalAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ChannelEventUpdate.prototype.hasInactiveChannel = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * @param {number} value - * @return {!proto.lnrpc.Route} returns this + * optional PendingUpdate pending_open_channel = 6; + * @return {?proto.lnrpc.PendingUpdate} */ -proto.lnrpc.Route.prototype.setTotalAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.ChannelEventUpdate.prototype.getPendingOpenChannel = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 6)); +}; + + +/** + * @param {?proto.lnrpc.PendingUpdate|undefined} value + * @return {!proto.lnrpc.ChannelEventUpdate} returns this +*/ +proto.lnrpc.ChannelEventUpdate.prototype.setPendingOpenChannel = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEventUpdate} returns this + */ +proto.lnrpc.ChannelEventUpdate.prototype.clearPendingOpenChannel = function() { + return this.setPendingOpenChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelEventUpdate.prototype.hasPendingOpenChannel = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ChannelPoint fully_resolved_channel = 7; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getFullyResolvedChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 7)); +}; + + +/** + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.ChannelEventUpdate} returns this +*/ +proto.lnrpc.ChannelEventUpdate.prototype.setFullyResolvedChannel = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEventUpdate} returns this + */ +proto.lnrpc.ChannelEventUpdate.prototype.clearFullyResolvedChannel = function() { + return this.setFullyResolvedChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelEventUpdate.prototype.hasFullyResolvedChannel = function() { + return jspb.Message.getField(this, 7) != 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 + * @return {!proto.lnrpc.ChannelEventUpdate} returns this + */ +proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); }; @@ -26788,8 +27359,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.WalletAccountBalance.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletAccountBalance.toObject(opt_includeInstance, this); }; @@ -26798,14 +27369,14 @@ proto.lnrpc.NodeInfoRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.WalletAccountBalance} 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.WalletAccountBalance.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - includeChannels: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + confirmedBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -26819,23 +27390,23 @@ 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.WalletAccountBalance} */ -proto.lnrpc.NodeInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.WalletAccountBalance.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.WalletAccountBalance; + return proto.lnrpc.WalletAccountBalance.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.WalletAccountBalance} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeInfoRequest} + * @return {!proto.lnrpc.WalletAccountBalance} */ -proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.WalletAccountBalance.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26843,12 +27414,12 @@ proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setConfirmedBalance(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeChannels(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnconfirmedBalance(value); break; default: reader.skipField(); @@ -26863,9 +27434,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.WalletAccountBalance.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26873,22 +27444,22 @@ 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 {!proto.lnrpc.WalletAccountBalance} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( + f = message.getConfirmedBalance(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getIncludeChannels(); - if (f) { - writer.writeBool( + f = message.getUnconfirmedBalance(); + if (f !== 0) { + writer.writeInt64( 2, f ); @@ -26897,49 +27468,42 @@ proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter = function(message, writer) /** - * optional string pub_key = 1; - * @return {string} + * optional int64 confirmed_balance = 1; + * @return {number} */ -proto.lnrpc.NodeInfoRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.WalletAccountBalance.prototype.getConfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.NodeInfoRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.WalletAccountBalance} returns this */ -proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.WalletAccountBalance.prototype.setConfirmedBalance = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bool include_channels = 2; - * @return {boolean} + * optional int64 unconfirmed_balance = 2; + * @return {number} */ -proto.lnrpc.NodeInfoRequest.prototype.getIncludeChannels = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.lnrpc.WalletAccountBalance.prototype.getUnconfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.NodeInfoRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.WalletAccountBalance} returns this */ -proto.lnrpc.NodeInfoRequest.prototype.setIncludeChannels = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.lnrpc.WalletAccountBalance.prototype.setUnconfirmedBalance = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeInfo.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -26955,8 +27519,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.WalletBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletBalanceRequest.toObject(opt_includeInstance, this); }; @@ -26965,17 +27529,13 @@ proto.lnrpc.NodeInfo.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.WalletBalanceRequest} 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.WalletBalanceRequest.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) { @@ -26989,47 +27549,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.WalletBalanceRequest} */ -proto.lnrpc.NodeInfo.deserializeBinary = function(bytes) { +proto.lnrpc.WalletBalanceRequest.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.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.NodeInfo} 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.NodeInfo} + * @return {!proto.lnrpc.WalletBalanceRequest} */ -proto.lnrpc.NodeInfo.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 = 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; @@ -27043,9 +27585,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.WalletBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfo.serializeBinaryToWriter(this, writer); + proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27053,164 +27595,16 @@ 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.WalletBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.WalletBalanceRequest.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} - */ -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 - * @return {!proto.lnrpc.NodeInfo} returns this -*/ -proto.lnrpc.NodeInfo.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.NodeInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 num_channels = 2; - * @return {number} - */ -proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 total_capacity = 3; - * @return {number} - */ -proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * repeated ChannelEdge channels = 4; - * @return {!Array} - */ -proto.lnrpc.NodeInfo.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.NodeInfo} returns this -*/ -proto.lnrpc.NodeInfo.prototype.setChannelsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} - */ -proto.lnrpc.NodeInfo.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.ChannelEdge, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeInfo} returns this - */ -proto.lnrpc.NodeInfo.prototype.clearChannelsList = function() { - return this.setChannelsList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.LightningNode.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -27226,8 +27620,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.WalletBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletBalanceResponse.toObject(opt_includeInstance, this); }; @@ -27236,19 +27630,17 @@ proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.WalletBalanceResponse} 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.WalletBalanceResponse.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) : [] + totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), + lockedBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), + accountBalanceMap: (f = msg.getAccountBalanceMap()) ? f.toObject(includeInstance, proto.lnrpc.WalletAccountBalance.toObject) : [] }; if (includeInstance) { @@ -27262,23 +27654,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.WalletBalanceResponse} */ -proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { +proto.lnrpc.WalletBalanceResponse.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.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.LightningNode} 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.LightningNode} + * @return {!proto.lnrpc.WalletBalanceResponse} */ -proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27286,30 +27678,25 @@ 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 = /** @type {number} */ (reader.readInt64()); + msg.setTotalBalance(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setConfirmedBalance(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); + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnconfirmedBalance(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setLockedBalance(value); break; - case 6: - var value = msg.getFeaturesMap(); + case 4: + var value = msg.getAccountBalanceMap(); reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0, new proto.lnrpc.Feature()); + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.WalletAccountBalance.deserializeBinaryFromReader, "", new proto.lnrpc.WalletAccountBalance()); }); break; default: @@ -27325,9 +27712,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.WalletBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningNode.serializeBinaryToWriter(this, writer); + proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27335,184 +27722,138 @@ 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.WalletBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningNode.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLastUpdate(); + f = message.getTotalBalance(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 1, f ); } - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( + f = message.getConfirmedBalance(); + if (f !== 0) { + writer.writeInt64( 2, f ); } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( + f = message.getUnconfirmedBalance(); + if (f !== 0) { + writer.writeInt64( 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( + f = message.getLockedBalance(); + if (f !== 0) { + writer.writeInt64( 5, f ); } - f = message.getFeaturesMap(true); + f = message.getAccountBalanceMap(true); if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter); } }; /** - * optional uint32 last_update = 1; + * optional int64 total_balance = 1; * @return {number} */ -proto.lnrpc.LightningNode.prototype.getLastUpdate = function() { +proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.LightningNode} returns this + * @return {!proto.lnrpc.WalletBalanceResponse} returns this */ -proto.lnrpc.LightningNode.prototype.setLastUpdate = function(value) { +proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { return 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 - * @return {!proto.lnrpc.LightningNode} returns this - */ -proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { - return 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 - * @return {!proto.lnrpc.LightningNode} returns this + * optional int64 confirmed_balance = 2; + * @return {number} */ -proto.lnrpc.LightningNode.prototype.setAlias = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * repeated NodeAddress addresses = 4; - * @return {!Array} + * @param {number} value + * @return {!proto.lnrpc.WalletBalanceResponse} returns this */ -proto.lnrpc.LightningNode.prototype.getAddressesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.LightningNode} returns this -*/ -proto.lnrpc.LightningNode.prototype.setAddressesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.lnrpc.NodeAddress=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeAddress} + * optional int64 unconfirmed_balance = 3; + * @return {number} */ -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.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.LightningNode} returns this + * @param {number} value + * @return {!proto.lnrpc.WalletBalanceResponse} returns this */ -proto.lnrpc.LightningNode.prototype.clearAddressesList = function() { - return this.setAddressesList([]); +proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional string color = 5; - * @return {string} + * optional int64 locked_balance = 5; + * @return {number} */ -proto.lnrpc.LightningNode.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.WalletBalanceResponse.prototype.getLockedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.LightningNode} returns this + * @param {number} value + * @return {!proto.lnrpc.WalletBalanceResponse} returns this */ -proto.lnrpc.LightningNode.prototype.setColor = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.WalletBalanceResponse.prototype.setLockedBalance = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * map features = 6; + * map account_balance = 4; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` - * @return {!jspb.Map} + * @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.WalletBalanceResponse.prototype.getAccountBalanceMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.lnrpc.WalletAccountBalance)); }; /** * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.LightningNode} returns this + * @return {!proto.lnrpc.WalletBalanceResponse} returns this */ -proto.lnrpc.LightningNode.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); +proto.lnrpc.WalletBalanceResponse.prototype.clearAccountBalanceMap = function() { + this.getAccountBalanceMap().clear(); return this;}; @@ -27532,8 +27873,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeAddress.toObject(opt_includeInstance, this); +proto.lnrpc.Amount.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Amount.toObject(opt_includeInstance, this); }; @@ -27542,14 +27883,14 @@ proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeAddress} msg The msg instance to transform. + * @param {!proto.lnrpc.Amount} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { +proto.lnrpc.Amount.toObject = function(includeInstance, msg) { var f, obj = { - network: jspb.Message.getFieldWithDefault(msg, 1, ""), - addr: jspb.Message.getFieldWithDefault(msg, 2, "") + atoms: jspb.Message.getFieldWithDefault(msg, 1, 0), + matoms: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -27563,23 +27904,23 @@ proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeAddress} + * @return {!proto.lnrpc.Amount} */ -proto.lnrpc.NodeAddress.deserializeBinary = function(bytes) { +proto.lnrpc.Amount.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeAddress; - return proto.lnrpc.NodeAddress.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Amount; + return proto.lnrpc.Amount.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NodeAddress} msg The message object to deserialize into. + * @param {!proto.lnrpc.Amount} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeAddress} + * @return {!proto.lnrpc.Amount} */ -proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Amount.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27587,12 +27928,12 @@ proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNetwork(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAtoms(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setMatoms(value); break; default: reader.skipField(); @@ -27607,9 +27948,9 @@ proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { +proto.lnrpc.Amount.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeAddress.serializeBinaryToWriter(this, writer); + proto.lnrpc.Amount.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27617,22 +27958,22 @@ proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeAddress} message + * @param {!proto.lnrpc.Amount} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Amount.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNetwork(); - if (f.length > 0) { - writer.writeString( + f = message.getAtoms(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( + f = message.getMatoms(); + if (f !== 0) { + writer.writeUint64( 2, f ); @@ -27641,38 +27982,38 @@ proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { /** - * optional string network = 1; - * @return {string} + * optional uint64 atoms = 1; + * @return {number} */ -proto.lnrpc.NodeAddress.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Amount.prototype.getAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.NodeAddress} returns this + * @param {number} value + * @return {!proto.lnrpc.Amount} returns this */ -proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.Amount.prototype.setAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string addr = 2; - * @return {string} + * optional uint64 matoms = 2; + * @return {number} */ -proto.lnrpc.NodeAddress.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Amount.prototype.getMatoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.NodeAddress} returns this + * @param {number} value + * @return {!proto.lnrpc.Amount} returns this */ -proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.Amount.prototype.setMatoms = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; @@ -27692,8 +28033,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); }; @@ -27702,19 +28043,13 @@ proto.lnrpc.RoutingPolicy.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelBalanceRequest} 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.ChannelBalanceRequest.toObject = function(includeInstance, msg) { var f, obj = { - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 1, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeBaseMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRateMilliMAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), - disabled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - maxHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), - lastUpdate: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; if (includeInstance) { @@ -27728,57 +28063,29 @@ 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.ChannelBalanceRequest} */ -proto.lnrpc.RoutingPolicy.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBalanceRequest.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.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.RoutingPolicy} 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.RoutingPolicy} + * @return {!proto.lnrpc.ChannelBalanceRequest} */ -proto.lnrpc.RoutingPolicy.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 = /** @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.setFeeBaseMAtoms(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeRateMilliMAtoms(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisabled(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxHtlcMAtoms(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); - break; default: reader.skipField(); break; @@ -27792,9 +28099,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.ChannelBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27802,187 +28109,12 @@ 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.ChannelBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBalanceRequest.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.getFeeBaseMAtoms(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeeRateMilliMAtoms(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getDisabled(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getMaxHtlcMAtoms(); - 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 - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setTimeLockDelta = function(value) { - return 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 - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setMinHtlc = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 fee_base_m_atoms = 3; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fee_rate_milli_m_atoms = 4; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool disabled = 5; - * @return {boolean} - */ -proto.lnrpc.RoutingPolicy.prototype.getDisabled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional uint64 max_htlc_m_atoms = 6; - * @return {number} - */ -proto.lnrpc.RoutingPolicy.prototype.getMaxHtlcMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setMaxHtlcMAtoms = function(value) { - return 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 - * @return {!proto.lnrpc.RoutingPolicy} returns this - */ -proto.lnrpc.RoutingPolicy.prototype.setLastUpdate = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); }; @@ -28002,8 +28134,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBalanceResponse.toObject(opt_includeInstance, this); }; @@ -28012,20 +28144,22 @@ proto.lnrpc.ChannelEdge.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelBalanceResponse} 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.ChannelBalanceResponse.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) + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + localBalance: (f = msg.getLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), + remoteBalance: (f = msg.getRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), + unsettledLocalBalance: (f = msg.getUnsettledLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), + unsettledRemoteBalance: (f = msg.getUnsettledRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), + pendingOpenLocalBalance: (f = msg.getPendingOpenLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), + pendingOpenRemoteBalance: (f = msg.getPendingOpenRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), + maxInboundAmount: jspb.Message.getFieldWithDefault(msg, 900, 0), + maxOutboundAmount: jspb.Message.getFieldWithDefault(msg, 901, 0) }; if (includeInstance) { @@ -28039,23 +28173,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.ChannelBalanceResponse} */ -proto.lnrpc.ChannelEdge.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBalanceResponse.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.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.ChannelEdge} 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.ChannelEdge} + * @return {!proto.lnrpc.ChannelBalanceResponse} */ -proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28063,38 +28197,50 @@ proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChannelId(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setBalance(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChanPoint(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setPendingOpenBalance(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); + var value = new proto.lnrpc.Amount; + reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); + msg.setLocalBalance(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setNode1Pub(value); + var value = new proto.lnrpc.Amount; + reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); + msg.setRemoteBalance(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setNode2Pub(value); + var value = new proto.lnrpc.Amount; + reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); + msg.setUnsettledLocalBalance(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); + var value = new proto.lnrpc.Amount; + reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); + msg.setUnsettledRemoteBalance(value); break; case 7: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setNode1Policy(value); + var value = new proto.lnrpc.Amount; + reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); + msg.setPendingOpenLocalBalance(value); break; case 8: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setNode2Policy(value); + var value = new proto.lnrpc.Amount; + reader.readMessage(value,proto.lnrpc.Amount.deserializeBinaryFromReader); + msg.setPendingOpenRemoteBalance(value); + break; + case 900: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxInboundAmount(value); + break; + case 901: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxOutboundAmount(value); break; default: reader.skipField(); @@ -28109,9 +28255,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.ChannelBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEdge.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28119,206 +28265,300 @@ 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.ChannelBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getBalance(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getChanPoint(); - if (f.length > 0) { - writer.writeString( + f = message.getPendingOpenBalance(); + if (f !== 0) { + writer.writeInt64( 2, f ); } - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( + f = message.getLocalBalance(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.lnrpc.Amount.serializeBinaryToWriter ); } - f = message.getNode1Pub(); - if (f.length > 0) { - writer.writeString( + f = message.getRemoteBalance(); + if (f != null) { + writer.writeMessage( 4, - f + f, + proto.lnrpc.Amount.serializeBinaryToWriter ); } - f = message.getNode2Pub(); - if (f.length > 0) { - writer.writeString( + f = message.getUnsettledLocalBalance(); + if (f != null) { + writer.writeMessage( 5, - f + f, + proto.lnrpc.Amount.serializeBinaryToWriter ); } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + f = message.getUnsettledRemoteBalance(); + if (f != null) { + writer.writeMessage( 6, - f + f, + proto.lnrpc.Amount.serializeBinaryToWriter ); } - f = message.getNode1Policy(); + f = message.getPendingOpenLocalBalance(); if (f != null) { writer.writeMessage( 7, f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter + proto.lnrpc.Amount.serializeBinaryToWriter ); } - f = message.getNode2Policy(); + f = message.getPendingOpenRemoteBalance(); if (f != null) { writer.writeMessage( 8, f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter + proto.lnrpc.Amount.serializeBinaryToWriter + ); + } + f = message.getMaxInboundAmount(); + if (f !== 0) { + writer.writeInt64( + 900, + f + ); + } + f = message.getMaxOutboundAmount(); + if (f !== 0) { + writer.writeInt64( + 901, + f ); } }; /** - * optional uint64 channel_id = 1; - * @return {string} + * optional int64 balance = 1; + * @return {number} */ -proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string chan_point = 2; - * @return {string} + * optional int64 pending_open_balance = 2; + * @return {number} */ -proto.lnrpc.ChannelEdge.prototype.getChanPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.setChanPoint = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 last_update = 3; - * @return {number} + * optional Amount local_balance = 3; + * @return {?proto.lnrpc.Amount} */ -proto.lnrpc.ChannelEdge.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelBalanceResponse.prototype.getLocalBalance = function() { + return /** @type{?proto.lnrpc.Amount} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 3)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * @param {?proto.lnrpc.Amount|undefined} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this +*/ +proto.lnrpc.ChannelBalanceResponse.prototype.setLocalBalance = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.setLastUpdate = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ChannelBalanceResponse.prototype.clearLocalBalance = function() { + return this.setLocalBalance(undefined); }; /** - * optional string node1_pub = 4; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelEdge.prototype.getNode1Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.ChannelBalanceResponse.prototype.hasLocalBalance = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * optional Amount remote_balance = 4; + * @return {?proto.lnrpc.Amount} */ -proto.lnrpc.ChannelEdge.prototype.setNode1Pub = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.lnrpc.ChannelBalanceResponse.prototype.getRemoteBalance = function() { + return /** @type{?proto.lnrpc.Amount} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 4)); }; /** - * optional string node2_pub = 5; - * @return {string} + * @param {?proto.lnrpc.Amount|undefined} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this +*/ +proto.lnrpc.ChannelBalanceResponse.prototype.setRemoteBalance = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.getNode2Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.ChannelBalanceResponse.prototype.clearRemoteBalance = function() { + return this.setRemoteBalance(undefined); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.ChannelBalanceResponse.prototype.hasRemoteBalance = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional int64 capacity = 6; - * @return {number} + * optional Amount unsettled_local_balance = 5; + * @return {?proto.lnrpc.Amount} */ -proto.lnrpc.ChannelEdge.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ChannelBalanceResponse.prototype.getUnsettledLocalBalance = function() { + return /** @type{?proto.lnrpc.Amount} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 5)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * @param {?proto.lnrpc.Amount|undefined} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this +*/ +proto.lnrpc.ChannelBalanceResponse.prototype.setUnsettledLocalBalance = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.ChannelBalanceResponse.prototype.clearUnsettledLocalBalance = function() { + return this.setUnsettledLocalBalance(undefined); }; /** - * optional RoutingPolicy node1_policy = 7; - * @return {?proto.lnrpc.RoutingPolicy} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelEdge.prototype.getNode1Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 7)); +proto.lnrpc.ChannelBalanceResponse.prototype.hasUnsettledLocalBalance = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * @param {?proto.lnrpc.RoutingPolicy|undefined} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * optional Amount unsettled_remote_balance = 6; + * @return {?proto.lnrpc.Amount} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.getUnsettledRemoteBalance = function() { + return /** @type{?proto.lnrpc.Amount} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 6)); +}; + + +/** + * @param {?proto.lnrpc.Amount|undefined} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.setNode1Policy = function(value) { +proto.lnrpc.ChannelBalanceResponse.prototype.setUnsettledRemoteBalance = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this + */ +proto.lnrpc.ChannelBalanceResponse.prototype.clearUnsettledRemoteBalance = function() { + return this.setUnsettledRemoteBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.hasUnsettledRemoteBalance = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Amount pending_open_local_balance = 7; + * @return {?proto.lnrpc.Amount} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenLocalBalance = function() { + return /** @type{?proto.lnrpc.Amount} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 7)); +}; + + +/** + * @param {?proto.lnrpc.Amount|undefined} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this +*/ +proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenLocalBalance = function(value) { return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdge} returns this + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { - return this.setNode1Policy(undefined); +proto.lnrpc.ChannelBalanceResponse.prototype.clearPendingOpenLocalBalance = function() { + return this.setPendingOpenLocalBalance(undefined); }; @@ -28326,1073 +28566,9365 @@ proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelEdge.prototype.hasNode1Policy = function() { +proto.lnrpc.ChannelBalanceResponse.prototype.hasPendingOpenLocalBalance = function() { return jspb.Message.getField(this, 7) != null; }; /** - * optional RoutingPolicy node2_policy = 8; - * @return {?proto.lnrpc.RoutingPolicy} + * optional Amount pending_open_remote_balance = 8; + * @return {?proto.lnrpc.Amount} */ -proto.lnrpc.ChannelEdge.prototype.getNode2Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 8)); +proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenRemoteBalance = function() { + return /** @type{?proto.lnrpc.Amount} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Amount, 8)); }; /** - * @param {?proto.lnrpc.RoutingPolicy|undefined} value - * @return {!proto.lnrpc.ChannelEdge} returns this + * @param {?proto.lnrpc.Amount|undefined} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.setNode2Policy = function(value) { +proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenRemoteBalance = function(value) { return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdge} returns this + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this */ -proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { - return this.setNode2Policy(undefined); +proto.lnrpc.ChannelBalanceResponse.prototype.clearPendingOpenRemoteBalance = function() { + return this.setPendingOpenRemoteBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.hasPendingOpenRemoteBalance = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional int64 max_inbound_amount = 900; + * @return {number} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.getMaxInboundAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 900, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this + */ +proto.lnrpc.ChannelBalanceResponse.prototype.setMaxInboundAmount = function(value) { + return jspb.Message.setProto3IntField(this, 900, value); +}; + + +/** + * optional int64 max_outbound_amount = 901; + * @return {number} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.getMaxOutboundAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 901, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ChannelBalanceResponse} returns this + */ +proto.lnrpc.ChannelBalanceResponse.prototype.setMaxOutboundAmount = function(value) { + return jspb.Message.setProto3IntField(this, 901, value); +}; + + + +/** + * 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) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.QueryRoutesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + amt: jspb.Message.getFieldWithDefault(msg, 2, 0), + amtMAtoms: 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.getBooleanFieldWithDefault(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: (f = jspb.Message.getRepeatedField(msg, 17)) == null ? undefined : 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.QueryRoutesRequest} + */ +proto.lnrpc.QueryRoutesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.QueryRoutesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.QueryRoutesRequest} + */ +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 {number} */ (reader.readInt64()); + msg.setAmt(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtMAtoms(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); + break; + 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 values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addDestFeatures(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.QueryRoutesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.QueryRoutesRequest.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.QueryRoutesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.QueryRoutesRequest.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.getAmtMAtoms(); + if (f !== 0) { + writer.writeInt64( + 12, + 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(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + 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 + ); + } + f = message.getIgnoredPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + proto.lnrpc.NodePair.serializeBinaryToWriter + ); + } + f = message.getCltvLimit(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + 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 + ); + } +}; + + +/** + * optional string pub_key = 1; + * @return {string} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { + return 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 + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 amt_m_atoms = 12; + * @return {number} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getAmtMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setAmtMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 12, 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 + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setFinalCltvDelta = function(value) { + return 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 + * @return {!proto.lnrpc.QueryRoutesRequest} returns this +*/ +proto.lnrpc.QueryRoutesRequest.prototype.setFeeLimit = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearFeeLimit = function() { + return 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 + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredNodesList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredNodes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredNodesList = function() { + return 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 + * @return {!proto.lnrpc.QueryRoutesRequest} returns this +*/ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredEdgesList = function(value) { + return 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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredEdgesList = function() { + return 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 + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setSourcePubKey = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional bool use_mission_control = 9; + * @return {boolean} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getUseMissionControl = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setUseMissionControl = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * repeated NodePair ignored_pairs = 10; + * @return {!Array} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredPairsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodePair, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this +*/ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredPairsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.lnrpc.NodePair=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodePair} + */ +proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredPairs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.NodePair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredPairsList = function() { + return this.setIgnoredPairsList([]); +}; + + +/** + * optional uint32 cltv_limit = 11; + * @return {number} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getCltvLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setCltvLimit = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * map dest_custom_records = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearDestCustomRecordsMap = function() { + this.getDestCustomRecordsMap().clear(); + return this;}; + + +/** + * optional uint64 outgoing_chan_id = 14; + * @return {string} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getOutgoingChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setOutgoingChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 14, value); +}; + + +/** + * optional bytes last_hop_pubkey = 15; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes last_hop_pubkey = 15; + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {string} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastHopPubkey())); +}; + + +/** + * 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.QueryRoutesRequest.prototype.getLastHopPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastHopPubkey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setLastHopPubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 15, value); +}; + + +/** + * repeated RouteHint route_hints = 16; + * @return {!Array} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getRouteHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 16)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this +*/ +proto.lnrpc.QueryRoutesRequest.prototype.setRouteHintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 16, value); +}; + + +/** + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} + */ +proto.lnrpc.QueryRoutesRequest.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.RouteHint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearRouteHintsList = function() { + return this.setRouteHintsList([]); +}; + + +/** + * repeated FeatureBit dest_features = 17; + * @return {!Array} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getDestFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 17)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.setDestFeaturesList = function(value) { + return jspb.Message.setField(this, 17, value || []); +}; + + +/** + * @param {!proto.lnrpc.FeatureBit} value + * @param {number=} opt_index + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.addDestFeatures = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 17, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.QueryRoutesRequest} returns this + */ +proto.lnrpc.QueryRoutesRequest.prototype.clearDestFeaturesList = function() { + return this.setDestFeaturesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodePair.toObject = function(includeInstance, msg) { + var f, obj = { + from: msg.getFrom_asB64(), + to: msg.getTo_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.NodePair} + */ +proto.lnrpc.NodePair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NodePair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodePair} + */ +proto.lnrpc.NodePair.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.setFrom(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NodePair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodePair.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.NodePair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodePair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFrom_asU8(); + if (f.length > 0) { + writer.writeBytes( + 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 + * @return {!proto.lnrpc.NodePair} returns this + */ +proto.lnrpc.NodePair.prototype.setFrom = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes to = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.NodePair.prototype.getTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * 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())); +}; + + +/** + * 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.NodePair.prototype.getTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTo())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.NodePair} returns this + */ +proto.lnrpc.NodePair.prototype.setTo = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EdgeLocator.toObject = function(includeInstance, msg) { + var f, obj = { + channelId: jspb.Message.getFieldWithDefault(msg, 1, "0"), + directionReverse: jspb.Message.getBooleanFieldWithDefault(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.EdgeLocator} + */ +proto.lnrpc.EdgeLocator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.EdgeLocator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.EdgeLocator} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.EdgeLocator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.EdgeLocator.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.EdgeLocator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + * @return {!proto.lnrpc.EdgeLocator} returns this + */ +proto.lnrpc.EdgeLocator.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional bool direction_reverse = 2; + * @return {boolean} + */ +proto.lnrpc.EdgeLocator.prototype.getDirectionReverse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.EdgeLocator} returns this + */ +proto.lnrpc.EdgeLocator.prototype.setDirectionReverse = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.QueryRoutesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.QueryRoutesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + routesList: jspb.Message.toObjectList(msg.getRoutesList(), + proto.lnrpc.Route.toObject, includeInstance), + successProb: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.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.QueryRoutesResponse} + */ +proto.lnrpc.QueryRoutesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.QueryRoutesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.QueryRoutesResponse} + */ +proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.addRoutes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setSuccessProb(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.QueryRoutesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.QueryRoutesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRoutesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Route.serializeBinaryToWriter + ); + } + 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 + * @return {!proto.lnrpc.QueryRoutesResponse} returns this +*/ +proto.lnrpc.QueryRoutesResponse.prototype.setRoutesList = function(value) { + return 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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.QueryRoutesResponse} returns this + */ +proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { + return this.setRoutesList([]); +}; + + +/** + * optional double success_prob = 2; + * @return {number} + */ +proto.lnrpc.QueryRoutesResponse.prototype.getSuccessProb = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.QueryRoutesResponse} returns this + */ +proto.lnrpc.QueryRoutesResponse.prototype.setSuccessProb = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Hop.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), + amtToForwardMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), + feeMAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), + pubKey: jspb.Message.getFieldWithDefault(msg, 8, ""), + tlvPayload: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + mppRecord: (f = msg.getMppRecord()) && proto.lnrpc.MPPRecord.toObject(includeInstance, f), + ampRecord: (f = msg.getAmpRecord()) && proto.lnrpc.AMPRecord.toObject(includeInstance, f), + 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.lnrpc.Hop} + */ +proto.lnrpc.Hop.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Hop} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.Hop} + */ +proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setChanCapacity(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtToForward(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpiry(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtToForwardMAtoms(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeMAtoms(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 12: + var value = new proto.lnrpc.AMPRecord; + reader.readMessage(value,proto.lnrpc.AMPRecord.deserializeBinaryFromReader); + msg.setAmpRecord(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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.Hop.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.Hop.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.Hop} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getChanCapacity(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getAmtToForward(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpiry(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getAmtToForwardMAtoms(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getFeeMAtoms(); + 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.getAmpRecord(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.lnrpc.AMPRecord.serializeBinaryToWriter + ); + } + f = message.getCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } +}; + + +/** + * optional uint64 chan_id = 1; + * @return {string} + */ +proto.lnrpc.Hop.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(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 + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { + return 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 + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setAmtToForward = function(value) { + return 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 + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 expiry = 5; + * @return {number} + */ +proto.lnrpc.Hop.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 amt_to_forward_m_atoms = 6; + * @return {number} + */ +proto.lnrpc.Hop.prototype.getAmtToForwardMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setAmtToForwardMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 fee_m_atoms = 7; + * @return {number} + */ +proto.lnrpc.Hop.prototype.getFeeMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setFeeMAtoms = function(value) { + return 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 + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setPubKey = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional bool tlv_payload = 9; + * @return {boolean} + */ +proto.lnrpc.Hop.prototype.getTlvPayload = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.setTlvPayload = function(value) { + return 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 + * @return {!proto.lnrpc.Hop} returns this +*/ +proto.lnrpc.Hop.prototype.setMppRecord = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.clearMppRecord = function() { + return this.setMppRecord(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Hop.prototype.hasMppRecord = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional AMPRecord amp_record = 12; + * @return {?proto.lnrpc.AMPRecord} + */ +proto.lnrpc.Hop.prototype.getAmpRecord = function() { + return /** @type{?proto.lnrpc.AMPRecord} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.AMPRecord, 12)); +}; + + +/** + * @param {?proto.lnrpc.AMPRecord|undefined} value + * @return {!proto.lnrpc.Hop} returns this +*/ +proto.lnrpc.Hop.prototype.setAmpRecord = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.clearAmpRecord = function() { + return this.setAmpRecord(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Hop.prototype.hasAmpRecord = function() { + return jspb.Message.getField(this, 12) != 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)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.Hop} returns this + */ +proto.lnrpc.Hop.prototype.clearCustomRecordsMap = function() { + this.getCustomRecordsMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.MPPRecord.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MPPRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.MPPRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.MPPRecord.toObject = function(includeInstance, msg) { + var f, obj = { + paymentAddr: msg.getPaymentAddr_asB64(), + totalAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 10, 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.MPPRecord} + */ +proto.lnrpc.MPPRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.MPPRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.MPPRecord} + */ +proto.lnrpc.MPPRecord.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalAmtMAtoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.MPPRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.MPPRecord.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.MPPRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.MPPRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } + f = message.getTotalAmtMAtoms(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } +}; + + +/** + * optional bytes payment_addr = 11; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.MPPRecord.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.MPPRecord.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.MPPRecord.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.MPPRecord} returns this + */ +proto.lnrpc.MPPRecord.prototype.setPaymentAddr = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); +}; + + +/** + * optional int64 total_amt_m_atoms = 10; + * @return {number} + */ +proto.lnrpc.MPPRecord.prototype.getTotalAmtMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.MPPRecord} returns this + */ +proto.lnrpc.MPPRecord.prototype.setTotalAmtMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.AMPRecord.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AMPRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.AMPRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.AMPRecord.toObject = function(includeInstance, msg) { + var f, obj = { + rootShare: msg.getRootShare_asB64(), + setId: msg.getSetId_asB64(), + childIndex: 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.AMPRecord} + */ +proto.lnrpc.AMPRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.AMPRecord; + return proto.lnrpc.AMPRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.AMPRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.AMPRecord} + */ +proto.lnrpc.AMPRecord.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.setRootShare(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSetId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChildIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.AMPRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.AMPRecord.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.AMPRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.AMPRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRootShare_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSetId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChildIndex(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional bytes root_share = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AMPRecord.prototype.getRootShare = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes root_share = 1; + * This is a type-conversion wrapper around `getRootShare()` + * @return {string} + */ +proto.lnrpc.AMPRecord.prototype.getRootShare_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRootShare())); +}; + + +/** + * optional bytes root_share = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRootShare()` + * @return {!Uint8Array} + */ +proto.lnrpc.AMPRecord.prototype.getRootShare_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRootShare())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AMPRecord} returns this + */ +proto.lnrpc.AMPRecord.prototype.setRootShare = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes set_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AMPRecord.prototype.getSetId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes set_id = 2; + * This is a type-conversion wrapper around `getSetId()` + * @return {string} + */ +proto.lnrpc.AMPRecord.prototype.getSetId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSetId())); +}; + + +/** + * optional bytes set_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSetId()` + * @return {!Uint8Array} + */ +proto.lnrpc.AMPRecord.prototype.getSetId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSetId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AMPRecord} returns this + */ +proto.lnrpc.AMPRecord.prototype.setSetId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 child_index = 3; + * @return {number} + */ +proto.lnrpc.AMPRecord.prototype.getChildIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.AMPRecord} returns this + */ +proto.lnrpc.AMPRecord.prototype.setChildIndex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Route.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Route.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), + totalFeesMAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalAmtMAtoms: 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.Route} + */ +proto.lnrpc.Route.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Route} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.Route} + */ +proto.lnrpc.Route.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.setTotalTimeLock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + 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.setTotalFeesMAtoms(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalAmtMAtoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.Route.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + 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.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.getTotalFeesMAtoms(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTotalAmtMAtoms(); + 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 + * @return {!proto.lnrpc.Route} returns this + */ +proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { + return 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 + * @return {!proto.lnrpc.Route} returns this + */ +proto.lnrpc.Route.prototype.setTotalFees = function(value) { + return 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 + * @return {!proto.lnrpc.Route} returns this + */ +proto.lnrpc.Route.prototype.setTotalAmt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated Hop hops = 4; + * @return {!Array} + */ +proto.lnrpc.Route.prototype.getHopsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.Route} returns this +*/ +proto.lnrpc.Route.prototype.setHopsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.lnrpc.Hop=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Hop} + */ +proto.lnrpc.Route.prototype.addHops = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.Hop, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Route} returns this + */ +proto.lnrpc.Route.prototype.clearHopsList = function() { + return this.setHopsList([]); +}; + + +/** + * optional int64 total_fees_m_atoms = 5; + * @return {number} + */ +proto.lnrpc.Route.prototype.getTotalFeesMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Route} returns this + */ +proto.lnrpc.Route.prototype.setTotalFeesMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 total_amt_m_atoms = 6; + * @return {number} + */ +proto.lnrpc.Route.prototype.getTotalAmtMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Route} returns this + */ +proto.lnrpc.Route.prototype.setTotalAmtMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.NodeInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.NodeInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + includeChannels: jspb.Message.getBooleanFieldWithDefault(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.NodeInfoRequest} + */ +proto.lnrpc.NodeInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.NodeInfoRequest; + return proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.NodeInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeInfoRequest} + */ +proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeChannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NodeInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodeInfoRequest.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.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 + * @return {!proto.lnrpc.NodeInfoRequest} returns this + */ +proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool include_channels = 2; + * @return {boolean} + */ +proto.lnrpc.NodeInfoRequest.prototype.getIncludeChannels = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.NodeInfoRequest} returns this + */ +proto.lnrpc.NodeInfoRequest.prototype.setIncludeChannels = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.NodeInfo.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.NodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.NodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + node: (f = msg.getNode()) && proto.lnrpc.LightningNode.toObject(includeInstance, f), + numChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.ChannelEdge.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.NodeInfo} + */ +proto.lnrpc.NodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.NodeInfo; + return proto.lnrpc.NodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.NodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeInfo} + */ +proto.lnrpc.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.LightningNode; + reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); + msg.setNode(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumChannels(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalCapacity(value); + break; + case 4: + var value = new proto.lnrpc.ChannelEdge; + reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); + msg.addChannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodeInfo.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.NodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.LightningNode.serializeBinaryToWriter + ); + } + f = message.getNumChannels(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTotalCapacity(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.lnrpc.ChannelEdge.serializeBinaryToWriter + ); + } +}; + + +/** + * optional LightningNode node = 1; + * @return {?proto.lnrpc.LightningNode} + */ +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 + * @return {!proto.lnrpc.NodeInfo} returns this +*/ +proto.lnrpc.NodeInfo.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.NodeInfo} returns this + */ +proto.lnrpc.NodeInfo.prototype.clearNode = function() { + return this.setNode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.NodeInfo.prototype.hasNode = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 num_channels = 2; + * @return {number} + */ +proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NodeInfo} returns this + */ +proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 total_capacity = 3; + * @return {number} + */ +proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NodeInfo} returns this + */ +proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated ChannelEdge channels = 4; + * @return {!Array} + */ +proto.lnrpc.NodeInfo.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.NodeInfo} returns this +*/ +proto.lnrpc.NodeInfo.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.lnrpc.ChannelEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdge} + */ +proto.lnrpc.NodeInfo.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.ChannelEdge, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.NodeInfo} returns this + */ +proto.lnrpc.NodeInfo.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.LightningNode.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.LightningNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.LightningNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.LightningNode.toObject = function(includeInstance, msg) { + var f, obj = { + lastUpdate: jspb.Message.getFieldWithDefault(msg, 1, 0), + pubKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + alias: jspb.Message.getFieldWithDefault(msg, 3, ""), + addressesList: jspb.Message.toObjectList(msg.getAddressesList(), + proto.lnrpc.NodeAddress.toObject, includeInstance), + color: jspb.Message.getFieldWithDefault(msg, 5, ""), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.LightningNode} + */ +proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.LightningNode; + return proto.lnrpc.LightningNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.LightningNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.LightningNode} + */ +proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastUpdate(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 4: + var value = new proto.lnrpc.NodeAddress; + reader.readMessage(value,proto.lnrpc.NodeAddress.deserializeBinaryFromReader); + msg.addAddresses(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setColor(value); + break; + 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, new proto.lnrpc.Feature()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.LightningNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.LightningNode.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.LightningNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + * @return {!proto.lnrpc.LightningNode} returns this + */ +proto.lnrpc.LightningNode.prototype.setLastUpdate = function(value) { + return 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 + * @return {!proto.lnrpc.LightningNode} returns this + */ +proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { + return 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 + * @return {!proto.lnrpc.LightningNode} returns this + */ +proto.lnrpc.LightningNode.prototype.setAlias = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated NodeAddress addresses = 4; + * @return {!Array} + */ +proto.lnrpc.LightningNode.prototype.getAddressesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.LightningNode} returns this +*/ +proto.lnrpc.LightningNode.prototype.setAddressesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.lnrpc.NodeAddress=} 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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.LightningNode} returns this + */ +proto.lnrpc.LightningNode.prototype.clearAddressesList = function() { + return 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 + * @return {!proto.lnrpc.LightningNode} returns this + */ +proto.lnrpc.LightningNode.prototype.setColor = function(value) { + return 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)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.LightningNode} returns this + */ +proto.lnrpc.LightningNode.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.NodeAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.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; +}; +} + + +/** + * 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); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.NodeAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeAddress} + */ +proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * 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(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.NodeAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string network = 1; + * @return {string} + */ +proto.lnrpc.NodeAddress.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.NodeAddress} returns this + */ +proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string addr = 2; + * @return {string} + */ +proto.lnrpc.NodeAddress.prototype.getAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.NodeAddress} returns this + */ +proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.RoutingPolicy.toObject = function(includeInstance, msg) { + var f, obj = { + timeLockDelta: jspb.Message.getFieldWithDefault(msg, 1, 0), + minHtlc: jspb.Message.getFieldWithDefault(msg, 2, 0), + feeBaseMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeRateMilliMAtoms: jspb.Message.getFieldWithDefault(msg, 4, 0), + disabled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + maxHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), + lastUpdate: 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.lnrpc.RoutingPolicy} + */ +proto.lnrpc.RoutingPolicy.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.RoutingPolicy; + return proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.RoutingPolicy} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.RoutingPolicy} + */ +proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeLockDelta(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinHtlc(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeBaseMAtoms(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeRateMilliMAtoms(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDisabled(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxHtlcMAtoms(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastUpdate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.RoutingPolicy.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.RoutingPolicy.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.RoutingPolicy} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimeLockDelta(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMinHtlc(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getFeeBaseMAtoms(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFeeRateMilliMAtoms(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDisabled(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getMaxHtlcMAtoms(); + 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 + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setTimeLockDelta = function(value) { + return 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 + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setMinHtlc = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 fee_base_m_atoms = 3; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee_rate_milli_m_atoms = 4; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool disabled = 5; + * @return {boolean} + */ +proto.lnrpc.RoutingPolicy.prototype.getDisabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional uint64 max_htlc_m_atoms = 6; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getMaxHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setMaxHtlcMAtoms = function(value) { + return 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 + * @return {!proto.lnrpc.RoutingPolicy} returns this + */ +proto.lnrpc.RoutingPolicy.prototype.setLastUpdate = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.EnforceNodePingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EnforceNodePingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.EnforceNodePingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EnforceNodePingRequest.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.EnforceNodePingRequest} + */ +proto.lnrpc.EnforceNodePingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.EnforceNodePingRequest; + return proto.lnrpc.EnforceNodePingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.EnforceNodePingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.EnforceNodePingRequest} + */ +proto.lnrpc.EnforceNodePingRequest.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.EnforceNodePingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.EnforceNodePingRequest.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.EnforceNodePingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EnforceNodePingRequest.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.EnforceNodePingRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.EnforceNodePingRequest} returns this + */ +proto.lnrpc.EnforceNodePingRequest.prototype.setPubKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.EnforceNodePingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EnforceNodePingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.EnforceNodePingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EnforceNodePingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pingTimeMicro: 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.EnforceNodePingResponse} + */ +proto.lnrpc.EnforceNodePingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.EnforceNodePingResponse; + return proto.lnrpc.EnforceNodePingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.EnforceNodePingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.EnforceNodePingResponse} + */ +proto.lnrpc.EnforceNodePingResponse.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.setPingTimeMicro(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.EnforceNodePingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.EnforceNodePingResponse.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.EnforceNodePingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EnforceNodePingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPingTimeMicro(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 ping_time_micro = 1; + * @return {number} + */ +proto.lnrpc.EnforceNodePingResponse.prototype.getPingTimeMicro = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.EnforceNodePingResponse} returns this + */ +proto.lnrpc.EnforceNodePingResponse.prototype.setPingTimeMicro = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelEdge.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) + }; + + 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.ChannelEdge} + */ +proto.lnrpc.ChannelEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ChannelEdge} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelEdge} + */ +proto.lnrpc.ChannelEdge.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 {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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelEdge.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.ChannelEdge} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getChanPoint(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLastUpdate(); + if (f !== 0) { + 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 uint64 channel_id = 1; + * @return {string} + */ +proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringIntField(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 + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.setChanPoint = function(value) { + return 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 + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.setLastUpdate = function(value) { + return 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 + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.setNode1Pub = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string node2_pub = 5; + * @return {string} + */ +proto.lnrpc.ChannelEdge.prototype.getNode2Pub = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional int64 capacity = 6; + * @return {number} + */ +proto.lnrpc.ChannelEdge.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional RoutingPolicy node1_policy = 7; + * @return {?proto.lnrpc.RoutingPolicy} + */ +proto.lnrpc.ChannelEdge.prototype.getNode1Policy = function() { + return /** @type{?proto.lnrpc.RoutingPolicy} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 7)); +}; + + +/** + * @param {?proto.lnrpc.RoutingPolicy|undefined} value + * @return {!proto.lnrpc.ChannelEdge} returns this +*/ +proto.lnrpc.ChannelEdge.prototype.setNode1Policy = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { + return this.setNode1Policy(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelEdge.prototype.hasNode1Policy = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional RoutingPolicy node2_policy = 8; + * @return {?proto.lnrpc.RoutingPolicy} + */ +proto.lnrpc.ChannelEdge.prototype.getNode2Policy = function() { + return /** @type{?proto.lnrpc.RoutingPolicy} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 8)); +}; + + +/** + * @param {?proto.lnrpc.RoutingPolicy|undefined} value + * @return {!proto.lnrpc.ChannelEdge} returns this +*/ +proto.lnrpc.ChannelEdge.prototype.setNode2Policy = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEdge} returns this + */ +proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { + return this.setNode2Policy(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ChannelGraphRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelGraphRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ChannelGraphRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelGraphRequest.toObject = function(includeInstance, msg) { + var f, obj = { + includeUnannounced: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.ChannelGraphRequest} + */ +proto.lnrpc.ChannelGraphRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelGraphRequest; + return proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelGraphRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelGraphRequest} + */ +proto.lnrpc.ChannelGraphRequest.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.setIncludeUnannounced(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelGraphRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelGraphRequest.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.ChannelGraphRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncludeUnannounced(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool include_unannounced = 1; + * @return {boolean} + */ +proto.lnrpc.ChannelGraphRequest.prototype.getIncludeUnannounced = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.ChannelGraphRequest} returns this + */ +proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelGraph.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) + }; + + 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.ChannelGraph} + */ +proto.lnrpc.ChannelGraph.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ChannelGraph} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelGraph} + */ +proto.lnrpc.ChannelGraph.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.addNodes(value); + break; + case 2: + var value = new proto.lnrpc.ChannelEdge; + reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelGraph.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelGraph.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.ChannelGraph} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelGraph.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.LightningNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.lnrpc.ChannelEdge.serializeBinaryToWriter + ); + } +}; + + +/** + * 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 + * @return {!proto.lnrpc.ChannelGraph} returns this +*/ +proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { + return 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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ChannelGraph} returns this + */ +proto.lnrpc.ChannelGraph.prototype.clearNodesList = function() { + return 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 + * @return {!proto.lnrpc.ChannelGraph} returns this +*/ +proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.lnrpc.ChannelEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdge} + */ +proto.lnrpc.ChannelGraph.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdge, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ChannelGraph} returns this + */ +proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { + return this.setEdgesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.NodeMetricsRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.NodeMetricsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeMetricsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.NodeMetricsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeMetricsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + typesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.NodeMetricsRequest} + */ +proto.lnrpc.NodeMetricsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NodeMetricsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeMetricsRequest} + */ +proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addTypes(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NodeMetricsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodeMetricsRequest.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.NodeMetricsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeMetricsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTypesList(); + if (f.length > 0) { + writer.writePackedEnum( + 1, + f + ); + } +}; + + +/** + * repeated NodeMetricType types = 1; + * @return {!Array} + */ +proto.lnrpc.NodeMetricsRequest.prototype.getTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.NodeMetricsRequest} returns this + */ +proto.lnrpc.NodeMetricsRequest.prototype.setTypesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!proto.lnrpc.NodeMetricType} value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeMetricsRequest} returns this + */ +proto.lnrpc.NodeMetricsRequest.prototype.addTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.NodeMetricsRequest} returns this + */ +proto.lnrpc.NodeMetricsRequest.prototype.clearTypesList = function() { + return this.setTypesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.NodeMetricsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeMetricsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.NodeMetricsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeMetricsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + betweennessCentralityMap: (f = msg.getBetweennessCentralityMap()) ? f.toObject(includeInstance, proto.lnrpc.FloatMetric.toObject) : [] + }; + + 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.NodeMetricsResponse} + */ +proto.lnrpc.NodeMetricsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NodeMetricsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeMetricsResponse} + */ +proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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, "", new proto.lnrpc.FloatMetric()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NodeMetricsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodeMetricsResponse.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.NodeMetricsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeMetricsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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); + } +}; + + +/** + * map betweenness_centrality = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.NodeMetricsResponse.prototype.getBetweennessCentralityMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.lnrpc.FloatMetric)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.NodeMetricsResponse} returns this + */ +proto.lnrpc.NodeMetricsResponse.prototype.clearBetweennessCentralityMap = function() { + this.getBetweennessCentralityMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.FloatMetric.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FloatMetric.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.FloatMetric} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.FloatMetric.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + normalizedValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.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.FloatMetric} + */ +proto.lnrpc.FloatMetric.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.FloatMetric} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.FloatMetric} + */ +proto.lnrpc.FloatMetric.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.setValue(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setNormalizedValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.FloatMetric.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FloatMetric.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.FloatMetric} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.FloatMetric.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getNormalizedValue(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } +}; + + +/** + * optional double value = 1; + * @return {number} + */ +proto.lnrpc.FloatMetric.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.FloatMetric} returns this + */ +proto.lnrpc.FloatMetric.prototype.setValue = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double normalized_value = 2; + * @return {number} + */ +proto.lnrpc.FloatMetric.prototype.getNormalizedValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.FloatMetric} returns this + */ +proto.lnrpc.FloatMetric.prototype.setNormalizedValue = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChanInfoRequest} + */ +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); +}; + + +/** + * 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 {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChanInfoRequest.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.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 (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } +}; + + +/** + * optional uint64 chan_id = 1; + * @return {string} + */ +proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChanInfoRequest} returns this + */ +proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.NetworkInfoRequest.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.NetworkInfoRequest} + */ +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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NetworkInfoRequest.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.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; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NetworkInfo.toObject = function(includeInstance, msg) { + var f, obj = { + graphDiameter: jspb.Message.getFieldWithDefault(msg, 1, 0), + avgOutDegree: jspb.Message.getFloatingPointFieldWithDefault(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.getFloatingPointFieldWithDefault(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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.NetworkInfo} + */ +proto.lnrpc.NetworkInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NetworkInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NetworkInfo} + */ +proto.lnrpc.NetworkInfo.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.setGraphDiameter(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setAvgOutDegree(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxOutDegree(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumNodes(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumChannels(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + 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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NetworkInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NetworkInfo.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.NetworkInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGraphDiameter(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getAvgOutDegree(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getMaxOutDegree(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getNumNodes(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getNumChannels(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + 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 graph_diameter = 1; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getGraphDiameter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setGraphDiameter = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional double avg_out_degree = 2; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getAvgOutDegree = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional uint32 max_out_degree = 3; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 num_nodes = 4; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 num_channels = 5; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 total_network_capacity = 6; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional double avg_channel_size = 7; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { + return 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 + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { + return 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 + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { + return 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 + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setMedianChannelSizeSat = function(value) { + return 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 + * @return {!proto.lnrpc.NetworkInfo} returns this + */ +proto.lnrpc.NetworkInfo.prototype.setNumZombieChans = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + 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.StopRequest} + */ +proto.lnrpc.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.StopRequest; + return proto.lnrpc.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.StopRequest.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.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; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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 + */ +proto.lnrpc.StopResponse.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.StopResponse} + */ +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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.StopResponse.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.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.GraphTopologySubscription.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.GraphTopologySubscription} + */ +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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GraphTopologySubscription.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.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; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.GraphTopologyUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GraphTopologyUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + nodeUpdatesList: jspb.Message.toObjectList(msg.getNodeUpdatesList(), + proto.lnrpc.NodeUpdate.toObject, includeInstance), + channelUpdatesList: jspb.Message.toObjectList(msg.getChannelUpdatesList(), + proto.lnrpc.ChannelEdgeUpdate.toObject, includeInstance), + closedChansList: jspb.Message.toObjectList(msg.getClosedChansList(), + proto.lnrpc.ClosedChannelUpdate.toObject, includeInstance) + }; + + 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.GraphTopologyUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.GraphTopologyUpdate; + return proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.GraphTopologyUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GraphTopologyUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.NodeUpdate; + reader.readMessage(value,proto.lnrpc.NodeUpdate.deserializeBinaryFromReader); + msg.addNodeUpdates(value); + break; + case 2: + var value = new proto.lnrpc.ChannelEdgeUpdate; + reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); + msg.addChannelUpdates(value); + break; + case 3: + var value = new proto.lnrpc.ClosedChannelUpdate; + reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); + msg.addClosedChans(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GraphTopologyUpdate.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.GraphTopologyUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeUpdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.NodeUpdate.serializeBinaryToWriter + ); + } + f = message.getChannelUpdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter + ); + } + f = message.getClosedChansList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated NodeUpdate node_updates = 1; + * @return {!Array} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.GraphTopologyUpdate} returns this +*/ +proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.NodeUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.addNodeUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.NodeUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.GraphTopologyUpdate} returns this + */ +proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { + return this.setNodeUpdatesList([]); +}; + + +/** + * repeated ChannelEdgeUpdate channel_updates = 2; + * @return {!Array} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.GraphTopologyUpdate} returns this +*/ +proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdgeUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.addChannelUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdgeUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.GraphTopologyUpdate} returns this + */ +proto.lnrpc.GraphTopologyUpdate.prototype.clearChannelUpdatesList = function() { + return this.setChannelUpdatesList([]); +}; + + +/** + * repeated ClosedChannelUpdate closed_chans = 3; + * @return {!Array} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.GraphTopologyUpdate} returns this +*/ +proto.lnrpc.GraphTopologyUpdate.prototype.setClosedChansList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.lnrpc.ClosedChannelUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ClosedChannelUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.addClosedChans = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.ClosedChannelUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.GraphTopologyUpdate} returns this + */ +proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { + return this.setClosedChansList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.NodeUpdate.repeatedFields_ = [1,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + identityKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + globalFeatures: msg.getGlobalFeatures_asB64(), + alias: jspb.Message.getFieldWithDefault(msg, 4, ""), + color: jspb.Message.getFieldWithDefault(msg, 5, ""), + nodeAddressesList: jspb.Message.toObjectList(msg.getNodeAddressesList(), + proto.lnrpc.NodeAddress.toObject, includeInstance), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] + }; + + 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.NodeUpdate} + */ +proto.lnrpc.NodeUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NodeUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeUpdate} + */ +proto.lnrpc.NodeUpdate.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.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); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setColor(value); + break; + case 7: + var value = new proto.lnrpc.NodeAddress; + reader.readMessage(value,proto.lnrpc.NodeAddress.deserializeBinaryFromReader); + msg.addNodeAddresses(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, new proto.lnrpc.Feature()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NodeUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodeUpdate.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.NodeUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getIdentityKey(); + 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 + ); + } + f = message.getNodeAddressesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.lnrpc.NodeAddress.serializeBinaryToWriter + ); + } + 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); + } +}; + + +/** + * repeated string addresses = 1; + * @return {!Array} + */ +proto.lnrpc.NodeUpdate.prototype.getAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.setAddressesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.addAddresses = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.clearAddressesList = function() { + return 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 + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.setIdentityKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes global_features = 3; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * 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 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.NodeUpdate.prototype.getGlobalFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGlobalFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.setGlobalFeatures = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string alias = 4; + * @return {string} + */ +proto.lnrpc.NodeUpdate.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string color = 5; + * @return {string} + */ +proto.lnrpc.NodeUpdate.prototype.getColor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.setColor = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated NodeAddress node_addresses = 7; + * @return {!Array} + */ +proto.lnrpc.NodeUpdate.prototype.getNodeAddressesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.NodeUpdate} returns this +*/ +proto.lnrpc.NodeUpdate.prototype.setNodeAddressesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.lnrpc.NodeAddress=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeAddress} + */ +proto.lnrpc.NodeUpdate.prototype.addNodeAddresses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.lnrpc.NodeAddress, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.clearNodeAddressesList = function() { + return this.setNodeAddressesList([]); +}; + + +/** + * map features = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.NodeUpdate.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + proto.lnrpc.Feature)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.NodeUpdate} returns this + */ +proto.lnrpc.NodeUpdate.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelEdgeUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + routingPolicy: (f = msg.getRoutingPolicy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), + advertisingNode: jspb.Message.getFieldWithDefault(msg, 5, ""), + connectingNode: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + 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.ChannelEdgeUpdate} + */ +proto.lnrpc.ChannelEdgeUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ChannelEdgeUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelEdgeUpdate} + */ +proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 2: + var value = 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); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectingNode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelEdgeUpdate.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.ChannelEdgeUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 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(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getConnectingNode(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional uint64 chan_id = 1; + * @return {string} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(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 + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this +*/ +proto.lnrpc.ChannelEdgeUpdate.prototype.setChanPoint = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.clearChanPoint = function() { + return 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 + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional RoutingPolicy routing_policy = 4; + * @return {?proto.lnrpc.RoutingPolicy} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.getRoutingPolicy = function() { + return /** @type{?proto.lnrpc.RoutingPolicy} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 4)); +}; + + +/** + * @param {?proto.lnrpc.RoutingPolicy|undefined} value + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this +*/ +proto.lnrpc.ChannelEdgeUpdate.prototype.setRoutingPolicy = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { + return this.setRoutingPolicy(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.hasRoutingPolicy = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string advertising_node = 5; + * @return {string} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.getAdvertisingNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setAdvertisingNode = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string connecting_node = 6; + * @return {string} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.getConnectingNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ClosedChannelUpdate.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) + }; + + 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.ClosedChannelUpdate} + */ +proto.lnrpc.ClosedChannelUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ClosedChannelUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ClosedChannelUpdate} + */ +proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ClosedChannelUpdate.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.ClosedChannelUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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 uint64 chan_id = 1; + * @return {string} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ClosedChannelUpdate} returns this + */ +proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { + return 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 + * @return {!proto.lnrpc.ClosedChannelUpdate} returns this + */ +proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { + return 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 + * @return {!proto.lnrpc.ClosedChannelUpdate} returns this + */ +proto.lnrpc.ClosedChannelUpdate.prototype.setClosedHeight = function(value) { + return 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 + * @return {!proto.lnrpc.ClosedChannelUpdate} returns this +*/ +proto.lnrpc.ClosedChannelUpdate.prototype.setChanPoint = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ClosedChannelUpdate} returns this + */ +proto.lnrpc.ClosedChannelUpdate.prototype.clearChanPoint = function() { + return this.setChanPoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.HopHint.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + chanId: jspb.Message.getFieldWithDefault(msg, 2, "0"), + feeBaseMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 4, 0), + cltvExpiryDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.HopHint} + */ +proto.lnrpc.HopHint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.HopHint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.HopHint} + */ +proto.lnrpc.HopHint.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.setNodeId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeBaseMAtoms(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeProportionalMillionths(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvExpiryDelta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.HopHint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.HopHint.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.HopHint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getFeeBaseMAtoms(); + 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 + ); + } +}; + + +/** + * optional string node_id = 1; + * @return {string} + */ +proto.lnrpc.HopHint.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.HopHint} returns this + */ +proto.lnrpc.HopHint.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 chan_id = 2; + * @return {string} + */ +proto.lnrpc.HopHint.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.HopHint} returns this + */ +proto.lnrpc.HopHint.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional uint32 fee_base_m_atoms = 3; + * @return {number} + */ +proto.lnrpc.HopHint.prototype.getFeeBaseMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.HopHint} returns this + */ +proto.lnrpc.HopHint.prototype.setFeeBaseMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 fee_proportional_millionths = 4; + * @return {number} + */ +proto.lnrpc.HopHint.prototype.getFeeProportionalMillionths = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.HopHint} returns this + */ +proto.lnrpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 cltv_expiry_delta = 5; + * @return {number} + */ +proto.lnrpc.HopHint.prototype.getCltvExpiryDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.HopHint} returns this + */ +proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.SetID.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SetID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.SetID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SetID.toObject = function(includeInstance, msg) { + var f, obj = { + setId: msg.getSetId_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.SetID} + */ +proto.lnrpc.SetID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.SetID; + return proto.lnrpc.SetID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.SetID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SetID} + */ +proto.lnrpc.SetID.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.setSetId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SetID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SetID.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.SetID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SetID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSetId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes set_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SetID.prototype.getSetId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes set_id = 1; + * This is a type-conversion wrapper around `getSetId()` + * @return {string} + */ +proto.lnrpc.SetID.prototype.getSetId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSetId())); +}; + + +/** + * optional bytes set_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSetId()` + * @return {!Uint8Array} + */ +proto.lnrpc.SetID.prototype.getSetId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSetId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.SetID} returns this + */ +proto.lnrpc.SetID.prototype.setSetId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.RouteHint.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.RouteHint.toObject = function(includeInstance, msg) { + var f, obj = { + hopHintsList: jspb.Message.toObjectList(msg.getHopHintsList(), + proto.lnrpc.HopHint.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.RouteHint} + */ +proto.lnrpc.RouteHint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RouteHint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.RouteHint} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.RouteHint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.RouteHint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.RouteHint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.RouteHint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHopHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.HopHint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated HopHint hop_hints = 1; + * @return {!Array} + */ +proto.lnrpc.RouteHint.prototype.getHopHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HopHint, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.RouteHint} returns this +*/ +proto.lnrpc.RouteHint.prototype.setHopHintsList = function(value) { + return 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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.RouteHint} returns this + */ +proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { + return this.setHopHintsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.AMPInvoiceState.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AMPInvoiceState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.AMPInvoiceState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.AMPInvoiceState.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + settleTime: jspb.Message.getFieldWithDefault(msg, 3, 0), + amtPaidMAtoms: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.AMPInvoiceState} + */ +proto.lnrpc.AMPInvoiceState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.AMPInvoiceState; + return proto.lnrpc.AMPInvoiceState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.AMPInvoiceState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.AMPInvoiceState} + */ +proto.lnrpc.AMPInvoiceState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.lnrpc.InvoiceHTLCState} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSettleIndex(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSettleTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaidMAtoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.AMPInvoiceState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.AMPInvoiceState.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.AMPInvoiceState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.AMPInvoiceState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSettleIndex(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getSettleTime(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getAmtPaidMAtoms(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional InvoiceHTLCState state = 1; + * @return {!proto.lnrpc.InvoiceHTLCState} + */ +proto.lnrpc.AMPInvoiceState.prototype.getState = function() { + return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.lnrpc.InvoiceHTLCState} value + * @return {!proto.lnrpc.AMPInvoiceState} returns this + */ +proto.lnrpc.AMPInvoiceState.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint64 settle_index = 2; + * @return {number} + */ +proto.lnrpc.AMPInvoiceState.prototype.getSettleIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.AMPInvoiceState} returns this + */ +proto.lnrpc.AMPInvoiceState.prototype.setSettleIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 settle_time = 3; + * @return {number} + */ +proto.lnrpc.AMPInvoiceState.prototype.getSettleTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.AMPInvoiceState} returns this + */ +proto.lnrpc.AMPInvoiceState.prototype.setSettleTime = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 amt_paid_m_atoms = 5; + * @return {number} + */ +proto.lnrpc.AMPInvoiceState.prototype.getAmtPaidMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.AMPInvoiceState} returns this + */ +proto.lnrpc.AMPInvoiceState.prototype.setAmtPaidMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Invoice.repeatedFields_ = [14,22]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Invoice.toObject = function(includeInstance, msg) { + var f, obj = { + memo: jspb.Message.getFieldWithDefault(msg, 1, ""), + rPreimage: msg.getRPreimage_asB64(), + rHash: msg.getRHash_asB64(), + value: jspb.Message.getFieldWithDefault(msg, 5, 0), + valueMAtoms: jspb.Message.getFieldWithDefault(msg, 23, 0), + settled: jspb.Message.getBooleanFieldWithDefault(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.getBooleanFieldWithDefault(msg, 15, false), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), + settleIndex: jspb.Message.getFieldWithDefault(msg, 17, 0), + amtPaid: jspb.Message.getFieldWithDefault(msg, 18, 0), + amtPaidAtoms: jspb.Message.getFieldWithDefault(msg, 19, 0), + amtPaidMAtoms: jspb.Message.getFieldWithDefault(msg, 20, 0), + state: jspb.Message.getFieldWithDefault(msg, 21, 0), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + proto.lnrpc.InvoiceHTLC.toObject, includeInstance), + ignoreMaxInboundAmt: jspb.Message.getBooleanFieldWithDefault(msg, 1001, false), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], + isKeysend: jspb.Message.getBooleanFieldWithDefault(msg, 25, false), + paymentAddr: msg.getPaymentAddr_asB64(), + isAmp: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), + ampInvoiceStateMap: (f = msg.getAmpInvoiceStateMap()) ? f.toObject(includeInstance, proto.lnrpc.AMPInvoiceState.toObject) : [] + }; + + 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.Invoice} + */ +proto.lnrpc.Invoice.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Invoice} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.Invoice} + */ +proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRPreimage(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRHash(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + case 23: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValueMAtoms(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSettled(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationDate(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSettleDate(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDescriptionHash(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiry(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setFallbackAddr(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCltvExpiry(value); + break; + case 14: + var value = new proto.lnrpc.RouteHint; + reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSettleIndex(value); + break; + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaid(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaidAtoms(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaidMAtoms(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 1001: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreMaxInboundAmt(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, new proto.lnrpc.Feature()); + }); + break; + case 25: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsKeysend(value); + break; + case 26: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); + break; + case 27: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsAmp(value); + break; + case 28: + var value = msg.getAmpInvoiceStateMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.AMPInvoiceState.deserializeBinaryFromReader, "", new proto.lnrpc.AMPInvoiceState()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.Invoice.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.Invoice.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.Invoice} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getValueMAtoms(); + if (f !== 0) { + writer.writeInt64( + 23, + f + ); + } + f = message.getSettled(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getCreationDate(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getSettleDate(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getDescriptionHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getExpiry(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getCltvExpiry(); + if (f !== 0) { + writer.writeUint64( + 13, + f + ); + } + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 14, + f, + proto.lnrpc.RouteHint.serializeBinaryToWriter + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 15, + f + ); + } + f = message.getAddIndex(); + if (f !== 0) { + writer.writeUint64( + 16, + f + ); + } + f = message.getSettleIndex(); + if (f !== 0) { + writer.writeUint64( + 17, + f + ); + } + f = message.getAmtPaid(); + if (f !== 0) { + writer.writeInt64( + 18, + f + ); + } + f = message.getAmtPaidAtoms(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getAmtPaidMAtoms(); + 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.getIgnoreMaxInboundAmt(); + if (f) { + writer.writeBool( + 1001, + f + ); + } + 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 + ); + } + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 26, + f + ); + } + f = message.getIsAmp(); + if (f) { + writer.writeBool( + 27, + f + ); + } + f = message.getAmpInvoiceStateMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(28, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.AMPInvoiceState.serializeBinaryToWriter); + } }; /** - * Returns whether this field is set. - * @return {boolean} + * @enum {number} */ -proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { - return jspb.Message.getField(this, 8) != null; +proto.lnrpc.Invoice.InvoiceState = { + OPEN: 0, + SETTLED: 1, + CANCELED: 2, + ACCEPTED: 3 }; - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string memo = 1; + * @return {string} */ -proto.lnrpc.ChannelGraphRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelGraphRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelGraphRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraphRequest.toObject = function(includeInstance, msg) { - var f, obj = { - includeUnannounced: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraphRequest} + * optional bytes r_preimage = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelGraphRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraphRequest; - return proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getRPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelGraphRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelGraphRequest} + * optional bytes r_preimage = 3; + * This is a type-conversion wrapper around `getRPreimage()` + * @return {string} */ -proto.lnrpc.ChannelGraphRequest.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.setIncludeUnannounced(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.getRPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRPreimage())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * 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.ChannelGraphRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getRPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRPreimage())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraphRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIncludeUnannounced(); - if (f) { - writer.writeBool( - 1, - f - ); - } +proto.lnrpc.Invoice.prototype.setRPreimage = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; /** - * optional bool include_unannounced = 1; - * @return {boolean} + * optional bytes r_hash = 4; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelGraphRequest.prototype.getIncludeUnannounced = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.Invoice.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ChannelGraphRequest} returns this + * optional bytes r_hash = 4; + * This is a type-conversion wrapper around `getRHash()` + * @return {string} */ -proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.Invoice.prototype.getRHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRHash())); }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * 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.ChannelGraph.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelGraph.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRHash())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraph.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) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.setRHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraph} + * optional int64 value = 5; + * @return {number} */ -proto.lnrpc.ChannelGraph.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraph; - return proto.lnrpc.ChannelGraph.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelGraph} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelGraph} + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraph.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.addNodes(value); - break; - case 2: - var value = new proto.lnrpc.ChannelEdge; - reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); - msg.addEdges(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 value_m_atoms = 23; + * @return {number} */ -proto.lnrpc.ChannelGraph.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraph.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getValueMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraph} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraph.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.LightningNode.serializeBinaryToWriter - ); - } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.ChannelEdge.serializeBinaryToWriter - ); - } +proto.lnrpc.Invoice.prototype.setValueMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); }; /** - * repeated LightningNode nodes = 1; - * @return {!Array} + * optional bool settled = 6; + * @return {boolean} */ -proto.lnrpc.ChannelGraph.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.LightningNode, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelGraph} returns this -*/ -proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.lnrpc.Invoice.prototype.getSettled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * @param {!proto.lnrpc.LightningNode=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.LightningNode} + * @param {boolean} value + * @return {!proto.lnrpc.Invoice} returns this */ -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.Invoice.prototype.setSettled = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelGraph} returns this + * optional int64 creation_date = 7; + * @return {number} */ -proto.lnrpc.ChannelGraph.prototype.clearNodesList = function() { - return this.setNodesList([]); +proto.lnrpc.Invoice.prototype.getCreationDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * repeated ChannelEdge edges = 2; - * @return {!Array} + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraph.prototype.getEdgesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelGraph} returns this -*/ -proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} + * optional int64 settle_date = 8; + * @return {number} */ -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.Invoice.prototype.getSettleDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelGraph} returns this + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { - return this.setEdgesList([]); +proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeMetricsRequest.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string payment_request = 9; + * @return {string} */ -proto.lnrpc.NodeMetricsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeMetricsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeMetricsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NodeMetricsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - typesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.setPaymentRequest = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeMetricsRequest} + * optional bytes description_hash = 10; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.NodeMetricsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeMetricsRequest; - return proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeMetricsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeMetricsRequest} + * optional bytes description_hash = 10; + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {string} */ -proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addTypes(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.getDescriptionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDescriptionHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes description_hash = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDescriptionHash()` * @return {!Uint8Array} */ -proto.lnrpc.NodeMetricsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeMetricsRequest.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.NodeMetricsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeMetricsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTypesList(); - if (f.length > 0) { - writer.writePackedEnum( - 1, - f - ); - } +proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDescriptionHash())); }; /** - * repeated NodeMetricType types = 1; - * @return {!Array} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NodeMetricsRequest.prototype.getTypesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.NodeMetricsRequest} returns this + * optional int64 expiry = 11; + * @return {number} */ -proto.lnrpc.NodeMetricsRequest.prototype.setTypesList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.lnrpc.Invoice.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** - * @param {!proto.lnrpc.NodeMetricType} value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeMetricsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NodeMetricsRequest.prototype.addTypes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.lnrpc.Invoice.prototype.setExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeMetricsRequest} returns this + * optional string fallback_addr = 12; + * @return {string} */ -proto.lnrpc.NodeMetricsRequest.prototype.clearTypesList = function() { - return this.setTypesList([]); -}; - - - +proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {string} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NodeMetricsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeMetricsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeMetricsResponse} 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.NodeMetricsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - betweennessCentralityMap: (f = msg.getBetweennessCentralityMap()) ? f.toObject(includeInstance, proto.lnrpc.FloatMetric.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeMetricsResponse} + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NodeMetricsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeMetricsResponse; - return proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeMetricsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeMetricsResponse} + * repeated RouteHint route_hints = 14; + * @return {!Array} */ -proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - 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, "", new proto.lnrpc.FloatMetric()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeMetricsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeMetricsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); + * @param {!Array} value + * @return {!proto.lnrpc.Invoice} returns this +*/ +proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 14, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeMetricsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.NodeMetricsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - 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); - } +proto.lnrpc.Invoice.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.RouteHint, opt_index); }; /** - * map betweenness_centrality = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NodeMetricsResponse.prototype.getBetweennessCentralityMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.lnrpc.FloatMetric)); +proto.lnrpc.Invoice.prototype.clearRouteHintsList = function() { + return this.setRouteHintsList([]); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.NodeMetricsResponse} returns this + * optional bool private = 15; + * @return {boolean} */ -proto.lnrpc.NodeMetricsResponse.prototype.clearBetweennessCentralityMap = function() { - this.getBetweennessCentralityMap().clear(); - return this;}; - +proto.lnrpc.Invoice.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; +/** + * @param {boolean} value + * @return {!proto.lnrpc.Invoice} returns this + */ +proto.lnrpc.Invoice.prototype.setPrivate = function(value) { + return jspb.Message.setProto3BooleanField(this, 15, value); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint64 add_index = 16; + * @return {number} */ -proto.lnrpc.FloatMetric.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FloatMetric.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.FloatMetric} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.FloatMetric.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), - normalizedValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FloatMetric} + * optional uint64 settle_index = 17; + * @return {number} */ -proto.lnrpc.FloatMetric.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FloatMetric; - return proto.lnrpc.FloatMetric.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getSettleIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.FloatMetric} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FloatMetric} + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.FloatMetric.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.setValue(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setNormalizedValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { + return jspb.Message.setProto3IntField(this, 17, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 amt_paid = 18; + * @return {number} */ -proto.lnrpc.FloatMetric.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FloatMetric.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getAmtPaid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FloatMetric} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.FloatMetric.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f !== 0.0) { - writer.writeDouble( - 1, - f - ); - } - f = message.getNormalizedValue(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } +proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { + return jspb.Message.setProto3IntField(this, 18, value); }; /** - * optional double value = 1; + * optional int64 amt_paid_atoms = 19; * @return {number} */ -proto.lnrpc.FloatMetric.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +proto.lnrpc.Invoice.prototype.getAmtPaidAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.FloatMetric} returns this + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.FloatMetric.prototype.setValue = function(value) { - return jspb.Message.setProto3FloatField(this, 1, value); +proto.lnrpc.Invoice.prototype.setAmtPaidAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 19, value); }; /** - * optional double normalized_value = 2; + * optional int64 amt_paid_m_atoms = 20; * @return {number} */ -proto.lnrpc.FloatMetric.prototype.getNormalizedValue = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +proto.lnrpc.Invoice.prototype.getAmtPaidMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.FloatMetric} returns this + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.FloatMetric.prototype.setNormalizedValue = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); +proto.lnrpc.Invoice.prototype.setAmtPaidMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); }; +/** + * optional InvoiceState state = 21; + * @return {!proto.lnrpc.Invoice.InvoiceState} + */ +proto.lnrpc.Invoice.prototype.getState = function() { + return /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {!proto.lnrpc.Invoice.InvoiceState} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 21, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * repeated InvoiceHTLC htlcs = 22; + * @return {!Array} */ -proto.lnrpc.ChanInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.InvoiceHTLC, 22)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanInfoRequest} - */ -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); + * @param {!Array} value + * @return {!proto.lnrpc.Invoice} returns this +*/ +proto.lnrpc.Invoice.prototype.setHtlcsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 22, value); }; /** - * 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} + * @param {!proto.lnrpc.InvoiceHTLC=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.InvoiceHTLC} */ -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 {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 22, opt_value, proto.lnrpc.InvoiceHTLC, opt_index); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.clearHtlcsList = function() { + return this.setHtlcsList([]); }; /** - * 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 + * optional bool ignore_max_inbound_amt = 1001; + * @return {boolean} */ -proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } +proto.lnrpc.Invoice.prototype.getIgnoreMaxInboundAmt = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1001, false)); }; /** - * optional uint64 chan_id = 1; - * @return {string} + * @param {boolean} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.lnrpc.Invoice.prototype.setIgnoreMaxInboundAmt = function(value) { + return jspb.Message.setProto3BooleanField(this, 1001, value); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChanInfoRequest} returns this + * map features = 24; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.lnrpc.Invoice.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 24, opt_noLazyCreate, + proto.lnrpc.Feature)); }; +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.Invoice} returns this + */ +proto.lnrpc.Invoice.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); + return this;}; + +/** + * optional bool is_keysend = 25; + * @return {boolean} + */ +proto.lnrpc.Invoice.prototype.getIsKeysend = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {boolean} value + * @return {!proto.lnrpc.Invoice} returns this */ -proto.lnrpc.NetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NetworkInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.setIsKeysend = function(value) { + return jspb.Message.setProto3BooleanField(this, 25, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * optional bytes payment_addr = 26; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.NetworkInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.Invoice.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 26, "")); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * optional bytes payment_addr = 26; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} + */ +proto.lnrpc.Invoice.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NetworkInfoRequest} + * optional bytes payment_addr = 26; + * 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.NetworkInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NetworkInfoRequest; - return proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); }; /** - * 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} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.Invoice} returns this */ -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; +proto.lnrpc.Invoice.prototype.setPaymentAddr = function(value) { + return jspb.Message.setProto3BytesField(this, 26, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool is_amp = 27; + * @return {boolean} */ -proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getIsAmp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.Invoice} returns this + */ +proto.lnrpc.Invoice.prototype.setIsAmp = function(value) { + return jspb.Message.setProto3BooleanField(this, 27, 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 + * map amp_invoice_state = 28; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getAmpInvoiceStateMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 28, opt_noLazyCreate, + proto.lnrpc.AMPInvoiceState)); }; +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.Invoice} returns this + */ +proto.lnrpc.Invoice.prototype.clearAmpInvoiceStateMap = function() { + this.getAmpInvoiceStateMap().clear(); + return this;}; + + @@ -29409,8 +37941,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.InvoiceHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InvoiceHTLC.toObject(opt_includeInstance, this); }; @@ -29419,23 +37951,23 @@ proto.lnrpc.NetworkInfo.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.InvoiceHTLC} 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.InvoiceHTLC.toObject = function(includeInstance, msg) { var f, obj = { - graphDiameter: jspb.Message.getFieldWithDefault(msg, 1, 0), - avgOutDegree: jspb.Message.getFloatingPointFieldWithDefault(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.getFloatingPointFieldWithDefault(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) + chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), + htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + amtMAtoms: 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) : [], + mppTotalAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 10, 0), + amp: (f = msg.getAmp()) && proto.lnrpc.AMP.toObject(includeInstance, f) }; if (includeInstance) { @@ -29449,23 +37981,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.InvoiceHTLC} */ -proto.lnrpc.NetworkInfo.deserializeBinary = function(bytes) { +proto.lnrpc.InvoiceHTLC.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.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.NetworkInfo} 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.NetworkInfo} + * @return {!proto.lnrpc.InvoiceHTLC} */ -proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -29473,48 +38005,51 @@ proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setGraphDiameter(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); break; case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgOutDegree(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcIndex(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxOutDegree(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtMAtoms(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumNodes(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setAcceptHeight(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumChannels(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAcceptTime(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalNetworkCapacity(value); + msg.setResolveTime(value); break; case 7: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgChannelSize(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setExpiryHeight(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinChannelSize(value); + var value = /** @type {!proto.lnrpc.InvoiceHTLCState} */ (reader.readEnum()); + msg.setState(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxChannelSize(value); + 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.readInt64()); - msg.setMedianChannelSizeSat(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setMppTotalAmtMAtoms(value); break; case 11: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNumZombieChans(value); + var value = new proto.lnrpc.AMP; + reader.readMessage(value,proto.lnrpc.AMP.deserializeBinaryFromReader); + msg.setAmp(value); break; default: reader.skipField(); @@ -29529,9 +38064,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.InvoiceHTLC.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfo.serializeBinaryToWriter(this, writer); + proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29539,287 +38074,308 @@ 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.InvoiceHTLC} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getGraphDiameter(); - if (f !== 0) { - writer.writeUint32( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } - f = message.getAvgOutDegree(); - if (f !== 0.0) { - writer.writeDouble( + f = message.getHtlcIndex(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getMaxOutDegree(); + f = message.getAmtMAtoms(); if (f !== 0) { - writer.writeUint32( + writer.writeUint64( 3, f ); } - f = message.getNumNodes(); + f = message.getAcceptHeight(); if (f !== 0) { - writer.writeUint32( + writer.writeInt32( 4, f ); } - f = message.getNumChannels(); + f = message.getAcceptTime(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 5, f ); } - f = message.getTotalNetworkCapacity(); + f = message.getResolveTime(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getAvgChannelSize(); - if (f !== 0.0) { - writer.writeDouble( + f = message.getExpiryHeight(); + if (f !== 0) { + writer.writeInt32( 7, f ); } - f = message.getMinChannelSize(); - if (f !== 0) { - writer.writeInt64( + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( 8, f ); } - f = message.getMaxChannelSize(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); + f = message.getCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); } - f = message.getMedianChannelSizeSat(); + f = message.getMppTotalAmtMAtoms(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 10, f ); } - f = message.getNumZombieChans(); - if (f !== 0) { - writer.writeUint64( + f = message.getAmp(); + if (f != null) { + writer.writeMessage( 11, - f + f, + proto.lnrpc.AMP.serializeBinaryToWriter ); } }; /** - * optional uint32 graph_diameter = 1; - * @return {number} + * optional uint64 chan_id = 1; + * @return {string} */ -proto.lnrpc.NetworkInfo.prototype.getGraphDiameter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.InvoiceHTLC.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @param {string} value + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setGraphDiameter = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.InvoiceHTLC.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional double avg_out_degree = 2; + * optional uint64 htlc_index = 2; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getAvgOutDegree = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +proto.lnrpc.InvoiceHTLC.prototype.getHtlcIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); +proto.lnrpc.InvoiceHTLC.prototype.setHtlcIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 max_out_degree = 3; + * optional uint64 amt_m_atoms = 3; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { +proto.lnrpc.InvoiceHTLC.prototype.getAmtMAtoms = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { +proto.lnrpc.InvoiceHTLC.prototype.setAmtMAtoms = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional uint32 num_nodes = 4; + * optional int32 accept_height = 4; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { +proto.lnrpc.InvoiceHTLC.prototype.getAcceptHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { +proto.lnrpc.InvoiceHTLC.prototype.setAcceptHeight = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional uint32 num_channels = 5; + * optional int64 accept_time = 5; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getNumChannels = function() { +proto.lnrpc.InvoiceHTLC.prototype.getAcceptTime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { +proto.lnrpc.InvoiceHTLC.prototype.setAcceptTime = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 total_network_capacity = 6; + * optional int64 resolve_time = 6; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { +proto.lnrpc.InvoiceHTLC.prototype.getResolveTime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { +proto.lnrpc.InvoiceHTLC.prototype.setResolveTime = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional double avg_channel_size = 7; + * optional int32 expiry_height = 7; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); +proto.lnrpc.InvoiceHTLC.prototype.getExpiryHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { - return jspb.Message.setProto3FloatField(this, 7, value); +proto.lnrpc.InvoiceHTLC.prototype.setExpiryHeight = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional int64 min_channel_size = 8; - * @return {number} + * optional InvoiceHTLCState state = 8; + * @return {!proto.lnrpc.InvoiceHTLCState} */ -proto.lnrpc.NetworkInfo.prototype.getMinChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.InvoiceHTLC.prototype.getState = function() { + return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @param {!proto.lnrpc.InvoiceHTLCState} value + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.InvoiceHTLC.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 8, value); }; /** - * optional int64 max_channel_size = 9; - * @return {number} + * map custom_records = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.NetworkInfo.prototype.getMaxChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.InvoiceHTLC.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); }; /** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; +proto.lnrpc.InvoiceHTLC.prototype.clearCustomRecordsMap = function() { + this.getCustomRecordsMap().clear(); + return this;}; /** - * optional int64 median_channel_size_sat = 10; + * optional uint64 mpp_total_amt_m_atoms = 10; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getMedianChannelSizeSat = function() { +proto.lnrpc.InvoiceHTLC.prototype.getMppTotalAmtMAtoms = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setMedianChannelSizeSat = function(value) { +proto.lnrpc.InvoiceHTLC.prototype.setMppTotalAmtMAtoms = function(value) { return jspb.Message.setProto3IntField(this, 10, value); }; /** - * optional uint64 num_zombie_chans = 11; - * @return {number} + * optional AMP amp = 11; + * @return {?proto.lnrpc.AMP} */ -proto.lnrpc.NetworkInfo.prototype.getNumZombieChans = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.InvoiceHTLC.prototype.getAmp = function() { + return /** @type{?proto.lnrpc.AMP} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.AMP, 11)); }; /** - * @param {number} value - * @return {!proto.lnrpc.NetworkInfo} returns this + * @param {?proto.lnrpc.AMP|undefined} value + * @return {!proto.lnrpc.InvoiceHTLC} returns this +*/ +proto.lnrpc.InvoiceHTLC.prototype.setAmp = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.InvoiceHTLC} returns this */ -proto.lnrpc.NetworkInfo.prototype.setNumZombieChans = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.InvoiceHTLC.prototype.clearAmp = function() { + return this.setAmp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.InvoiceHTLC.prototype.hasAmp = function() { + return jspb.Message.getField(this, 11) != null; }; @@ -29839,8 +38395,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopRequest.toObject(opt_includeInstance, this); +proto.lnrpc.AMP.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AMP.toObject(opt_includeInstance, this); }; @@ -29849,13 +38405,17 @@ proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.AMP} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.AMP.toObject = function(includeInstance, msg) { var f, obj = { - + rootShare: msg.getRootShare_asB64(), + setId: msg.getSetId_asB64(), + childIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), + hash: msg.getHash_asB64(), + preimage: msg.getPreimage_asB64() }; if (includeInstance) { @@ -29869,58 +38429,299 @@ proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopRequest} + * @return {!proto.lnrpc.AMP} */ -proto.lnrpc.StopRequest.deserializeBinary = function(bytes) { +proto.lnrpc.AMP.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StopRequest; - return proto.lnrpc.StopRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.AMP; + return proto.lnrpc.AMP.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.AMP} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.StopRequest} + * @return {!proto.lnrpc.AMP} + */ +proto.lnrpc.AMP.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.setRootShare(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSetId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChildIndex(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 5: + 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.lnrpc.AMP.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.AMP.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.AMP} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.AMP.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRootShare_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSetId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChildIndex(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional bytes root_share = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AMP.prototype.getRootShare = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes root_share = 1; + * This is a type-conversion wrapper around `getRootShare()` + * @return {string} + */ +proto.lnrpc.AMP.prototype.getRootShare_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRootShare())); +}; + + +/** + * optional bytes root_share = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRootShare()` + * @return {!Uint8Array} + */ +proto.lnrpc.AMP.prototype.getRootShare_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRootShare())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AMP} returns this + */ +proto.lnrpc.AMP.prototype.setRootShare = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes set_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AMP.prototype.getSetId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes set_id = 2; + * This is a type-conversion wrapper around `getSetId()` + * @return {string} + */ +proto.lnrpc.AMP.prototype.getSetId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSetId())); +}; + + +/** + * optional bytes set_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSetId()` + * @return {!Uint8Array} + */ +proto.lnrpc.AMP.prototype.getSetId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSetId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AMP} returns this + */ +proto.lnrpc.AMP.prototype.setSetId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 child_index = 3; + * @return {number} + */ +proto.lnrpc.AMP.prototype.getChildIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.AMP} returns this + */ +proto.lnrpc.AMP.prototype.setChildIndex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AMP.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes hash = 4; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.lnrpc.AMP.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.lnrpc.AMP.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AMP} returns this + */ +proto.lnrpc.AMP.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes preimage = 5; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AMP.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes preimage = 5; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} */ -proto.lnrpc.StopRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.AMP.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes preimage = 5; + * 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.StopRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.AMP.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); }; /** - * 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 + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AMP} returns this */ -proto.lnrpc.StopRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.AMP.prototype.setPreimage = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; @@ -29940,8 +38741,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopResponse.toObject(opt_includeInstance, this); +proto.lnrpc.AddInvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AddInvoiceResponse.toObject(opt_includeInstance, this); }; @@ -29950,13 +38751,16 @@ proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.AddInvoiceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.StopResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.AddInvoiceResponse.toObject = function(includeInstance, msg) { var f, obj = { - + rHash: msg.getRHash_asB64(), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), + paymentAddr: msg.getPaymentAddr_asB64() }; if (includeInstance) { @@ -29970,29 +38774,45 @@ proto.lnrpc.StopResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopResponse} + * @return {!proto.lnrpc.AddInvoiceResponse} */ -proto.lnrpc.StopResponse.deserializeBinary = function(bytes) { +proto.lnrpc.AddInvoiceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StopResponse; - return proto.lnrpc.StopResponse.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.StopResponse} 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.StopResponse} + * @return {!proto.lnrpc.AddInvoiceResponse} */ -proto.lnrpc.StopResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.AddInvoiceResponse.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; + case 17: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); + break; default: reader.skipField(); break; @@ -30006,9 +38826,9 @@ proto.lnrpc.StopResponse.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.StopResponse.prototype.serializeBinary = function() { +proto.lnrpc.AddInvoiceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30016,123 +38836,163 @@ proto.lnrpc.StopResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.StopResponse} message + * @param {!proto.lnrpc.AddInvoiceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.StopResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.AddInvoiceResponse.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 + ); + } + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 17, + f + ); + } }; +/** + * optional bytes r_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.AddInvoiceResponse.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * optional bytes r_hash = 1; + * This is a type-conversion wrapper around `getRHash()` + * @return {string} + */ +proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRHash())); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional bytes r_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRHash()` + * @return {!Uint8Array} */ -proto.lnrpc.GraphTopologySubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GraphTopologySubscription.toObject(opt_includeInstance, this); +proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRHash())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AddInvoiceResponse} returns this */ -proto.lnrpc.GraphTopologySubscription.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * optional string payment_request = 2; + * @return {string} + */ +proto.lnrpc.AddInvoiceResponse.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologySubscription} + * @param {string} value + * @return {!proto.lnrpc.AddInvoiceResponse} returns this */ -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.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GraphTopologySubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GraphTopologySubscription} + * optional uint64 add_index = 16; + * @return {number} */ -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.AddInvoiceResponse.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.AddInvoiceResponse} returns this */ -proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GraphTopologySubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes payment_addr = 17; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.AddInvoiceResponse.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); }; +/** + * optional bytes payment_addr = 17; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} + */ +proto.lnrpc.AddInvoiceResponse.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional bytes payment_addr = 17; + * 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.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; +proto.lnrpc.AddInvoiceResponse.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.AddInvoiceResponse} returns this + */ +proto.lnrpc.AddInvoiceResponse.prototype.setPaymentAddr = function(value) { + return jspb.Message.setProto3BytesField(this, 17, value); +}; + + @@ -30149,8 +39009,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PaymentHash.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PaymentHash.toObject(opt_includeInstance, this); }; @@ -30159,18 +39019,14 @@ proto.lnrpc.GraphTopologyUpdate.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.PaymentHash} 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.PaymentHash.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) + rHashStr: jspb.Message.getFieldWithDefault(msg, 1, ""), + rHash: msg.getRHash_asB64() }; if (includeInstance) { @@ -30184,23 +39040,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.PaymentHash} */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PaymentHash.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.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.GraphTopologyUpdate} 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.GraphTopologyUpdate} + * @return {!proto.lnrpc.PaymentHash} */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30208,19 +39064,12 @@ 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.readString()); + msg.setRHashStr(value); break; case 2: - var value = new proto.lnrpc.ChannelEdgeUpdate; - reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); - msg.addChannelUpdates(value); - break; - case 3: - var value = new proto.lnrpc.ClosedChannelUpdate; - reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); - msg.addClosedChans(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRHash(value); break; default: reader.skipField(); @@ -30235,9 +39084,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.PaymentHash.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PaymentHash.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30245,161 +39094,90 @@ 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.PaymentHash} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PaymentHash.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeUpdatesList(); + f = message.getRHashStr(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.NodeUpdate.serializeBinaryToWriter + f ); } - f = message.getChannelUpdatesList(); + f = message.getRHash_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 2, - f, - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter - ); - } - f = message.getClosedChansList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter + f ); } }; /** - * repeated NodeUpdate node_updates = 1; - * @return {!Array} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this -*/ -proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.NodeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.prototype.addNodeUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.NodeUpdate, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this - */ -proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { - return this.setNodeUpdatesList([]); -}; - - -/** - * repeated ChannelEdgeUpdate channel_updates = 2; - * @return {!Array} + * optional string r_hash_str = 1; + * @return {string} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this -*/ -proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.lnrpc.PaymentHash.prototype.getRHashStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdgeUpdate} + * @param {string} value + * @return {!proto.lnrpc.PaymentHash} returns this */ -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.PaymentHash.prototype.setRHashStr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this + * optional bytes r_hash = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.GraphTopologyUpdate.prototype.clearChannelUpdatesList = function() { - return this.setChannelUpdatesList([]); +proto.lnrpc.PaymentHash.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * repeated ClosedChannelUpdate closed_chans = 3; - * @return {!Array} + * optional bytes r_hash = 2; + * This is a type-conversion wrapper around `getRHash()` + * @return {string} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this -*/ -proto.lnrpc.GraphTopologyUpdate.prototype.setClosedChansList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.lnrpc.PaymentHash.prototype.getRHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRHash())); }; /** - * @param {!proto.lnrpc.ClosedChannelUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ClosedChannelUpdate} + * 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.GraphTopologyUpdate.prototype.addClosedChans = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.ClosedChannelUpdate, opt_index); +proto.lnrpc.PaymentHash.prototype.getRHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRHash())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.GraphTopologyUpdate} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.PaymentHash} returns this */ -proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { - return this.setClosedChansList([]); +proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeUpdate.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -30415,8 +39193,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListInvoiceRequest.toObject(opt_includeInstance, this); }; @@ -30425,17 +39203,16 @@ proto.lnrpc.NodeUpdate.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ListInvoiceRequest} 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.ListInvoiceRequest.toObject = function(includeInstance, msg) { var f, obj = { - addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - identityKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - globalFeatures: msg.getGlobalFeatures_asB64(), - alias: jspb.Message.getFieldWithDefault(msg, 4, ""), - color: jspb.Message.getFieldWithDefault(msg, 5, "") + pendingOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + indexOffset: jspb.Message.getFieldWithDefault(msg, 4, 0), + numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, 0), + reversed: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -30449,23 +39226,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.ListInvoiceRequest} */ -proto.lnrpc.NodeUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ListInvoiceRequest.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.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.NodeUpdate} 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.NodeUpdate} + * @return {!proto.lnrpc.ListInvoiceRequest} */ -proto.lnrpc.NodeUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30473,24 +39250,20 @@ 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); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPendingOnly(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndexOffset(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumMaxInvoices(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReversed(value); break; default: reader.skipField(); @@ -30505,9 +39278,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.ListInvoiceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30515,44 +39288,37 @@ 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.ListInvoiceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( + f = message.getPendingOnly(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getIdentityKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getGlobalFeatures_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, + f = message.getIndexOffset(); + if (f !== 0) { + writer.writeUint64( + 4, f ); } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 4, + f = message.getNumMaxInvoices(); + if (f !== 0) { + writer.writeUint64( + 5, f ); } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 5, + f = message.getReversed(); + if (f) { + writer.writeBool( + 6, f ); } @@ -30560,138 +39326,84 @@ 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 - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.NodeUpdate} returns this - */ -proto.lnrpc.NodeUpdate.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - -/** - * optional string identity_key = 2; - * @return {string} + * optional bool pending_only = 1; + * @return {boolean} */ -proto.lnrpc.NodeUpdate.prototype.getIdentityKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ListInvoiceRequest.prototype.getPendingOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {string} value - * @return {!proto.lnrpc.NodeUpdate} returns this + * @param {boolean} value + * @return {!proto.lnrpc.ListInvoiceRequest} returns this */ -proto.lnrpc.NodeUpdate.prototype.setIdentityKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional bytes global_features = 3; - * @return {!(string|Uint8Array)} + * optional uint64 index_offset = 4; + * @return {number} */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.ListInvoiceRequest.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * optional bytes global_features = 3; - * This is a type-conversion wrapper around `getGlobalFeatures()` - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.ListInvoiceRequest} returns this */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGlobalFeatures())); +proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * 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} + * optional uint64 num_max_invoices = 5; + * @return {number} */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGlobalFeatures())); +proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.NodeUpdate} returns this + * @param {number} value + * @return {!proto.lnrpc.ListInvoiceRequest} returns this */ -proto.lnrpc.NodeUpdate.prototype.setGlobalFeatures = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional string alias = 4; - * @return {string} + * optional bool reversed = 6; + * @return {boolean} */ -proto.lnrpc.NodeUpdate.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.ListInvoiceRequest.prototype.getReversed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * @param {string} value - * @return {!proto.lnrpc.NodeUpdate} returns this + * @param {boolean} value + * @return {!proto.lnrpc.ListInvoiceRequest} returns this */ -proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.lnrpc.ListInvoiceRequest.prototype.setReversed = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; -/** - * optional string color = 5; - * @return {string} - */ -proto.lnrpc.NodeUpdate.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - /** - * @param {string} value - * @return {!proto.lnrpc.NodeUpdate} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.NodeUpdate.prototype.setColor = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - +proto.lnrpc.ListInvoiceResponse.repeatedFields_ = [1]; @@ -30708,8 +39420,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ListInvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListInvoiceResponse.toObject(opt_includeInstance, this); }; @@ -30718,18 +39430,16 @@ proto.lnrpc.ChannelEdgeUpdate.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. 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.ListInvoiceResponse} 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.ListInvoiceResponse.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, "") + 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) { @@ -30743,23 +39453,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.ListInvoiceResponse} */ -proto.lnrpc.ChannelEdgeUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ListInvoiceResponse.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.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.ChannelEdgeUpdate} 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.ChannelEdgeUpdate} + * @return {!proto.lnrpc.ListInvoiceResponse} */ -proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30767,30 +39477,17 @@ proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = new proto.lnrpc.Invoice; + reader.readMessage(value,proto.lnrpc.Invoice.deserializeBinaryFromReader); + msg.addInvoices(value); break; case 2: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setLastIndexOffset(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); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectingNode(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFirstIndexOffset(value); break; default: reader.skipField(); @@ -30805,9 +39502,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.ListInvoiceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30815,53 +39512,31 @@ 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.ListInvoiceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getInvoicesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 2, f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + proto.lnrpc.Invoice.serializeBinaryToWriter ); } - f = message.getCapacity(); + f = message.getLastIndexOffset(); if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRoutingPolicy(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } - f = message.getAdvertisingNode(); - if (f.length > 0) { - writer.writeString( - 5, + writer.writeUint64( + 2, f ); } - f = message.getConnectingNode(); - if (f.length > 0) { - writer.writeString( - 6, + f = message.getFirstIndexOffset(); + if (f !== 0) { + writer.writeUint64( + 3, f ); } @@ -30869,148 +39544,76 @@ proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer /** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} + * repeated Invoice invoices = 1; + * @return {!Array} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); +proto.lnrpc.ListInvoiceResponse.prototype.getInvoicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Invoice, 1)); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + * @param {!Array} value + * @return {!proto.lnrpc.ListInvoiceResponse} returns this */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.lnrpc.ListInvoiceResponse.prototype.setInvoicesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + * @param {!proto.lnrpc.Invoice=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Invoice} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); +proto.lnrpc.ListInvoiceResponse.prototype.addInvoices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Invoice, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ListInvoiceResponse} returns this */ -proto.lnrpc.ChannelEdgeUpdate.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.ListInvoiceResponse.prototype.clearInvoicesList = function() { + return this.setInvoicesList([]); }; /** - * optional int64 capacity = 3; + * optional uint64 last_index_offset = 2; * @return {number} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional RoutingPolicy routing_policy = 4; - * @return {?proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getRoutingPolicy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 4)); -}; - - -/** - * @param {?proto.lnrpc.RoutingPolicy|undefined} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this -*/ -proto.lnrpc.ChannelEdgeUpdate.prototype.setRoutingPolicy = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { - return this.setRoutingPolicy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.hasRoutingPolicy = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string advertising_node = 5; - * @return {string} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getAdvertisingNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + * @return {!proto.lnrpc.ListInvoiceResponse} returns this */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setAdvertisingNode = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string connecting_node = 6; - * @return {string} + * optional uint64 first_index_offset = 3; + * @return {number} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getConnectingNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.lnrpc.ListInvoiceResponse.prototype.getFirstIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelEdgeUpdate} returns this + * @param {number} value + * @return {!proto.lnrpc.ListInvoiceResponse} returns this */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); +proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; @@ -31030,8 +39633,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.InvoiceSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InvoiceSubscription.toObject(opt_includeInstance, this); }; @@ -31040,16 +39643,14 @@ proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.InvoiceSubscription} 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.InvoiceSubscription.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) + addIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -31063,23 +39664,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.InvoiceSubscription} */ -proto.lnrpc.ClosedChannelUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.InvoiceSubscription.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.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.ClosedChannelUpdate} 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.ClosedChannelUpdate} + * @return {!proto.lnrpc.InvoiceSubscription} */ -proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31087,21 +39688,12 @@ proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setSettleIndex(value); break; default: reader.skipField(); @@ -31113,148 +39705,85 @@ 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() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelUpdate.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.ClosedChannelUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - 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 uint64 chan_id = 1; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {string} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this + * 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.ClosedChannelUpdate.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +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 int64 capacity = 2; + * optional uint64 add_index = 1; * @return {number} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this + * @return {!proto.lnrpc.InvoiceSubscription} returns this */ -proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 closed_height = 3; + * optional uint64 settle_index = 2; * @return {number} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getClosedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.InvoiceSubscription.prototype.getSettleIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this - */ -proto.lnrpc.ClosedChannelUpdate.prototype.setClosedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional ChannelPoint chan_point = 4; - * @return {?proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.InvoiceSubscription} returns this */ -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 - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this -*/ -proto.lnrpc.ClosedChannelUpdate.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ClosedChannelUpdate} returns this - */ -proto.lnrpc.ClosedChannelUpdate.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - /** - * Returns whether this field is set. - * @return {boolean} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 4) != null; -}; - - +proto.lnrpc.Payment.repeatedFields_ = [14]; @@ -31271,8 +39800,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.Payment.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Payment.toObject(opt_includeInstance, this); }; @@ -31281,17 +39810,28 @@ proto.lnrpc.HopHint.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.Payment} 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.Payment.toObject = function(includeInstance, msg) { var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 2, "0"), - feeBaseMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 4, 0), - cltvExpiryDelta: jspb.Message.getFieldWithDefault(msg, 5, 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, ""), + valueAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), + valueMAtoms: jspb.Message.getFieldWithDefault(msg, 8, 0), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), + status: jspb.Message.getFieldWithDefault(msg, 10, 0), + feeAtoms: jspb.Message.getFieldWithDefault(msg, 11, 0), + feeMAtoms: jspb.Message.getFieldWithDefault(msg, 12, 0), + creationTimeNs: jspb.Message.getFieldWithDefault(msg, 13, 0), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + proto.lnrpc.HTLCAttempt.toObject, includeInstance), + paymentIndex: jspb.Message.getFieldWithDefault(msg, 15, 0), + failureReason: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -31305,23 +39845,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.Payment} */ -proto.lnrpc.HopHint.deserializeBinary = function(bytes) { +proto.lnrpc.Payment.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.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.HopHint} 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.HopHint} + * @return {!proto.lnrpc.Payment} */ -proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31330,23 +39870,64 @@ proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); + msg.setPaymentHash(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeBaseMAtoms(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeProportionalMillionths(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationDate(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvExpiryDelta(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentPreimage(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValueAtoms(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValueMAtoms(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); + break; + case 10: + var value = /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeAtoms(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeMAtoms(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationTimeNs(value); + break; + case 14: + var value = new proto.lnrpc.HTLCAttempt; + reader.readMessage(value,proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader); + msg.addHtlcs(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPaymentIndex(value); + break; + case 16: + var value = /** @type {!proto.lnrpc.PaymentFailureReason} */ (reader.readEnum()); + msg.setFailureReason(value); break; default: reader.skipField(); @@ -31361,9 +39942,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.Payment.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.HopHint.serializeBinaryToWriter(this, writer); + proto.lnrpc.Payment.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31371,44 +39952,115 @@ 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.Payment} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeId(); + f = message.getPaymentHash(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( 2, f ); } - f = message.getFeeBaseMAtoms(); + f = message.getCreationDate(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 3, f ); } - f = message.getFeeProportionalMillionths(); + f = message.getFee(); if (f !== 0) { - writer.writeUint32( - 4, + writer.writeInt64( + 5, f ); } - f = message.getCltvExpiryDelta(); + f = message.getPaymentPreimage(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getValueAtoms(); if (f !== 0) { - writer.writeUint32( - 5, + writer.writeInt64( + 7, + f + ); + } + f = message.getValueMAtoms(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } + f = message.getFeeAtoms(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getFeeMAtoms(); + if (f !== 0) { + writer.writeInt64( + 12, + f + ); + } + f = message.getCreationTimeNs(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 14, + f, + proto.lnrpc.HTLCAttempt.serializeBinaryToWriter + ); + } + f = message.getPaymentIndex(); + if (f !== 0) { + writer.writeUint64( + 15, + f + ); + } + f = message.getFailureReason(); + if (f !== 0.0) { + writer.writeEnum( + 16, f ); } @@ -31416,263 +40068,306 @@ proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { /** - * optional string node_id = 1; + * @enum {number} + */ +proto.lnrpc.Payment.PaymentStatus = { + UNKNOWN: 0, + IN_FLIGHT: 1, + SUCCEEDED: 2, + FAILED: 3 +}; + +/** + * optional string payment_hash = 1; * @return {string} */ -proto.lnrpc.HopHint.prototype.getNodeId = function() { +proto.lnrpc.Payment.prototype.getPaymentHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.HopHint} returns this + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.HopHint.prototype.setNodeId = function(value) { +proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional uint64 chan_id = 2; - * @return {string} + * optional int64 value = 2; + * @return {number} */ -proto.lnrpc.HopHint.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.lnrpc.Payment.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.HopHint} returns this + * @param {number} value + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.HopHint.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); +proto.lnrpc.Payment.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 fee_base_m_atoms = 3; + * optional int64 creation_date = 3; * @return {number} */ -proto.lnrpc.HopHint.prototype.getFeeBaseMAtoms = function() { +proto.lnrpc.Payment.prototype.getCreationDate = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.HopHint} returns this + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.HopHint.prototype.setFeeBaseMAtoms = function(value) { +proto.lnrpc.Payment.prototype.setCreationDate = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional uint32 fee_proportional_millionths = 4; + * optional int64 fee = 5; * @return {number} */ -proto.lnrpc.HopHint.prototype.getFeeProportionalMillionths = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.Payment.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.HopHint} returns this + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.Payment.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional uint32 cltv_expiry_delta = 5; + * optional string payment_preimage = 6; + * @return {string} + */ +proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Payment} returns this + */ +proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int64 value_atoms = 7; * @return {number} */ -proto.lnrpc.HopHint.prototype.getCltvExpiryDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Payment.prototype.getValueAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.HopHint} returns this + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.Payment.prototype.setValueAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; +/** + * optional int64 value_m_atoms = 8; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getValueMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {number} value + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.RouteHint.repeatedFields_ = [1]; +proto.lnrpc.Payment.prototype.setValueMAtoms = function(value) { + return 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, "")); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {string} value + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.RouteHint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RouteHint.toObject(opt_includeInstance, this); +proto.lnrpc.Payment.prototype.setPaymentRequest = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional PaymentStatus status = 10; + * @return {!proto.lnrpc.Payment.PaymentStatus} */ -proto.lnrpc.RouteHint.toObject = function(includeInstance, msg) { - var f, obj = { - hopHintsList: jspb.Message.toObjectList(msg.getHopHintsList(), - proto.lnrpc.HopHint.toObject, includeInstance) - }; +proto.lnrpc.Payment.prototype.getStatus = function() { + return /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {!proto.lnrpc.Payment.PaymentStatus} value + * @return {!proto.lnrpc.Payment} returns this + */ +proto.lnrpc.Payment.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + +/** + * optional int64 fee_atoms = 11; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getFeeAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Payment} returns this + */ +proto.lnrpc.Payment.prototype.setFeeAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional int64 fee_m_atoms = 12; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getFeeMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Payment} returns this + */ +proto.lnrpc.Payment.prototype.setFeeMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional int64 creation_time_ns = 13; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getCreationTimeNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Payment} returns this + */ +proto.lnrpc.Payment.prototype.setCreationTimeNs = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RouteHint} + * repeated HTLCAttempt htlcs = 14; + * @return {!Array} */ -proto.lnrpc.RouteHint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RouteHint; - return proto.lnrpc.RouteHint.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Payment.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLCAttempt, 14)); }; /** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RouteHint} - */ -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; - } - } - return msg; + * @param {!Array} value + * @return {!proto.lnrpc.Payment} returns this +*/ +proto.lnrpc.Payment.prototype.setHtlcsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 14, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {!proto.lnrpc.HTLCAttempt=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.HTLCAttempt} */ -proto.lnrpc.RouteHint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.RouteHint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Payment.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.HTLCAttempt, opt_index); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RouteHint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Payment} returns this */ -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 - ); - } +proto.lnrpc.Payment.prototype.clearHtlcsList = function() { + return this.setHtlcsList([]); }; /** - * repeated HopHint hop_hints = 1; - * @return {!Array} + * optional uint64 payment_index = 15; + * @return {number} */ -proto.lnrpc.RouteHint.prototype.getHopHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HopHint, 1)); +proto.lnrpc.Payment.prototype.getPaymentIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.RouteHint} returns this -*/ -proto.lnrpc.RouteHint.prototype.setHopHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.lnrpc.Payment} returns this + */ +proto.lnrpc.Payment.prototype.setPaymentIndex = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); }; /** - * @param {!proto.lnrpc.HopHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HopHint} + * optional PaymentFailureReason failure_reason = 16; + * @return {!proto.lnrpc.PaymentFailureReason} */ -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.Payment.prototype.getFailureReason = function() { + return /** @type {!proto.lnrpc.PaymentFailureReason} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.RouteHint} returns this + * @param {!proto.lnrpc.PaymentFailureReason} value + * @return {!proto.lnrpc.Payment} returns this */ -proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { - return this.setHopHintsList([]); +proto.lnrpc.Payment.prototype.setFailureReason = function(value) { + return jspb.Message.setProto3EnumField(this, 16, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Invoice.repeatedFields_ = [14,22]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -31688,8 +40383,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.HTLCAttempt.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HTLCAttempt.toObject(opt_includeInstance, this); }; @@ -31698,39 +40393,19 @@ proto.lnrpc.Invoice.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.HTLCAttempt} 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.HTLCAttempt.toObject = function(includeInstance, msg) { var f, obj = { - memo: jspb.Message.getFieldWithDefault(msg, 1, ""), - rPreimage: msg.getRPreimage_asB64(), - rHash: msg.getRHash_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 5, 0), - valueMAtoms: jspb.Message.getFieldWithDefault(msg, 23, 0), - settled: jspb.Message.getBooleanFieldWithDefault(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.getBooleanFieldWithDefault(msg, 15, false), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 17, 0), - amtPaid: jspb.Message.getFieldWithDefault(msg, 18, 0), - amtPaidAtoms: jspb.Message.getFieldWithDefault(msg, 19, 0), - amtPaidMAtoms: jspb.Message.getFieldWithDefault(msg, 20, 0), - state: jspb.Message.getFieldWithDefault(msg, 21, 0), - htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), - proto.lnrpc.InvoiceHTLC.toObject, includeInstance), - ignoreMaxInboundAmt: jspb.Message.getBooleanFieldWithDefault(msg, 1001, false), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], - isKeysend: jspb.Message.getBooleanFieldWithDefault(msg, 25, false) + attemptId: jspb.Message.getFieldWithDefault(msg, 7, 0), + 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) { @@ -31744,132 +40419,58 @@ 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.HTLCAttempt} */ -proto.lnrpc.Invoice.deserializeBinary = function(bytes) { +proto.lnrpc.HTLCAttempt.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.HTLCAttempt; + return proto.lnrpc.HTLCAttempt.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.HTLCAttempt} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Invoice} + * @return {!proto.lnrpc.HTLCAttempt} */ -proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { +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 {string} */ (reader.readString()); - msg.setMemo(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); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 23: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueMAtoms(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSettled(value); - break; case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationDate(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSettleDate(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescriptionHash(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCltvExpiry(value); - break; - case 14: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 16: var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); + msg.setAttemptId(value); break; - case 17: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSettleIndex(value); + case 1: + var value = /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (reader.readEnum()); + msg.setStatus(value); break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaid(value); + case 2: + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.setRoute(value); break; - case 19: + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaidAtoms(value); + msg.setAttemptTimeNs(value); break; - case 20: + case 4: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaidMAtoms(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 1001: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIgnoreMaxInboundAmt(value); + msg.setResolveTimeNs(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, new proto.lnrpc.Feature()); - }); + case 5: + var value = new proto.lnrpc.Failure; + reader.readMessage(value,proto.lnrpc.Failure.deserializeBinaryFromReader); + msg.setFailure(value); break; - case 25: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsKeysend(value); + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); break; default: reader.skipField(); @@ -31884,9 +40485,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.HTLCAttempt.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Invoice.serializeBinaryToWriter(this, writer); + proto.lnrpc.HTLCAttempt.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31894,183 +40495,60 @@ 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.HTLCAttempt} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.HTLCAttempt.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getValueMAtoms(); - if (f !== 0) { - writer.writeInt64( - 23, - f - ); - } - f = message.getSettled(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getCreationDate(); + f = message.getAttemptId(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 7, f ); } - f = message.getSettleDate(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getDescriptionHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 10, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint64( - 13, + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, f ); } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 14, + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 2, 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 + proto.lnrpc.Route.serializeBinaryToWriter ); } - f = message.getAmtPaidAtoms(); + f = message.getAttemptTimeNs(); if (f !== 0) { writer.writeInt64( - 19, + 3, f ); } - f = message.getAmtPaidMAtoms(); + f = message.getResolveTimeNs(); if (f !== 0) { writer.writeInt64( - 20, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 21, + 4, f ); } - f = message.getHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 22, + f = message.getFailure(); + if (f != null) { + writer.writeMessage( + 5, f, - proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter - ); - } - f = message.getIgnoreMaxInboundAmt(); - if (f) { - writer.writeBool( - 1001, - f + proto.lnrpc.Failure.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 = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, f ); } @@ -32080,576 +40558,821 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { /** * @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, "")); +proto.lnrpc.HTLCAttempt.HTLCStatus = { + IN_FLIGHT: 0, + SUCCEEDED: 1, + FAILED: 2 }; - /** - * @param {string} value - * @return {!proto.lnrpc.Invoice} returns this + * optional uint64 attempt_id = 7; + * @return {number} */ -proto.lnrpc.Invoice.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.HTLCAttempt.prototype.getAttemptId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * optional bytes r_preimage = 3; - * @return {!(string|Uint8Array)} + * @param {number} value + * @return {!proto.lnrpc.HTLCAttempt} returns this */ -proto.lnrpc.Invoice.prototype.getRPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.HTLCAttempt.prototype.setAttemptId = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional bytes r_preimage = 3; - * This is a type-conversion wrapper around `getRPreimage()` - * @return {string} + * optional HTLCStatus status = 1; + * @return {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ -proto.lnrpc.Invoice.prototype.getRPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRPreimage())); +proto.lnrpc.HTLCAttempt.prototype.getStatus = function() { + return /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * 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 {!proto.lnrpc.HTLCAttempt.HTLCStatus} value + * @return {!proto.lnrpc.HTLCAttempt} returns this + */ +proto.lnrpc.HTLCAttempt.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this + * optional Route route = 2; + * @return {?proto.lnrpc.Route} */ -proto.lnrpc.Invoice.prototype.setRPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.lnrpc.HTLCAttempt.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 2)); }; /** - * optional bytes r_hash = 4; - * @return {!(string|Uint8Array)} + * @param {?proto.lnrpc.Route|undefined} value + * @return {!proto.lnrpc.HTLCAttempt} returns this +*/ +proto.lnrpc.HTLCAttempt.prototype.setRoute = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.HTLCAttempt} returns this */ -proto.lnrpc.Invoice.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.HTLCAttempt.prototype.clearRoute = function() { + return this.setRoute(undefined); }; /** - * optional bytes r_hash = 4; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Invoice.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); +proto.lnrpc.HTLCAttempt.prototype.hasRoute = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional bytes r_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} + * optional int64 attempt_time_ns = 3; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); +proto.lnrpc.HTLCAttempt.prototype.getAttemptTimeNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this + * @param {number} value + * @return {!proto.lnrpc.HTLCAttempt} returns this */ -proto.lnrpc.Invoice.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.lnrpc.HTLCAttempt.prototype.setAttemptTimeNs = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 value = 5; + * optional int64 resolve_time_ns = 4; * @return {number} */ -proto.lnrpc.Invoice.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.HTLCAttempt.prototype.getResolveTimeNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * @return {!proto.lnrpc.HTLCAttempt} returns this */ -proto.lnrpc.Invoice.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.HTLCAttempt.prototype.setResolveTimeNs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 value_m_atoms = 23; - * @return {number} + * optional Failure failure = 5; + * @return {?proto.lnrpc.Failure} */ -proto.lnrpc.Invoice.prototype.getValueMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +proto.lnrpc.HTLCAttempt.prototype.getFailure = function() { + return /** @type{?proto.lnrpc.Failure} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Failure, 5)); }; /** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this - */ -proto.lnrpc.Invoice.prototype.setValueMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); + * @param {?proto.lnrpc.Failure|undefined} value + * @return {!proto.lnrpc.HTLCAttempt} returns this +*/ +proto.lnrpc.HTLCAttempt.prototype.setFailure = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** - * optional bool settled = 6; - * @return {boolean} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.HTLCAttempt} returns this */ -proto.lnrpc.Invoice.prototype.getSettled = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.lnrpc.HTLCAttempt.prototype.clearFailure = function() { + return this.setFailure(undefined); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Invoice.prototype.setSettled = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.lnrpc.HTLCAttempt.prototype.hasFailure = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional int64 creation_date = 7; - * @return {number} + * optional bytes preimage = 6; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Invoice.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.HTLCAttempt.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * optional bytes preimage = 6; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} */ -proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.HTLCAttempt.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); }; /** - * optional int64 settle_date = 8; - * @return {number} + * 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.Invoice.prototype.getSettleDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.HTLCAttempt.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); }; /** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.HTLCAttempt} returns this */ -proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.HTLCAttempt.prototype.setPreimage = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string payment_request = 9; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.lnrpc.ListPaymentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPaymentsRequest.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @return {!proto.lnrpc.Invoice} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); +proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + includeIncomplete: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + indexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxPayments: jspb.Message.getFieldWithDefault(msg, 3, 0), + reversed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes description_hash = 10; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPaymentsRequest} */ -proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +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 bytes description_hash = 10; - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {string} + * 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.getDescriptionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescriptionHash())); +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; }; /** - * 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()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescriptionHash())); +proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Invoice} returns this + * 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.setDescriptionHash = function(value) { - return jspb.Message.setProto3BytesField(this, 10, value); +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 + ); + } }; /** - * optional int64 expiry = 11; - * @return {number} + * optional bool include_incomplete = 1; + * @return {boolean} */ -proto.lnrpc.Invoice.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.ListPaymentsRequest.prototype.getIncludeIncomplete = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * @param {boolean} value + * @return {!proto.lnrpc.ListPaymentsRequest} returns this */ -proto.lnrpc.Invoice.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional string fallback_addr = 12; - * @return {string} + * optional uint64 index_offset = 2; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +proto.lnrpc.ListPaymentsRequest.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.Invoice} returns this + * @param {number} value + * @return {!proto.lnrpc.ListPaymentsRequest} returns this */ -proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); +proto.lnrpc.ListPaymentsRequest.prototype.setIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint64 cltv_expiry = 13; + * optional uint64 max_payments = 3; * @return {number} */ -proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.ListPaymentsRequest.prototype.getMaxPayments = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * @return {!proto.lnrpc.ListPaymentsRequest} returns this */ -proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.ListPaymentsRequest.prototype.setMaxPayments = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * repeated RouteHint route_hints = 14; - * @return {!Array} + * optional bool reversed = 4; + * @return {boolean} */ -proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); +proto.lnrpc.ListPaymentsRequest.prototype.getReversed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.Invoice} returns this -*/ -proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 14, value); + * @param {boolean} value + * @return {!proto.lnrpc.ListPaymentsRequest} returns this + */ +proto.lnrpc.ListPaymentsRequest.prototype.setReversed = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; + /** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.Invoice.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.RouteHint, opt_index); -}; +proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Invoice} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Invoice.prototype.clearRouteHintsList = function() { - return this.setRouteHintsList([]); +proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPaymentsResponse.toObject(opt_includeInstance, this); }; /** - * optional bool private = 15; - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ListPaymentsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPaymentsResponse} */ -proto.lnrpc.Invoice.prototype.setPrivate = function(value) { - return jspb.Message.setProto3BooleanField(this, 15, value); +proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ListPaymentsResponse; + return proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader(msg, reader); }; /** - * optional uint64 add_index = 16; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ListPaymentsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ListPaymentsResponse} */ -proto.lnrpc.Invoice.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.Payment; + reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); + msg.addPayments(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFirstIndexOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLastIndexOffset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); +proto.lnrpc.ListPaymentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint64 settle_index = 17; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ListPaymentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Payment.serializeBinaryToWriter + ); + } + f = message.getFirstIndexOffset(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getLastIndexOffset(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } }; /** - * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * repeated Payment payments = 1; + * @return {!Array} */ -proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { - return jspb.Message.setProto3IntField(this, 17, value); +proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.ListPaymentsResponse} returns this +*/ +proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional int64 amt_paid = 18; - * @return {number} + * @param {!proto.lnrpc.Payment=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Payment} */ -proto.lnrpc.Invoice.prototype.getAmtPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 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 - * @return {!proto.lnrpc.Invoice} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ListPaymentsResponse} returns this */ -proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { - return jspb.Message.setProto3IntField(this, 18, value); +proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { + return this.setPaymentsList([]); }; /** - * optional int64 amt_paid_atoms = 19; + * optional uint64 first_index_offset = 2; * @return {number} */ -proto.lnrpc.Invoice.prototype.getAmtPaidAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.getFirstIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * @return {!proto.lnrpc.ListPaymentsResponse} returns this */ -proto.lnrpc.Invoice.prototype.setAmtPaidAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); +proto.lnrpc.ListPaymentsResponse.prototype.setFirstIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int64 amt_paid_m_atoms = 20; + * optional uint64 last_index_offset = 3; * @return {number} */ -proto.lnrpc.Invoice.prototype.getAmtPaidMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.getLastIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Invoice} returns this + * @return {!proto.lnrpc.ListPaymentsResponse} returns this */ -proto.lnrpc.Invoice.prototype.setAmtPaidMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); +proto.lnrpc.ListPaymentsResponse.prototype.setLastIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional InvoiceState state = 21; - * @return {!proto.lnrpc.Invoice.InvoiceState} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Invoice.prototype.getState = function() { - return /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +proto.lnrpc.DeletePaymentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeletePaymentRequest.toObject(opt_includeInstance, this); }; /** - * @param {!proto.lnrpc.Invoice.InvoiceState} value - * @return {!proto.lnrpc.Invoice} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.DeletePaymentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 21, value); +proto.lnrpc.DeletePaymentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + failedHtlcsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated InvoiceHTLC htlcs = 22; - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DeletePaymentRequest} */ -proto.lnrpc.Invoice.prototype.getHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.InvoiceHTLC, 22)); +proto.lnrpc.DeletePaymentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.DeletePaymentRequest; + return proto.lnrpc.DeletePaymentRequest.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.Invoice} returns this -*/ -proto.lnrpc.Invoice.prototype.setHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 22, value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.DeletePaymentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DeletePaymentRequest} + */ +proto.lnrpc.DeletePaymentRequest.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.setFailedHtlcsOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.lnrpc.InvoiceHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.InvoiceHTLC} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -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.DeletePaymentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DeletePaymentRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Invoice} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.DeletePaymentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.clearHtlcsList = function() { - return this.setHtlcsList([]); +proto.lnrpc.DeletePaymentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFailedHtlcsOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional bool ignore_max_inbound_amt = 1001; - * @return {boolean} + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Invoice.prototype.getIgnoreMaxInboundAmt = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1001, false)); +proto.lnrpc.DeletePaymentRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} */ -proto.lnrpc.Invoice.prototype.setIgnoreMaxInboundAmt = function(value) { - return jspb.Message.setProto3BooleanField(this, 1001, value); +proto.lnrpc.DeletePaymentRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); }; /** - * map features = 24; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * 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.Invoice.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 24, opt_noLazyCreate, - proto.lnrpc.Feature)); +proto.lnrpc.DeletePaymentRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.Invoice} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.DeletePaymentRequest} returns this */ -proto.lnrpc.Invoice.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; +proto.lnrpc.DeletePaymentRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; /** - * optional bool is_keysend = 25; + * optional bool failed_htlcs_only = 2; * @return {boolean} */ -proto.lnrpc.Invoice.prototype.getIsKeysend = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); +proto.lnrpc.DeletePaymentRequest.prototype.getFailedHtlcsOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.lnrpc.Invoice} returns this + * @return {!proto.lnrpc.DeletePaymentRequest} returns this */ -proto.lnrpc.Invoice.prototype.setIsKeysend = function(value) { - return jspb.Message.setProto3BooleanField(this, 25, value); +proto.lnrpc.DeletePaymentRequest.prototype.setFailedHtlcsOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -32669,8 +41392,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.DeleteAllPaymentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeleteAllPaymentsRequest.toObject(opt_includeInstance, this); }; @@ -32679,22 +41402,14 @@ proto.lnrpc.InvoiceHTLC.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.DeleteAllPaymentsRequest} 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.DeleteAllPaymentsRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMAtoms: 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) : [], - mppTotalAmtMAtoms: jspb.Message.getFieldWithDefault(msg, 10, 0) + failedPaymentsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + failedHtlcsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -32708,23 +41423,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.DeleteAllPaymentsRequest} */ -proto.lnrpc.InvoiceHTLC.deserializeBinary = function(bytes) { +proto.lnrpc.DeleteAllPaymentsRequest.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.DeleteAllPaymentsRequest; + return proto.lnrpc.DeleteAllPaymentsRequest.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.DeleteAllPaymentsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InvoiceHTLC} + * @return {!proto.lnrpc.DeleteAllPaymentsRequest} */ -proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32732,46 +41447,12 @@ proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFailedPaymentsOnly(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcIndex(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtMAtoms(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.setMppTotalAmtMAtoms(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFailedHtlcsOnly(value); break; default: reader.skipField(); @@ -32786,9 +41467,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.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32796,263 +41477,264 @@ 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.DeleteAllPaymentsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getFailedPaymentsOnly(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getHtlcIndex(); - if (f !== 0) { - writer.writeUint64( + f = message.getFailedHtlcsOnly(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getAmtMAtoms(); - 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 - ); - } - f = message.getCustomRecordsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } - f = message.getMppTotalAmtMAtoms(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } }; /** - * optional uint64 chan_id = 1; - * @return {string} + * optional bool failed_payments_only = 1; + * @return {boolean} */ -proto.lnrpc.InvoiceHTLC.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.lnrpc.DeleteAllPaymentsRequest.prototype.getFailedPaymentsOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {string} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * @param {boolean} value + * @return {!proto.lnrpc.DeleteAllPaymentsRequest} returns this */ -proto.lnrpc.InvoiceHTLC.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.lnrpc.DeleteAllPaymentsRequest.prototype.setFailedPaymentsOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional uint64 htlc_index = 2; - * @return {number} + * optional bool failed_htlcs_only = 2; + * @return {boolean} */ -proto.lnrpc.InvoiceHTLC.prototype.getHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.DeleteAllPaymentsRequest.prototype.getFailedHtlcsOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * @param {boolean} value + * @return {!proto.lnrpc.DeleteAllPaymentsRequest} returns this */ -proto.lnrpc.InvoiceHTLC.prototype.setHtlcIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.DeleteAllPaymentsRequest.prototype.setFailedHtlcsOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; -/** - * optional uint64 amt_m_atoms = 3; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.InvoiceHTLC.prototype.setAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.DeletePaymentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeletePaymentResponse.toObject(opt_includeInstance, this); }; /** - * optional int32 accept_height = 4; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.DeletePaymentResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceHTLC.prototype.getAcceptHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; +proto.lnrpc.DeletePaymentResponse.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setAcceptHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 accept_time = 5; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DeletePaymentResponse} */ -proto.lnrpc.InvoiceHTLC.prototype.getAcceptTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.DeletePaymentResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.DeletePaymentResponse; + return proto.lnrpc.DeletePaymentResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.DeletePaymentResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DeletePaymentResponse} */ -proto.lnrpc.InvoiceHTLC.prototype.setAcceptTime = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.DeletePaymentResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 resolve_time = 6; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.InvoiceHTLC.prototype.getResolveTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.DeletePaymentResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DeletePaymentResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.DeletePaymentResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceHTLC.prototype.setResolveTime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.DeletePaymentResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -/** - * optional int32 expiry_height = 7; - * @return {number} - */ -proto.lnrpc.InvoiceHTLC.prototype.getExpiryHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.InvoiceHTLC.prototype.setExpiryHeight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeleteAllPaymentsResponse.toObject(opt_includeInstance, this); }; /** - * optional InvoiceHTLCState state = 8; - * @return {!proto.lnrpc.InvoiceHTLCState} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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 */ -proto.lnrpc.InvoiceHTLC.prototype.getState = function() { - return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; +proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * @param {!proto.lnrpc.InvoiceHTLCState} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this - */ -proto.lnrpc.InvoiceHTLC.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * map custom_records = 9; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DeleteAllPaymentsResponse} */ -proto.lnrpc.InvoiceHTLC.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 9, opt_noLazyCreate, - null)); +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); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * 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.InvoiceHTLC.prototype.clearCustomRecordsMap = function() { - this.getCustomRecordsMap().clear(); - return this;}; +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; +}; /** - * optional uint64 mpp_total_amt_m_atoms = 10; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.InvoiceHTLC.prototype.getMppTotalAmtMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.InvoiceHTLC} returns this + * 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 */ -proto.lnrpc.InvoiceHTLC.prototype.setMppTotalAmtMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -33072,8 +41754,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.AbandonChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AbandonChannelRequest.toObject(opt_includeInstance, this); }; @@ -33082,15 +41764,15 @@ proto.lnrpc.AddInvoiceResponse.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.AbandonChannelRequest} 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.AbandonChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - rHash: msg.getRHash_asB64(), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0) + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + pendingFundingShimOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + iKnowWhatIAmDoing: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -33104,23 +41786,23 @@ 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.AbandonChannelRequest} */ -proto.lnrpc.AddInvoiceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.AbandonChannelRequest.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.AbandonChannelRequest; + return proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.AddInvoiceResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.AbandonChannelRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AddInvoiceResponse} + * @return {!proto.lnrpc.AbandonChannelRequest} */ -proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33128,16 +41810,17 @@ proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChannelPoint(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPendingFundingShimOnly(value); break; - case 16: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIKnowWhatIAmDoing(value); break; default: reader.skipField(); @@ -33152,9 +41835,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.AbandonChannelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33162,30 +41845,31 @@ 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.AbandonChannelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getChannelPoint(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( + f = message.getPendingFundingShimOnly(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 16, + f = message.getIKnowWhatIAmDoing(); + if (f) { + writer.writeBool( + 3, f ); } @@ -33193,80 +41877,176 @@ proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter = function(message, write /** - * optional bytes r_hash = 1; - * @return {!(string|Uint8Array)} + * optional ChannelPoint channel_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.AbandonChannelRequest.prototype.getChannelPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; /** - * optional bytes r_hash = 1; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.AbandonChannelRequest} returns this +*/ +proto.lnrpc.AbandonChannelRequest.prototype.setChannelPoint = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.AbandonChannelRequest} returns this */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); +proto.lnrpc.AbandonChannelRequest.prototype.clearChannelPoint = function() { + return this.setChannelPoint(undefined); }; /** - * optional bytes r_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); +proto.lnrpc.AbandonChannelRequest.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this + * optional bool pending_funding_shim_only = 2; + * @return {boolean} */ -proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.AbandonChannelRequest.prototype.getPendingFundingShimOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * optional string payment_request = 2; - * @return {string} + * @param {boolean} value + * @return {!proto.lnrpc.AbandonChannelRequest} returns this */ -proto.lnrpc.AddInvoiceResponse.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.AbandonChannelRequest.prototype.setPendingFundingShimOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * @param {string} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this + * optional bool i_know_what_i_am_doing = 3; + * @return {boolean} */ -proto.lnrpc.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.AbandonChannelRequest.prototype.getIKnowWhatIAmDoing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * optional uint64 add_index = 16; - * @return {number} + * @param {boolean} value + * @return {!proto.lnrpc.AbandonChannelRequest} returns this */ -proto.lnrpc.AddInvoiceResponse.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +proto.lnrpc.AbandonChannelRequest.prototype.setIKnowWhatIAmDoing = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.AddInvoiceResponse} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 16, value); +proto.lnrpc.AbandonChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AbandonChannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.AbandonChannelResponse} + */ +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); +}; + + +/** + * 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} + */ +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; +}; + + +/** + * 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(); +}; + + +/** + * 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 + */ +proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -33286,8 +42066,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DebugLevelRequest.toObject(opt_includeInstance, this); }; @@ -33296,14 +42076,14 @@ proto.lnrpc.PaymentHash.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.DebugLevelRequest} 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.DebugLevelRequest.toObject = function(includeInstance, msg) { var f, obj = { - rHashStr: jspb.Message.getFieldWithDefault(msg, 1, ""), - rHash: msg.getRHash_asB64() + show: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -33317,23 +42097,23 @@ 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.DebugLevelRequest} */ -proto.lnrpc.PaymentHash.deserializeBinary = function(bytes) { +proto.lnrpc.DebugLevelRequest.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.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.PaymentHash} 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.PaymentHash} + * @return {!proto.lnrpc.DebugLevelRequest} */ -proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33341,12 +42121,12 @@ proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRHashStr(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setShow(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); + var value = /** @type {string} */ (reader.readString()); + msg.setLevelSpec(value); break; default: reader.skipField(); @@ -33361,9 +42141,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.DebugLevelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PaymentHash.serializeBinaryToWriter(this, writer); + proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33371,22 +42151,22 @@ 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.DebugLevelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PaymentHash.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRHashStr(); - if (f.length > 0) { - writer.writeString( + f = message.getShow(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getRHash_asU8(); + f = message.getLevelSpec(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); @@ -33395,62 +42175,38 @@ proto.lnrpc.PaymentHash.serializeBinaryToWriter = function(message, writer) { /** - * 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 - * @return {!proto.lnrpc.PaymentHash} returns this + * optional bool show = 1; + * @return {boolean} */ -proto.lnrpc.PaymentHash.prototype.setRHashStr = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.DebugLevelRequest.prototype.getShow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * optional bytes r_hash = 2; - * @return {!(string|Uint8Array)} + * @param {boolean} value + * @return {!proto.lnrpc.DebugLevelRequest} returns this */ -proto.lnrpc.PaymentHash.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.DebugLevelRequest.prototype.setShow = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional bytes r_hash = 2; - * This is a type-conversion wrapper around `getRHash()` + * optional string level_spec = 2; * @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())); +proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.PaymentHash} returns this + * @param {string} value + * @return {!proto.lnrpc.DebugLevelRequest} returns this */ -proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -33470,8 +42226,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.DebugLevelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DebugLevelResponse.toObject(opt_includeInstance, this); }; @@ -33480,16 +42236,13 @@ proto.lnrpc.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.DebugLevelResponse} 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.DebugLevelResponse.toObject = function(includeInstance, msg) { var f, obj = { - pendingOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 4, 0), - numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, 0), - reversed: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + subSystems: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -33503,23 +42256,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.DebugLevelResponse} */ -proto.lnrpc.ListInvoiceRequest.deserializeBinary = function(bytes) { +proto.lnrpc.DebugLevelResponse.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.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.ListInvoiceRequest} 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.ListInvoiceRequest} + * @return {!proto.lnrpc.DebugLevelResponse} */ -proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33527,20 +42280,8 @@ proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); 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); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReversed(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSubSystems(value); break; default: reader.skipField(); @@ -33555,9 +42296,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.DebugLevelResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33565,123 +42306,142 @@ 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.DebugLevelResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPendingOnly(); - if (f) { - writer.writeBool( + f = message.getSubSystems(); + if (f.length > 0) { + writer.writeString( 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 - ); - } }; /** - * optional bool pending_only = 1; - * @return {boolean} + * optional string sub_systems = 1; + * @return {string} */ -proto.lnrpc.ListInvoiceRequest.prototype.getPendingOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.DebugLevelResponse.prototype.getSubSystems = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.DebugLevelResponse} returns this */ -proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 index_offset = 4; - * @return {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.ListInvoiceRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.CalcPaymentStatsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CalcPaymentStatsRequest.toObject(opt_includeInstance, this); }; -/** - * @param {number} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this - */ -proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.CalcPaymentStatsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.CalcPaymentStatsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 num_max_invoices = 5; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.CalcPaymentStatsRequest} */ -proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.CalcPaymentStatsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.CalcPaymentStatsRequest; + return proto.lnrpc.CalcPaymentStatsRequest.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.CalcPaymentStatsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.CalcPaymentStatsRequest} */ -proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.CalcPaymentStatsRequest.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 reversed = 6; - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ListInvoiceRequest.prototype.getReversed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.lnrpc.CalcPaymentStatsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.CalcPaymentStatsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListInvoiceRequest} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.CalcPaymentStatsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceRequest.prototype.setReversed = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.lnrpc.CalcPaymentStatsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListInvoiceResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -33697,8 +42457,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.CalcPaymentStatsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CalcPaymentStatsResponse.toObject(opt_includeInstance, this); }; @@ -33707,16 +42467,19 @@ proto.lnrpc.ListInvoiceResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.CalcPaymentStatsResponse} 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.CalcPaymentStatsResponse.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) + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + failed: jspb.Message.getFieldWithDefault(msg, 2, 0), + succeeded: jspb.Message.getFieldWithDefault(msg, 3, 0), + htlcAttempts: jspb.Message.getFieldWithDefault(msg, 4, 0), + htlcFailed: jspb.Message.getFieldWithDefault(msg, 5, 0), + htlcSettled: jspb.Message.getFieldWithDefault(msg, 6, 0), + oldDupePayments: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -33730,23 +42493,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.CalcPaymentStatsResponse} */ -proto.lnrpc.ListInvoiceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.CalcPaymentStatsResponse.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.CalcPaymentStatsResponse; + return proto.lnrpc.CalcPaymentStatsResponse.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.CalcPaymentStatsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListInvoiceResponse} + * @return {!proto.lnrpc.CalcPaymentStatsResponse} */ -proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CalcPaymentStatsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33754,17 +42517,32 @@ 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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotal(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); - msg.setLastIndexOffset(value); + msg.setFailed(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); - msg.setFirstIndexOffset(value); + msg.setSucceeded(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcAttempts(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcFailed(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcSettled(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOldDupePayments(value); break; default: reader.skipField(); @@ -33779,9 +42557,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.CalcPaymentStatsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.CalcPaymentStatsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33789,108 +42567,187 @@ 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.CalcPaymentStatsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CalcPaymentStatsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getInvoicesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getTotal(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.lnrpc.Invoice.serializeBinaryToWriter + f ); } - f = message.getLastIndexOffset(); + f = message.getFailed(); if (f !== 0) { writer.writeUint64( 2, f ); } - f = message.getFirstIndexOffset(); + f = message.getSucceeded(); if (f !== 0) { writer.writeUint64( 3, f ); } + f = message.getHtlcAttempts(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getHtlcFailed(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getHtlcSettled(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getOldDupePayments(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } }; /** - * repeated Invoice invoices = 1; - * @return {!Array} + * optional uint64 total = 1; + * @return {number} */ -proto.lnrpc.ListInvoiceResponse.prototype.getInvoicesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Invoice, 1)); +proto.lnrpc.CalcPaymentStatsResponse.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ListInvoiceResponse} returns this -*/ -proto.lnrpc.ListInvoiceResponse.prototype.setInvoicesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * @param {!proto.lnrpc.Invoice=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Invoice} + * optional uint64 failed = 2; + * @return {number} */ -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.CalcPaymentStatsResponse.prototype.getFailed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListInvoiceResponse} returns this + * @param {number} value + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this */ -proto.lnrpc.ListInvoiceResponse.prototype.clearInvoicesList = function() { - return this.setInvoicesList([]); +proto.lnrpc.CalcPaymentStatsResponse.prototype.setFailed = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint64 last_index_offset = 2; + * optional uint64 succeeded = 3; * @return {number} */ -proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.CalcPaymentStatsResponse.prototype.getSucceeded = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListInvoiceResponse} returns this + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this */ -proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.CalcPaymentStatsResponse.prototype.setSucceeded = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional uint64 first_index_offset = 3; + * optional uint64 htlc_attempts = 4; * @return {number} */ -proto.lnrpc.ListInvoiceResponse.prototype.getFirstIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.CalcPaymentStatsResponse.prototype.getHtlcAttempts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListInvoiceResponse} returns this + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this */ -proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.CalcPaymentStatsResponse.prototype.setHtlcAttempts = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 htlc_failed = 5; + * @return {number} + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.getHtlcFailed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.setHtlcFailed = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 htlc_settled = 6; + * @return {number} + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.getHtlcSettled = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.setHtlcSettled = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 old_dupe_payments = 7; + * @return {number} + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.getOldDupePayments = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.CalcPaymentStatsResponse} returns this + */ +proto.lnrpc.CalcPaymentStatsResponse.prototype.setOldDupePayments = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; @@ -33910,8 +42767,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); }; @@ -33920,14 +42777,13 @@ proto.lnrpc.InvoiceSubscription.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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) { @@ -33941,23 +42797,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; @@ -33965,12 +42821,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(); @@ -33985,9 +42837,9 @@ proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { +proto.lnrpc.PayReqString.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter(this, writer); + proto.lnrpc.PayReqString.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33995,62 +42847,37 @@ proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InvoiceSubscription} message + * @param {!proto.lnrpc.PayReqString} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PayReqString.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( + f = message.getPayReq(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 add_index = 1; - * @return {number} - */ -proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.InvoiceSubscription} returns this - */ -proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); }; /** - * 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 - * @return {!proto.lnrpc.InvoiceSubscription} returns this + * @param {string} value + * @return {!proto.lnrpc.PayReqString} returns this */ -proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -34060,7 +42887,7 @@ proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { * @private {!Array} * @const */ -proto.lnrpc.Payment.repeatedFields_ = [14]; +proto.lnrpc.PayReq.repeatedFields_ = [10]; @@ -34077,8 +42904,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); }; @@ -34087,28 +42914,26 @@ proto.lnrpc.Payment.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0), - paymentPreimage: jspb.Message.getFieldWithDefault(msg, 6, ""), - valueAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), - valueMAtoms: jspb.Message.getFieldWithDefault(msg, 8, 0), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - feeAtoms: jspb.Message.getFieldWithDefault(msg, 11, 0), - feeMAtoms: jspb.Message.getFieldWithDefault(msg, 12, 0), - creationTimeNs: jspb.Message.getFieldWithDefault(msg, 13, 0), - htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), - proto.lnrpc.HTLCAttempt.toObject, includeInstance), - paymentIndex: jspb.Message.getFieldWithDefault(msg, 15, 0), - failureReason: jspb.Message.getFieldWithDefault(msg, 16, 0) + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + numAtoms: 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(), + numMAtoms: jspb.Message.getFieldWithDefault(msg, 12, 0), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] }; if (includeInstance) { @@ -34122,23 +42947,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; @@ -34147,64 +42972,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.setNumAtoms(value); + break; + case 4: + 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.setValueAtoms(value); + var value = /** @type {string} */ (reader.readString()); + msg.setDescriptionHash(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueMAtoms(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.setFeeAtoms(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); break; case 12: var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeMAtoms(value); + msg.setNumMAtoms(value); break; case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationTimeNs(value); - break; - case 14: - var value = new proto.lnrpc.HTLCAttempt; - reader.readMessage(value,proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader); - msg.addHtlcs(value); - break; - case 15: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPaymentIndex(value); - break; - case 16: - var value = /** @type {!proto.lnrpc.PaymentFailureReason} */ (reader.readEnum()); - msg.setFailureReason(value); + 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, new proto.lnrpc.Feature()); + }); break; default: reader.skipField(); @@ -34219,9 +43038,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(); }; @@ -34229,419 +43048,384 @@ 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.getNumAtoms(); if (f !== 0) { writer.writeInt64( 3, f ); } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getPaymentPreimage(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getValueAtoms(); + f = message.getTimestamp(); if (f !== 0) { writer.writeInt64( - 7, + 4, f ); } - f = message.getValueMAtoms(); + f = message.getExpiry(); if (f !== 0) { writer.writeInt64( - 8, + 5, f ); } - f = message.getPaymentRequest(); + f = message.getDescription(); if (f.length > 0) { writer.writeString( - 9, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 10, + 6, f ); } - f = message.getFeeAtoms(); - if (f !== 0) { - writer.writeInt64( - 11, + f = message.getDescriptionHash(); + if (f.length > 0) { + writer.writeString( + 7, f ); } - f = message.getFeeMAtoms(); - if (f !== 0) { - writer.writeInt64( - 12, + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( + 8, f ); } - f = message.getCreationTimeNs(); + f = message.getCltvExpiry(); if (f !== 0) { writer.writeInt64( - 13, + 9, f ); } - f = message.getHtlcsList(); + f = message.getRouteHintsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 14, + 10, f, - proto.lnrpc.HTLCAttempt.serializeBinaryToWriter + proto.lnrpc.RouteHint.serializeBinaryToWriter ); } - f = message.getPaymentIndex(); - if (f !== 0) { - writer.writeUint64( - 15, + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, f ); } - f = message.getFailureReason(); - if (f !== 0.0) { - writer.writeEnum( - 16, + f = message.getNumMAtoms(); + 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} - */ -proto.lnrpc.Payment.PaymentStatus = { - UNKNOWN: 0, - IN_FLIGHT: 1, - SUCCEEDED: 2, - FAILED: 3 -}; - -/** - * optional string payment_hash = 1; + * optional string destination = 1; * @return {string} */ -proto.lnrpc.Payment.prototype.getPaymentHash = function() { +proto.lnrpc.PayReq.prototype.getDestination = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { +proto.lnrpc.PayReq.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional int64 value = 2; - * @return {number} + * optional string payment_hash = 2; + * @return {string} */ -proto.lnrpc.Payment.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PayReq.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * @param {string} value + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 creation_date = 3; + * optional int64 num_atoms = 3; * @return {number} */ -proto.lnrpc.Payment.prototype.getCreationDate = function() { +proto.lnrpc.PayReq.prototype.getNumAtoms = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setCreationDate = function(value) { +proto.lnrpc.PayReq.prototype.setNumAtoms = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 fee = 5; + * optional int64 timestamp = 4; * @return {number} */ -proto.lnrpc.Payment.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.PayReq.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string payment_preimage = 6; - * @return {string} - */ -proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); +proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 value_atoms = 7; + * optional int64 expiry = 5; * @return {number} */ -proto.lnrpc.Payment.prototype.getValueAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.PayReq.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setValueAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.PayReq.prototype.setExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 value_m_atoms = 8; - * @return {number} + * optional string description = 6; + * @return {string} */ -proto.lnrpc.Payment.prototype.getValueMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.PayReq.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * @param {string} value + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setValueMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.PayReq.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * optional string payment_request = 9; + * optional string description_hash = 7; * @return {string} */ -proto.lnrpc.Payment.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.lnrpc.PayReq.prototype.getDescriptionHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setPaymentRequest = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); +proto.lnrpc.PayReq.prototype.setDescriptionHash = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * optional PaymentStatus status = 10; - * @return {!proto.lnrpc.Payment.PaymentStatus} + * optional string fallback_addr = 8; + * @return {string} */ -proto.lnrpc.Payment.prototype.getStatus = function() { - return /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** - * @param {!proto.lnrpc.Payment.PaymentStatus} value - * @return {!proto.lnrpc.Payment} returns this + * @param {string} value + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); +proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional int64 fee_atoms = 11; + * optional int64 cltv_expiry = 9; * @return {number} */ -proto.lnrpc.Payment.prototype.getFeeAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setFeeAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional int64 fee_m_atoms = 12; - * @return {number} + * repeated RouteHint route_hints = 10; + * @return {!Array} */ -proto.lnrpc.Payment.prototype.getFeeMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.PayReq.prototype.getRouteHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 10)); }; /** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this - */ -proto.lnrpc.Payment.prototype.setFeeMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); + * @param {!Array} value + * @return {!proto.lnrpc.PayReq} returns this +*/ +proto.lnrpc.PayReq.prototype.setRouteHintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); }; /** - * optional int64 creation_time_ns = 13; - * @return {number} + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.Payment.prototype.getCreationTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.PayReq.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index); }; /** - * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setCreationTimeNs = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { + return this.setRouteHintsList([]); }; /** - * repeated HTLCAttempt htlcs = 14; - * @return {!Array} + * optional bytes payment_addr = 11; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Payment.prototype.getHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLCAttempt, 14)); +proto.lnrpc.PayReq.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.Payment} returns this -*/ -proto.lnrpc.Payment.prototype.setHtlcsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 14, value); + * 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())); }; /** - * @param {!proto.lnrpc.HTLCAttempt=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HTLCAttempt} + * 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.Payment.prototype.addHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.HTLCAttempt, opt_index); +proto.lnrpc.PayReq.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Payment} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.clearHtlcsList = function() { - return this.setHtlcsList([]); +proto.lnrpc.PayReq.prototype.setPaymentAddr = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); }; /** - * optional uint64 payment_index = 15; + * optional int64 num_m_atoms = 12; * @return {number} */ -proto.lnrpc.Payment.prototype.getPaymentIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +proto.lnrpc.PayReq.prototype.getNumMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Payment} returns this + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setPaymentIndex = function(value) { - return jspb.Message.setProto3IntField(this, 15, value); +proto.lnrpc.PayReq.prototype.setNumMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); }; /** - * optional PaymentFailureReason failure_reason = 16; - * @return {!proto.lnrpc.PaymentFailureReason} + * map features = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.Payment.prototype.getFailureReason = function() { - return /** @type {!proto.lnrpc.PaymentFailureReason} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +proto.lnrpc.PayReq.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + proto.lnrpc.Feature)); }; /** - * @param {!proto.lnrpc.PaymentFailureReason} value - * @return {!proto.lnrpc.Payment} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.PayReq} returns this */ -proto.lnrpc.Payment.prototype.setFailureReason = function(value) { - return jspb.Message.setProto3EnumField(this, 16, value); -}; +proto.lnrpc.PayReq.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); + return this;}; @@ -34660,8 +43444,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.HTLCAttempt.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.HTLCAttempt.toObject(opt_includeInstance, this); +proto.lnrpc.Feature.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Feature.toObject(opt_includeInstance, this); }; @@ -34670,18 +43454,15 @@ proto.lnrpc.HTLCAttempt.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.Feature} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HTLCAttempt.toObject = function(includeInstance, msg) { +proto.lnrpc.Feature.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() + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + isRequired: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + isKnown: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -34695,54 +43476,40 @@ proto.lnrpc.HTLCAttempt.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.HTLCAttempt} + * @return {!proto.lnrpc.Feature} */ -proto.lnrpc.HTLCAttempt.deserializeBinary = function(bytes) { +proto.lnrpc.Feature.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.HTLCAttempt; - return proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader(msg, reader); + 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.HTLCAttempt} msg The message object to deserialize into. + * @param {!proto.lnrpc.Feature} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HTLCAttempt} + * @return {!proto.lnrpc.Feature} */ -proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Feature.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); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAttemptTimeNs(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsRequired(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); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsKnown(value); break; default: reader.skipField(); @@ -34757,9 +43524,9 @@ proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.HTLCAttempt.prototype.serializeBinary = function() { +proto.lnrpc.Feature.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.HTLCAttempt.serializeBinaryToWriter(this, writer); + proto.lnrpc.Feature.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34767,235 +43534,188 @@ proto.lnrpc.HTLCAttempt.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HTLCAttempt} message + * @param {!proto.lnrpc.Feature} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HTLCAttempt.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Feature.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( + f = message.getName(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.lnrpc.Route.serializeBinaryToWriter + f ); } - f = message.getAttemptTimeNs(); - if (f !== 0) { - writer.writeInt64( + f = message.getIsRequired(); + if (f) { + writer.writeBool( 3, f ); } - f = message.getResolveTimeNs(); - if (f !== 0) { - writer.writeInt64( + f = message.getIsKnown(); + if (f) { + writer.writeBool( 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 - ); - } }; /** - * @enum {number} - */ -proto.lnrpc.HTLCAttempt.HTLCStatus = { - IN_FLIGHT: 0, - SUCCEEDED: 1, - FAILED: 2 -}; - -/** - * optional HTLCStatus status = 1; - * @return {!proto.lnrpc.HTLCAttempt.HTLCStatus} + * optional string name = 2; + * @return {string} */ -proto.lnrpc.HTLCAttempt.prototype.getStatus = function() { - return /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.Feature.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!proto.lnrpc.HTLCAttempt.HTLCStatus} value - * @return {!proto.lnrpc.HTLCAttempt} returns this + * @param {string} value + * @return {!proto.lnrpc.Feature} returns this */ -proto.lnrpc.HTLCAttempt.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.lnrpc.Feature.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional Route route = 2; - * @return {?proto.lnrpc.Route} + * optional bool is_required = 3; + * @return {boolean} */ -proto.lnrpc.HTLCAttempt.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 2)); -}; - - -/** - * @param {?proto.lnrpc.Route|undefined} value - * @return {!proto.lnrpc.HTLCAttempt} returns this -*/ -proto.lnrpc.HTLCAttempt.prototype.setRoute = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.lnrpc.Feature.prototype.getIsRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.HTLCAttempt} returns this + * @param {boolean} value + * @return {!proto.lnrpc.Feature} returns this */ -proto.lnrpc.HTLCAttempt.prototype.clearRoute = function() { - return this.setRoute(undefined); +proto.lnrpc.Feature.prototype.setIsRequired = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * Returns whether this field is set. + * optional bool is_known = 4; * @return {boolean} */ -proto.lnrpc.HTLCAttempt.prototype.hasRoute = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 attempt_time_ns = 3; - * @return {number} - */ -proto.lnrpc.HTLCAttempt.prototype.getAttemptTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.Feature.prototype.getIsKnown = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * @param {number} value - * @return {!proto.lnrpc.HTLCAttempt} returns this + * @param {boolean} value + * @return {!proto.lnrpc.Feature} returns this */ -proto.lnrpc.HTLCAttempt.prototype.setAttemptTimeNs = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.Feature.prototype.setIsKnown = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; -/** - * optional int64 resolve_time_ns = 4; - * @return {number} - */ -proto.lnrpc.HTLCAttempt.prototype.getResolveTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - -/** - * @param {number} value - * @return {!proto.lnrpc.HTLCAttempt} returns this - */ -proto.lnrpc.HTLCAttempt.prototype.setResolveTimeNs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional Failure failure = 5; - * @return {?proto.lnrpc.Failure} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.HTLCAttempt.prototype.getFailure = function() { - return /** @type{?proto.lnrpc.Failure} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Failure, 5)); -}; - - -/** - * @param {?proto.lnrpc.Failure|undefined} value - * @return {!proto.lnrpc.HTLCAttempt} returns this -*/ -proto.lnrpc.HTLCAttempt.prototype.setFailure = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeReportRequest.toObject(opt_includeInstance, this); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.HTLCAttempt} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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.HTLCAttempt.prototype.clearFailure = function() { - return this.setFailure(undefined); -}; +proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.HTLCAttempt.prototype.hasFailure = function() { - return jspb.Message.getField(this, 5) != null; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -/** - * optional bytes preimage = 6; - * @return {!(string|Uint8Array)} +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.FeeReportRequest} */ -proto.lnrpc.HTLCAttempt.prototype.getPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +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); }; /** - * optional bytes preimage = 6; - * This is a type-conversion wrapper around `getPreimage()` - * @return {string} + * 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.HTLCAttempt.prototype.getPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPreimage())); +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; }; /** - * 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()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.HTLCAttempt.prototype.getPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPreimage())); +proto.lnrpc.FeeReportRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FeeReportRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.HTLCAttempt} returns this + * 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.HTLCAttempt.prototype.setPreimage = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); +proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -35015,8 +43735,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelFeeReport.toObject(opt_includeInstance, this); }; @@ -35025,16 +43745,17 @@ proto.lnrpc.ListPaymentsRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelFeeReport} 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.ChannelFeeReport.toObject = function(includeInstance, msg) { var f, obj = { - includeIncomplete: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxPayments: jspb.Message.getFieldWithDefault(msg, 3, 0), - reversed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + chanId: jspb.Message.getFieldWithDefault(msg, 5, "0"), + channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), + baseFeeMAtoms: jspb.Message.getFieldWithDefault(msg, 2, 0), + feePerMil: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) }; if (includeInstance) { @@ -35048,44 +43769,48 @@ 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.ChannelFeeReport} */ -proto.lnrpc.ListPaymentsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelFeeReport.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.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.ListPaymentsRequest} 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.ListPaymentsRequest} + * @return {!proto.lnrpc.ChannelFeeReport} */ -proto.lnrpc.ListPaymentsRequest.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 = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeIncomplete(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChannelPoint(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setIndexOffset(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setBaseFeeMAtoms(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPayments(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeePerMil(value); break; case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReversed(value); + var value = /** @type {number} */ (reader.readDouble()); + msg.setFeeRate(value); break; default: reader.skipField(); @@ -35100,9 +43825,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.ChannelFeeReport.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35110,36 +43835,43 @@ 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.ChannelFeeReport} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncludeIncomplete(); - if (f) { - writer.writeBool( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 5, + f + ); + } + f = message.getChannelPoint(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getIndexOffset(); + f = message.getBaseFeeMAtoms(); if (f !== 0) { - writer.writeUint64( + writer.writeInt64( 2, f ); } - f = message.getMaxPayments(); + f = message.getFeePerMil(); if (f !== 0) { - writer.writeUint64( + writer.writeInt64( 3, f ); } - f = message.getReversed(); - if (f) { - writer.writeBool( + f = message.getFeeRate(); + if (f !== 0.0) { + writer.writeDouble( 4, f ); @@ -35148,74 +43880,92 @@ proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writ /** - * optional bool include_incomplete = 1; - * @return {boolean} + * optional uint64 chan_id = 5; + * @return {string} */ -proto.lnrpc.ListPaymentsRequest.prototype.getIncludeIncomplete = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.ChannelFeeReport.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this + * @param {string} value + * @return {!proto.lnrpc.ChannelFeeReport} returns this */ -proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.ChannelFeeReport.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 5, value); }; /** - * optional uint64 index_offset = 2; + * optional string channel_point = 1; + * @return {string} + */ +proto.lnrpc.ChannelFeeReport.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.ChannelFeeReport} returns this + */ +proto.lnrpc.ChannelFeeReport.prototype.setChannelPoint = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 base_fee_m_atoms = 2; * @return {number} */ -proto.lnrpc.ListPaymentsRequest.prototype.getIndexOffset = function() { +proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMAtoms = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this + * @return {!proto.lnrpc.ChannelFeeReport} returns this */ -proto.lnrpc.ListPaymentsRequest.prototype.setIndexOffset = function(value) { +proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMAtoms = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint64 max_payments = 3; + * optional int64 fee_per_mil = 3; * @return {number} */ -proto.lnrpc.ListPaymentsRequest.prototype.getMaxPayments = function() { +proto.lnrpc.ChannelFeeReport.prototype.getFeePerMil = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this + * @return {!proto.lnrpc.ChannelFeeReport} returns this */ -proto.lnrpc.ListPaymentsRequest.prototype.setMaxPayments = function(value) { +proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional bool reversed = 4; - * @return {boolean} + * optional double fee_rate = 4; + * @return {number} */ -proto.lnrpc.ListPaymentsRequest.prototype.getReversed = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.lnrpc.ChannelFeeReport.prototype.getFeeRate = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.ListPaymentsRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelFeeReport} returns this */ -proto.lnrpc.ListPaymentsRequest.prototype.setReversed = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); +proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); }; @@ -35225,7 +43975,7 @@ proto.lnrpc.ListPaymentsRequest.prototype.setReversed = function(value) { * @private {!Array} * @const */ -proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; +proto.lnrpc.FeeReportResponse.repeatedFields_ = [1]; @@ -35242,8 +43992,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.FeeReportResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeReportResponse.toObject(opt_includeInstance, this); }; @@ -35252,16 +44002,17 @@ proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. 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.FeeReportResponse} 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.FeeReportResponse.toObject = function(includeInstance, msg) { var f, obj = { - 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) + 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) { @@ -35275,23 +44026,23 @@ 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.FeeReportResponse} */ -proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.FeeReportResponse.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.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.ListPaymentsResponse} 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.ListPaymentsResponse} + * @return {!proto.lnrpc.FeeReportResponse} */ -proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35299,17 +44050,21 @@ proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Payment; - reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); - msg.addPayments(value); + 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.setFirstIndexOffset(value); + msg.setDayFeeSum(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); - msg.setLastIndexOffset(value); + msg.setWeekFeeSum(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMonthFeeSum(value); break; default: reader.skipField(); @@ -35324,9 +44079,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.FeeReportResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.FeeReportResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35334,316 +44089,165 @@ 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.FeeReportResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FeeReportResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentsList(); + f = message.getChannelFeesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.lnrpc.Payment.serializeBinaryToWriter + proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter ); } - f = message.getFirstIndexOffset(); + f = message.getDayFeeSum(); if (f !== 0) { writer.writeUint64( 2, f ); } - f = message.getLastIndexOffset(); + f = message.getWeekFeeSum(); if (f !== 0) { writer.writeUint64( 3, f ); } + f = message.getMonthFeeSum(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } }; /** - * repeated Payment payments = 1; - * @return {!Array} + * repeated ChannelFeeReport channel_fees = 1; + * @return {!Array} */ -proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); +proto.lnrpc.FeeReportResponse.prototype.getChannelFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelFeeReport, 1)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ListPaymentsResponse} returns this + * @param {!Array} value + * @return {!proto.lnrpc.FeeReportResponse} returns this */ -proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { +proto.lnrpc.FeeReportResponse.prototype.setChannelFeesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.Payment=} opt_value + * @param {!proto.lnrpc.ChannelFeeReport=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.Payment} + * @return {!proto.lnrpc.ChannelFeeReport} */ -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.FeeReportResponse.prototype.addChannelFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelFeeReport, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListPaymentsResponse} returns this + * @return {!proto.lnrpc.FeeReportResponse} returns this */ -proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { - return this.setPaymentsList([]); +proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { + return this.setChannelFeesList([]); }; /** - * optional uint64 first_index_offset = 2; + * optional uint64 day_fee_sum = 2; * @return {number} */ -proto.lnrpc.ListPaymentsResponse.prototype.getFirstIndexOffset = function() { +proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListPaymentsResponse} returns this + * @return {!proto.lnrpc.FeeReportResponse} returns this */ -proto.lnrpc.ListPaymentsResponse.prototype.setFirstIndexOffset = function(value) { +proto.lnrpc.FeeReportResponse.prototype.setDayFeeSum = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint64 last_index_offset = 3; + * optional uint64 week_fee_sum = 3; * @return {number} */ -proto.lnrpc.ListPaymentsResponse.prototype.getLastIndexOffset = function() { +proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ListPaymentsResponse} returns this + * @return {!proto.lnrpc.FeeReportResponse} returns this */ -proto.lnrpc.ListPaymentsResponse.prototype.setLastIndexOffset = function(value) { +proto.lnrpc.FeeReportResponse.prototype.setWeekFeeSum = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. 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); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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.DeleteAllPaymentsRequest.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.DeleteAllPaymentsRequest} - */ -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); -}; - - -/** - * 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; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsRequest.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.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; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint64 month_fee_sum = 4; + * @return {number} */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteAllPaymentsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.FeeReportResponse.prototype.getMonthFeeSum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 {number} value + * @return {!proto.lnrpc.FeeReportResponse} returns this */ -proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; -} - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} - */ -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); -}; /** - * 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} + * 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.DeleteAllPaymentsResponse.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.oneofGroups_ = [[1,2]]; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @enum {number} */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.PolicyUpdateRequest.ScopeCase = { + SCOPE_NOT_SET: 0, + GLOBAL: 1, + CHAN_POINT: 2 }; - /** - * 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 + * @return {proto.lnrpc.PolicyUpdateRequest.ScopeCase} */ -proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +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) { /** * Creates an object representation of this proto. @@ -35657,8 +44261,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); }; @@ -35667,14 +44271,21 @@ proto.lnrpc.AbandonChannelRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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), - pendingFundingShimOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + global: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + baseFeeMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + feeRatePpm: jspb.Message.getFieldWithDefault(msg, 9, 0), + timeLockDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), + minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), + minHtlcMAtomsSpecified: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -35688,23 +44299,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; @@ -35712,13 +44323,41 @@ 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 2: + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBaseFeeMAtoms(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFeeRate(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeRatePpm(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeLockDelta(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxHtlcMAtoms(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinHtlcMAtoms(value); + break; + case 8: var value = /** @type {boolean} */ (reader.readBool()); - msg.setPendingFundingShimOnly(value); + msg.setMinHtlcMAtomsSpecified(value); break; default: reader.skipField(); @@ -35733,9 +44372,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(); }; @@ -35743,24 +44382,73 @@ 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.getPendingFundingShimOnly(); + f = message.getBaseFeeMAtoms(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFeeRate(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getFeeRatePpm(); + if (f !== 0) { + writer.writeUint32( + 9, + f + ); + } + f = message.getTimeLockDelta(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getMaxHtlcMAtoms(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMinHtlcMAtoms(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getMinHtlcMAtomsSpecified(); if (f) { writer.writeBool( - 2, + 8, f ); } @@ -35768,30 +44456,29 @@ proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter = function(message, wr /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * optional bool global = 1; + * @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.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.AbandonChannelRequest} returns this -*/ -proto.lnrpc.AbandonChannelRequest.prototype.setChannelPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {boolean} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + */ +proto.lnrpc.PolicyUpdateRequest.prototype.setGlobal = function(value) { + return jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.AbandonChannelRequest} returns this + * Clears the field making it undefined. + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -proto.lnrpc.AbandonChannelRequest.prototype.clearChannelPoint = function() { - return this.setChannelPoint(undefined); +proto.lnrpc.PolicyUpdateRequest.prototype.clearGlobal = function() { + return jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], undefined); }; @@ -35799,287 +44486,171 @@ 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; }; /** - * optional bool pending_funding_shim_only = 2; - * @return {boolean} + * optional ChannelPoint chan_point = 2; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.AbandonChannelRequest.prototype.getPendingFundingShimOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.AbandonChannelRequest} returns this - */ -proto.lnrpc.AbandonChannelRequest.prototype.setPendingFundingShimOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this +*/ +proto.lnrpc.PolicyUpdateRequest.prototype.setChanPoint = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -proto.lnrpc.AbandonChannelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AbandonChannelResponse.toObject(opt_includeInstance, this); +proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { + return this.setChanPoint(undefined); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.AbandonChannelResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AbandonChannelResponse} + * optional int64 base_fee_m_atoms = 3; + * @return {number} */ -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.getBaseFeeMAtoms = 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.AbandonChannelResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AbandonChannelResponse} + * @param {number} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -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.setBaseFeeMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional double fee_rate = 4; + * @return {number} */ -proto.lnrpc.AbandonChannelResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRate = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); }; /** - * 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 + * @param {number} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRate = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint32 fee_rate_ppm = 9; + * @return {number} */ -proto.lnrpc.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DebugLevelRequest.toObject(opt_includeInstance, this); +proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRatePpm = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * @param {number} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -proto.lnrpc.DebugLevelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - show: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRatePpm = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DebugLevelRequest} + * optional uint32 time_lock_delta = 5; + * @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.getTimeLockDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.DebugLevelRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelRequest} + * @param {number} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -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; +proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 max_htlc_m_atoms = 6; + * @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.getMaxHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 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 + * @param {number} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -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 - ); - } +proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional bool show = 1; - * @return {boolean} + * optional uint64 min_htlc_m_atoms = 7; + * @return {number} */ -proto.lnrpc.DebugLevelRequest.prototype.getShow = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.DebugLevelRequest} returns this + * @param {number} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -proto.lnrpc.DebugLevelRequest.prototype.setShow = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional string level_spec = 2; - * @return {string} + * optional bool min_htlc_m_atoms_specified = 8; + * @return {boolean} */ -proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMAtomsSpecified = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; /** - * @param {string} value - * @return {!proto.lnrpc.DebugLevelRequest} returns this + * @param {boolean} value + * @return {!proto.lnrpc.PolicyUpdateRequest} returns this */ -proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMAtomsSpecified = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -36099,8 +44670,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.FailedUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FailedUpdate.toObject(opt_includeInstance, this); }; @@ -36109,13 +44680,15 @@ proto.lnrpc.DebugLevelResponse.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.FailedUpdate} 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.FailedUpdate.toObject = function(includeInstance, msg) { var f, obj = { - subSystems: jspb.Message.getFieldWithDefault(msg, 1, "") + outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), + reason: jspb.Message.getFieldWithDefault(msg, 2, 0), + updateError: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -36129,23 +44702,23 @@ 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.FailedUpdate} */ -proto.lnrpc.DebugLevelResponse.deserializeBinary = function(bytes) { +proto.lnrpc.FailedUpdate.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.FailedUpdate; + return proto.lnrpc.FailedUpdate.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.FailedUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelResponse} + * @return {!proto.lnrpc.FailedUpdate} */ -proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FailedUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36153,8 +44726,17 @@ proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: + var value = new proto.lnrpc.OutPoint; + reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); + msg.setOutpoint(value); + break; + case 2: + var value = /** @type {!proto.lnrpc.UpdateFailure} */ (reader.readEnum()); + msg.setReason(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); - msg.setSubSystems(value); + msg.setUpdateError(value); break; default: reader.skipField(); @@ -36169,9 +44751,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.FailedUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.FailedUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36179,16 +44761,31 @@ 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.FailedUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FailedUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSubSystems(); + f = message.getOutpoint(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.OutPoint.serializeBinaryToWriter + ); + } + f = message.getReason(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getUpdateError(); if (f.length > 0) { writer.writeString( - 1, + 3, f ); } @@ -36196,24 +44793,86 @@ proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter = function(message, write /** - * optional string sub_systems = 1; + * optional OutPoint outpoint = 1; + * @return {?proto.lnrpc.OutPoint} + */ +proto.lnrpc.FailedUpdate.prototype.getOutpoint = function() { + return /** @type{?proto.lnrpc.OutPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 1)); +}; + + +/** + * @param {?proto.lnrpc.OutPoint|undefined} value + * @return {!proto.lnrpc.FailedUpdate} returns this +*/ +proto.lnrpc.FailedUpdate.prototype.setOutpoint = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.FailedUpdate} returns this + */ +proto.lnrpc.FailedUpdate.prototype.clearOutpoint = function() { + return this.setOutpoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.FailedUpdate.prototype.hasOutpoint = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional UpdateFailure reason = 2; + * @return {!proto.lnrpc.UpdateFailure} + */ +proto.lnrpc.FailedUpdate.prototype.getReason = function() { + return /** @type {!proto.lnrpc.UpdateFailure} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.lnrpc.UpdateFailure} value + * @return {!proto.lnrpc.FailedUpdate} returns this + */ +proto.lnrpc.FailedUpdate.prototype.setReason = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional string update_error = 3; * @return {string} */ -proto.lnrpc.DebugLevelResponse.prototype.getSubSystems = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.FailedUpdate.prototype.getUpdateError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.DebugLevelResponse} returns this + * @return {!proto.lnrpc.FailedUpdate} returns this */ -proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.FailedUpdate.prototype.setUpdateError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.PolicyUpdateResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -36229,8 +44888,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.PolicyUpdateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PolicyUpdateResponse.toObject(opt_includeInstance, this); }; @@ -36239,13 +44898,14 @@ proto.lnrpc.PayReqString.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.PolicyUpdateResponse} 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.PolicyUpdateResponse.toObject = function(includeInstance, msg) { var f, obj = { - payReq: jspb.Message.getFieldWithDefault(msg, 1, "") + failedUpdatesList: jspb.Message.toObjectList(msg.getFailedUpdatesList(), + proto.lnrpc.FailedUpdate.toObject, includeInstance) }; if (includeInstance) { @@ -36259,23 +44919,23 @@ 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.PolicyUpdateResponse} */ -proto.lnrpc.PayReqString.deserializeBinary = function(bytes) { +proto.lnrpc.PolicyUpdateResponse.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.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.PayReqString} 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.PayReqString} + * @return {!proto.lnrpc.PolicyUpdateResponse} */ -proto.lnrpc.PayReqString.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36283,8 +44943,9 @@ proto.lnrpc.PayReqString.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPayReq(value); + var value = new proto.lnrpc.FailedUpdate; + reader.readMessage(value,proto.lnrpc.FailedUpdate.deserializeBinaryFromReader); + msg.addFailedUpdates(value); break; default: reader.skipField(); @@ -36299,9 +44960,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.PolicyUpdateResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PayReqString.serializeBinaryToWriter(this, writer); + proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36309,47 +44970,61 @@ 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.PolicyUpdateResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PayReqString.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPayReq(); + f = message.getFailedUpdatesList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.FailedUpdate.serializeBinaryToWriter ); } }; /** - * optional string pay_req = 1; - * @return {string} + * repeated FailedUpdate failed_updates = 1; + * @return {!Array} */ -proto.lnrpc.PayReqString.prototype.getPayReq = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PolicyUpdateResponse.prototype.getFailedUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.FailedUpdate, 1)); }; /** - * @param {string} value - * @return {!proto.lnrpc.PayReqString} returns this - */ -proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {!Array} value + * @return {!proto.lnrpc.PolicyUpdateResponse} returns this +*/ +proto.lnrpc.PolicyUpdateResponse.prototype.setFailedUpdatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; +/** + * @param {!proto.lnrpc.FailedUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.FailedUpdate} + */ +proto.lnrpc.PolicyUpdateResponse.prototype.addFailedUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.FailedUpdate, opt_index); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.PolicyUpdateResponse} returns this */ -proto.lnrpc.PayReq.repeatedFields_ = [10]; +proto.lnrpc.PolicyUpdateResponse.prototype.clearFailedUpdatesList = function() { + return this.setFailedUpdatesList([]); +}; + + @@ -36366,8 +45041,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ForwardingHistoryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ForwardingHistoryRequest.toObject(opt_includeInstance, this); }; @@ -36376,26 +45051,16 @@ proto.lnrpc.PayReq.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ForwardingHistoryRequest} 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.ForwardingHistoryRequest.toObject = function(includeInstance, msg) { var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - numAtoms: 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(), - numMAtoms: jspb.Message.getFieldWithDefault(msg, 12, 0), - featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] + 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) { @@ -36409,23 +45074,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.ForwardingHistoryRequest} */ -proto.lnrpc.PayReq.deserializeBinary = function(bytes) { +proto.lnrpc.ForwardingHistoryRequest.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.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.PayReq} 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.PayReq} + * @return {!proto.lnrpc.ForwardingHistoryRequest} */ -proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36433,59 +45098,20 @@ 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.setStartTime(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndTime(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumAtoms(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndexOffset(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setDescriptionHash(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCltvExpiry(value); - break; - case 10: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentAddr(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumMAtoms(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, new proto.lnrpc.Feature()); - }); + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumMaxEvents(value); break; default: reader.skipField(); @@ -36500,9 +45126,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.ForwardingHistoryRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PayReq.serializeBinaryToWriter(this, writer); + proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36510,384 +45136,113 @@ 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.ForwardingHistoryRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( + f = message.getStartTime(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getPaymentHash(); - if (f.length > 0) { - writer.writeString( + f = message.getEndTime(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getNumAtoms(); + f = message.getIndexOffset(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 3, f ); } - f = message.getTimestamp(); + f = message.getNumMaxEvents(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 4, f ); } - f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getDescriptionHash(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPaymentAddr_asU8(); - if (f.length > 0) { - writer.writeBytes( - 11, - f - ); - } - f = message.getNumMAtoms(); - 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); - } -}; - - -/** - * optional string destination = 1; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string payment_hash = 2; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 num_atoms = 3; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getNumAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setNumAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 timestamp = 4; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 expiry = 5; + * optional uint64 start_time = 1; * @return {number} */ -proto.lnrpc.PayReq.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ForwardingHistoryRequest.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string description = 6; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string description_hash = 7; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getDescriptionHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setDescriptionHash = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string fallback_addr = 8; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.PayReq} returns this + * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this */ -proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional int64 cltv_expiry = 9; + * optional uint64 end_time = 2; * @return {number} */ -proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.ForwardingHistoryRequest.prototype.getEndTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { - return 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 - * @return {!proto.lnrpc.PayReq} returns this -*/ -proto.lnrpc.PayReq.prototype.setRouteHintsList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.PayReq} returns this - */ -proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { - return 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 - * @return {!proto.lnrpc.PayReq} returns this + * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this */ -proto.lnrpc.PayReq.prototype.setPaymentAddr = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); +proto.lnrpc.ForwardingHistoryRequest.prototype.setEndTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int64 num_m_atoms = 12; + * optional uint32 index_offset = 3; * @return {number} */ -proto.lnrpc.PayReq.prototype.getNumMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.ForwardingHistoryRequest.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.PayReq} returns this + * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this */ -proto.lnrpc.PayReq.prototype.setNumMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); +proto.lnrpc.ForwardingHistoryRequest.prototype.setIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * map features = 13; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional uint32 num_max_events = 4; + * @return {number} */ -proto.lnrpc.PayReq.prototype.getFeaturesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 13, opt_noLazyCreate, - proto.lnrpc.Feature)); +proto.lnrpc.ForwardingHistoryRequest.prototype.getNumMaxEvents = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.PayReq} returns this + * @param {number} value + * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this */ -proto.lnrpc.PayReq.prototype.clearFeaturesMap = function() { - this.getFeaturesMap().clear(); - return this;}; +proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; @@ -36906,8 +45261,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Feature.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Feature.toObject(opt_includeInstance, this); +proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ForwardingEvent.toObject(opt_includeInstance, this); }; @@ -36916,15 +45271,22 @@ proto.lnrpc.Feature.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.ForwardingEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Feature.toObject = function(includeInstance, msg) { +proto.lnrpc.ForwardingEvent.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - isRequired: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - isKnown: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + 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), + feeMAtoms: jspb.Message.getFieldWithDefault(msg, 8, 0), + amtInMAtoms: jspb.Message.getFieldWithDefault(msg, 9, 0), + amtOutMAtoms: jspb.Message.getFieldWithDefault(msg, 10, 0), + timestampNs: jspb.Message.getFieldWithDefault(msg, 11, 0) }; if (includeInstance) { @@ -36938,40 +45300,68 @@ proto.lnrpc.Feature.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Feature} + * @return {!proto.lnrpc.ForwardingEvent} */ -proto.lnrpc.Feature.deserializeBinary = function(bytes) { +proto.lnrpc.ForwardingEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Feature; - return proto.lnrpc.Feature.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.Feature} 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.Feature} + * @return {!proto.lnrpc.ForwardingEvent} */ -proto.lnrpc.Feature.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ForwardingEvent.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); + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsRequired(value); + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanIdIn(value); break; case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsKnown(value); + var value = /** @type {string} */ (reader.readUint64String()); + 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.setFeeMAtoms(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtInMAtoms(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtOutMAtoms(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestampNs(value); break; default: reader.skipField(); @@ -36986,9 +45376,9 @@ proto.lnrpc.Feature.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Feature.prototype.serializeBinary = function() { +proto.lnrpc.ForwardingEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Feature.serializeBinaryToWriter(this, writer); + proto.lnrpc.ForwardingEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36996,192 +45386,273 @@ proto.lnrpc.Feature.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Feature} message + * @param {!proto.lnrpc.ForwardingEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Feature.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 1, f ); } - f = message.getIsRequired(); - if (f) { - writer.writeBool( - 3, + f = message.getChanIdIn(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, f ); } - f = message.getIsKnown(); - if (f) { - writer.writeBool( + f = message.getChanIdOut(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 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.getFeeMAtoms(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getAmtInMAtoms(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getAmtOutMAtoms(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getTimestampNs(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } }; /** - * optional string name = 2; + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.lnrpc.ForwardingEvent.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this + */ +proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 chan_id_in = 2; * @return {string} */ -proto.lnrpc.Feature.prototype.getName = 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 - * @return {!proto.lnrpc.Feature} returns this + * @return {!proto.lnrpc.ForwardingEvent} returns this */ -proto.lnrpc.Feature.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ForwardingEvent.prototype.setChanIdIn = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); }; /** - * optional bool is_required = 3; - * @return {boolean} + * optional uint64 chan_id_out = 4; + * @return {string} */ -proto.lnrpc.Feature.prototype.getIsRequired = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.lnrpc.ForwardingEvent.prototype.getChanIdOut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Feature} returns this + * @param {string} value + * @return {!proto.lnrpc.ForwardingEvent} returns this */ -proto.lnrpc.Feature.prototype.setIsRequired = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { + return jspb.Message.setProto3StringIntField(this, 4, value); }; /** - * optional bool is_known = 4; - * @return {boolean} + * optional uint64 amt_in = 5; + * @return {number} */ -proto.lnrpc.Feature.prototype.getIsKnown = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.Feature} returns this + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this */ -proto.lnrpc.Feature.prototype.setIsKnown = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); +proto.lnrpc.ForwardingEvent.prototype.setAmtIn = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; +/** + * optional uint64 amt_out = 6; + * @return {number} + */ +proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + +/** + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this + */ +proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint64 fee = 7; + * @return {number} */ -proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeReportRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ForwardingEvent.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. 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 + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this */ -proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * optional uint64 fee_m_atoms = 8; + * @return {number} + */ +proto.lnrpc.ForwardingEvent.prototype.getFeeMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeReportRequest} + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this */ -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); +proto.lnrpc.ForwardingEvent.prototype.setFeeMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * 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} + * optional uint64 amt_in_m_atoms = 9; + * @return {number} */ -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; +proto.lnrpc.ForwardingEvent.prototype.getAmtInMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this */ -proto.lnrpc.FeeReportRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ForwardingEvent.prototype.setAmtInMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * 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 + * optional uint64 amt_out_m_atoms = 10; + * @return {number} */ -proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ForwardingEvent.prototype.getAmtOutMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this + */ +proto.lnrpc.ForwardingEvent.prototype.setAmtOutMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint64 timestamp_ns = 11; + * @return {number} + */ +proto.lnrpc.ForwardingEvent.prototype.getTimestampNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.ForwardingEvent} returns this + */ +proto.lnrpc.ForwardingEvent.prototype.setTimestampNs = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -37197,8 +45668,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); }; @@ -37207,17 +45678,15 @@ proto.lnrpc.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. 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 = { - chanId: jspb.Message.getFieldWithDefault(msg, 5, "0"), - channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - baseFeeMAtoms: jspb.Message.getFieldWithDefault(msg, 2, 0), - feePerMil: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + forwardingEventsList: jspb.Message.toObjectList(msg.getForwardingEventsList(), + proto.lnrpc.ForwardingEvent.toObject, includeInstance), + lastOffsetIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -37231,48 +45700,37 @@ 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; } var field = reader.getFieldNumber(); switch (field) { - case 5: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(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.setBaseFeeMAtoms(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(); @@ -37287,9 +45745,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(); }; @@ -37297,148 +45755,87 @@ 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.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 5, - f - ); - } - f = message.getChannelPoint(); + f = message.getForwardingEventsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.ForwardingEvent.serializeBinaryToWriter ); } - f = message.getBaseFeeMAtoms(); + 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 uint64 chan_id = 5; - * @return {string} - */ -proto.lnrpc.ChannelFeeReport.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 5, value); -}; - - -/** - * optional string channel_point = 1; - * @return {string} - */ -proto.lnrpc.ChannelFeeReport.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this - */ -proto.lnrpc.ChannelFeeReport.prototype.setChannelPoint = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 base_fee_m_atoms = 2; - * @return {number} - */ -proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this + * repeated ForwardingEvent forwarding_events = 1; + * @return {!Array} */ -proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); }; /** - * optional int64 fee_per_mil = 3; - * @return {number} + * @param {!Array} value + * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this +*/ +proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @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 - * @return {!proto.lnrpc.ChannelFeeReport} returns this + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this */ -proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ForwardingHistoryResponse.prototype.clearForwardingEventsList = function() { + return 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.getFloatingPointFieldWithDefault(this, 4, 0.0)); +proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelFeeReport} returns this + * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this */ -proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); +proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.FeeReportResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -37454,8 +45851,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); }; @@ -37464,17 +45861,13 @@ proto.lnrpc.FeeReportResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. 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) { @@ -37488,23 +45881,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; @@ -37512,21 +45905,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(); @@ -37541,9 +45922,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(); }; @@ -37551,163 +45932,61 @@ 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} + * optional ChannelPoint chan_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.FeeReportResponse.prototype.getChannelFeesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelFeeReport, 1)); +proto.lnrpc.ExportChannelBackupRequest.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.FeeReportResponse} returns this + * @param {?proto.lnrpc.ChannelPoint|undefined} value + * @return {!proto.lnrpc.ExportChannelBackupRequest} returns this */ -proto.lnrpc.FeeReportResponse.prototype.setChannelFeesList = function(value) { - return 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); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { - return this.setChannelFeesList([]); -}; - - -/** - * optional uint64 day_fee_sum = 2; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.setDayFeeSum = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 week_fee_sum = 3; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.FeeReportResponse} returns this - */ -proto.lnrpc.FeeReportResponse.prototype.setWeekFeeSum = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.setChanPoint = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional uint64 month_fee_sum = 4; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ExportChannelBackupRequest} returns this */ -proto.lnrpc.FeeReportResponse.prototype.getMonthFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ExportChannelBackupRequest.prototype.clearChanPoint = function() { + return this.setChanPoint(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.FeeReportResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * 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) { @@ -37723,8 +46002,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); }; @@ -37733,20 +46012,14 @@ proto.lnrpc.PolicyUpdateRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.getBooleanFieldWithDefault(msg, 1, false), chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - baseFeeMAtoms: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 6, 0), - minHtlcMAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), - minHtlcMAtomsSpecified: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + chanBackup: msg.getChanBackup_asB64() }; if (includeInstance) { @@ -37760,23 +46033,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; @@ -37784,37 +46057,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.setBaseFeeMAtoms(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.setMaxHtlcMAtoms(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlcMAtoms(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setMinHtlcMAtomsSpecified(value); + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChanBackup(value); break; default: reader.skipField(); @@ -37829,9 +46078,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(); }; @@ -37839,66 +46088,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.getBaseFeeMAtoms(); - 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.getMaxHtlcMAtoms(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getMinHtlcMAtoms(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getMinHtlcMAtomsSpecified(); - if (f) { - writer.writeBool( - 8, + f = message.getChanBackup_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, f ); } @@ -37906,183 +46113,396 @@ proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writ /** - * optional bool global = 1; + * optional ChannelPoint chan_point = 1; + * @return {?proto.lnrpc.ChannelPoint} + */ +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 + * @return {!proto.lnrpc.ChannelBackup} returns this +*/ +proto.lnrpc.ChannelBackup.prototype.setChanPoint = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChannelBackup} returns this + */ +proto.lnrpc.ChannelBackup.prototype.clearChanPoint = function() { + return this.setChanPoint(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getGlobal = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.ChannelBackup.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes chan_backup = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelBackup.prototype.getChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * 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 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.ChannelBackup.prototype.getChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChanBackup())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelBackup} returns this + */ +proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.MultiChanBackup.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.MultiChanBackup} + */ +proto.lnrpc.MultiChanBackup.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.MultiChanBackup; + return proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader(msg, reader); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.MultiChanBackup} */ -proto.lnrpc.PolicyUpdateRequest.prototype.setGlobal = function(value) { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); +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; + } + } + return msg; }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.PolicyUpdateRequest.prototype.clearGlobal = function() { - return jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], undefined); +proto.lnrpc.MultiChanBackup.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.MultiChanBackup.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.MultiChanBackup} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasGlobal = function() { - return jspb.Message.getField(this, 1) != null; +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 + ); + } }; /** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} + * repeated ChannelPoint chan_points = 1; + * @return {!Array} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); +proto.lnrpc.MultiChanBackup.prototype.getChanPointsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; /** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * @param {!Array} value + * @return {!proto.lnrpc.MultiChanBackup} returns this */ -proto.lnrpc.PolicyUpdateRequest.prototype.setChanPoint = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); +proto.lnrpc.MultiChanBackup.prototype.setChanPointsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * @param {!proto.lnrpc.ChannelPoint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelPoint} */ -proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); +proto.lnrpc.MultiChanBackup.prototype.addChanPoints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelPoint, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.MultiChanBackup} returns this */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.MultiChanBackup.prototype.clearChanPointsList = function() { + return this.setChanPointsList([]); }; /** - * optional int64 base_fee_m_atoms = 3; - * @return {number} + * optional bytes multi_chan_backup = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getBaseFeeMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * optional bytes multi_chan_backup = 2; + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {string} */ -proto.lnrpc.PolicyUpdateRequest.prototype.setBaseFeeMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMultiChanBackup())); }; /** - * optional double fee_rate = 4; - * @return {number} + * optional bytes multi_chan_backup = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {!Uint8Array} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMultiChanBackup())); }; /** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.MultiChanBackup} returns this */ -proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3FloatField(this, 4, value); +proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; -/** - * optional uint32 time_lock_delta = 5; - * @return {number} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ChanBackupExportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanBackupExportRequest.toObject(opt_includeInstance, this); }; /** - * optional uint64 max_htlc_m_atoms = 6; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateRequest.prototype.getMaxHtlcMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; +proto.lnrpc.ChanBackupExportRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this - */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 min_htlc_m_atoms = 7; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChanBackupExportRequest} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.ChanBackupExportRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChanBackupExportRequest; + return proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChanBackupExportRequest} */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.ChanBackupExportRequest.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 min_htlc_m_atoms_specified = 8; - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMAtomsSpecified = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.lnrpc.ChanBackupExportRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.PolicyUpdateRequest} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ChanBackupExportRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMAtomsSpecified = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -38102,8 +46522,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChanBackupSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanBackupSnapshot.toObject(opt_includeInstance, this); }; @@ -38112,13 +46532,14 @@ proto.lnrpc.PolicyUpdateResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. 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.ChanBackupSnapshot} 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.ChanBackupSnapshot.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) }; if (includeInstance) { @@ -38132,29 +46553,39 @@ 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.ChanBackupSnapshot} */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChanBackupSnapshot.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.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.PolicyUpdateResponse} 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.PolicyUpdateResponse} + * @return {!proto.lnrpc.ChanBackupSnapshot} */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = 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); + break; default: reader.skipField(); break; @@ -38168,9 +46599,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.ChanBackupSnapshot.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38178,16 +46609,113 @@ 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.ChanBackupSnapshot} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getSingleChanBackups(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.ChannelBackups.serializeBinaryToWriter + ); + } + f = message.getMultiChanBackup(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.lnrpc.MultiChanBackup.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ChannelBackups single_chan_backups = 1; + * @return {?proto.lnrpc.ChannelBackups} + */ +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 + * @return {!proto.lnrpc.ChanBackupSnapshot} returns this +*/ +proto.lnrpc.ChanBackupSnapshot.prototype.setSingleChanBackups = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChanBackupSnapshot} returns this + */ +proto.lnrpc.ChanBackupSnapshot.prototype.clearSingleChanBackups = function() { + return this.setSingleChanBackups(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChanBackupSnapshot.prototype.hasSingleChanBackups = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional MultiChanBackup multi_chan_backup = 2; + * @return {?proto.lnrpc.MultiChanBackup} + */ +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 + * @return {!proto.lnrpc.ChanBackupSnapshot} returns this +*/ +proto.lnrpc.ChanBackupSnapshot.prototype.setMultiChanBackup = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.ChanBackupSnapshot} returns this + */ +proto.lnrpc.ChanBackupSnapshot.prototype.clearMultiChanBackup = function() { + return this.setMultiChanBackup(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { + return jspb.Message.getField(this, 2) != null; }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ChannelBackups.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -38203,8 +46731,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelBackups.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackups.toObject(opt_includeInstance, this); }; @@ -38213,16 +46741,14 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelBackups} 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.ChannelBackups.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) + chanBackupsList: jspb.Message.toObjectList(msg.getChanBackupsList(), + proto.lnrpc.ChannelBackup.toObject, includeInstance) }; if (includeInstance) { @@ -38236,23 +46762,23 @@ 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.ChannelBackups} */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBackups.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.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.ForwardingHistoryRequest} 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.ForwardingHistoryRequest} + * @return {!proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38260,20 +46786,9 @@ proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, 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); + var value = new proto.lnrpc.ChannelBackup; + reader.readMessage(value,proto.lnrpc.ChannelBackup.deserializeBinaryFromReader); + msg.addChanBackups(value); break; default: reader.skipField(); @@ -38288,9 +46803,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.ChannelBackups.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBackups.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38298,118 +46813,90 @@ 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.ChannelBackups} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBackups.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getChanBackupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 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 + f, + proto.lnrpc.ChannelBackup.serializeBinaryToWriter ); } }; /** - * 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 - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this + * repeated ChannelBackup chan_backups = 1; + * @return {!Array} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.ChannelBackups.prototype.getChanBackupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelBackup, 1)); }; /** - * optional uint64 end_time = 2; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + * @param {!Array} value + * @return {!proto.lnrpc.ChannelBackups} returns this +*/ +proto.lnrpc.ChannelBackups.prototype.setChanBackupsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this + * @param {!proto.lnrpc.ChannelBackup=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelBackup} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setEndTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ChannelBackups.prototype.addChanBackups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelBackup, opt_index); }; /** - * optional uint32 index_offset = 3; - * @return {number} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.ChannelBackups} returns this */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { + return this.setChanBackupsList([]); }; + /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this + * 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.ForwardingHistoryRequest.prototype.setIndexOffset = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - +proto.lnrpc.RestoreChanBackupRequest.oneofGroups_ = [[1,2]]; /** - * optional uint32 num_max_events = 4; - * @return {number} + * @enum {number} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getNumMaxEvents = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.RestoreChanBackupRequest.BackupCase = { + BACKUP_NOT_SET: 0, + CHAN_BACKUPS: 1, + MULTI_CHAN_BACKUP: 2 }; - /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryRequest} returns this + * @return {proto.lnrpc.RestoreChanBackupRequest.BackupCase} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +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) { /** * Creates an object representation of this proto. @@ -38423,8 +46910,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.RestoreChanBackupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RestoreChanBackupRequest.toObject(opt_includeInstance, this); }; @@ -38433,21 +46920,14 @@ proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.RestoreChanBackupRequest} 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.RestoreChanBackupRequest.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), - feeMAtoms: jspb.Message.getFieldWithDefault(msg, 8, 0), - amtInMAtoms: jspb.Message.getFieldWithDefault(msg, 9, 0), - amtOutMAtoms: jspb.Message.getFieldWithDefault(msg, 10, 0) + chanBackups: (f = msg.getChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), + multiChanBackup: msg.getMultiChanBackup_asB64() }; if (includeInstance) { @@ -38461,23 +46941,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.RestoreChanBackupRequest} */ -proto.lnrpc.ForwardingEvent.deserializeBinary = function(bytes) { +proto.lnrpc.RestoreChanBackupRequest.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.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.ForwardingEvent} 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.ForwardingEvent} + * @return {!proto.lnrpc.RestoreChanBackupRequest} */ -proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38485,40 +46965,13 @@ 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.setChanBackups(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanIdIn(value); - break; - case 4: - var value = /** @type {string} */ (reader.readUint64String()); - 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.setFeeMAtoms(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtInMAtoms(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtOutMAtoms(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMultiChanBackup(value); break; default: reader.skipField(); @@ -38533,9 +46986,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.RestoreChanBackupRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter(this, writer); + proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38543,248 +46996,229 @@ 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.RestoreChanBackupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + f = message.getChanBackups(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.ChannelBackups.serializeBinaryToWriter ); } - f = message.getChanIdIn(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( 2, f ); } - f = message.getChanIdOut(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 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.getFeeMAtoms(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getAmtInMAtoms(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getAmtOutMAtoms(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } }; /** - * optional uint64 timestamp = 1; - * @return {number} + * optional ChannelBackups chan_backups = 1; + * @return {?proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingEvent.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.RestoreChanBackupRequest.prototype.getChanBackups = function() { + return /** @type{?proto.lnrpc.ChannelBackups} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); + * @param {?proto.lnrpc.ChannelBackups|undefined} value + * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this +*/ +proto.lnrpc.RestoreChanBackupRequest.prototype.setChanBackups = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); }; /** - * optional uint64 chan_id_in = 2; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this */ -proto.lnrpc.ForwardingEvent.prototype.getChanIdIn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { + return this.setChanBackups(undefined); }; /** - * @param {string} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ForwardingEvent.prototype.setChanIdIn = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); +proto.lnrpc.RestoreChanBackupRequest.prototype.hasChanBackups = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint64 chan_id_out = 4; - * @return {string} + * optional bytes multi_chan_backup = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ForwardingEvent.prototype.getChanIdOut = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {string} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * optional bytes multi_chan_backup = 2; + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {string} */ -proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { - return jspb.Message.setProto3StringIntField(this, 4, value); +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMultiChanBackup())); }; /** - * optional uint64 amt_in = 5; - * @return {number} + * optional bytes multi_chan_backup = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {!Uint8Array} */ -proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMultiChanBackup())); }; /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this */ -proto.lnrpc.ForwardingEvent.prototype.setAmtIn = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.RestoreChanBackupRequest.prototype.setMultiChanBackup = function(value) { + return jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); }; /** - * optional uint64 amt_out = 6; - * @return {number} + * Clears the field making it undefined. + * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this */ -proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.RestoreChanBackupRequest.prototype.clearMultiChanBackup = function() { + return jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.RestoreChanBackupRequest.prototype.hasMultiChanBackup = function() { + return jspb.Message.getField(this, 2) != null; }; -/** - * optional uint64 fee = 7; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.RestoreBackupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RestoreBackupResponse.toObject(opt_includeInstance, this); }; /** - * optional uint64 fee_m_atoms = 8; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. 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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingEvent.prototype.getFeeMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; +proto.lnrpc.RestoreBackupResponse.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this - */ -proto.lnrpc.ForwardingEvent.prototype.setFeeMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 amt_in_m_atoms = 9; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.RestoreBackupResponse} */ -proto.lnrpc.ForwardingEvent.prototype.getAmtInMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.RestoreBackupResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.RestoreBackupResponse; + return proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.RestoreBackupResponse} */ -proto.lnrpc.ForwardingEvent.prototype.setAmtInMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 amt_out_m_atoms = 10; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ForwardingEvent.prototype.getAmtOutMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.RestoreBackupResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.ForwardingEvent} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.RestoreBackupResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingEvent.prototype.setAmtOutMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -38800,8 +47234,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ChannelBackupSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackupSubscription.toObject(opt_includeInstance, this); }; @@ -38810,15 +47244,13 @@ proto.lnrpc.ForwardingHistoryResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. 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.ChannelBackupSubscription} 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.ChannelBackupSubscription.toObject = function(includeInstance, msg) { var f, obj = { - forwardingEventsList: jspb.Message.toObjectList(msg.getForwardingEventsList(), - proto.lnrpc.ForwardingEvent.toObject, includeInstance), - lastOffsetIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; if (includeInstance) { @@ -38832,38 +47264,29 @@ 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.ChannelBackupSubscription} */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBackupSubscription.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.ChannelBackupSubscription; + return proto.lnrpc.ChannelBackupSubscription.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.ChannelBackupSubscription} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingHistoryResponse} + * @return {!proto.lnrpc.ChannelBackupSubscription} */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.lnrpc.ForwardingEvent; - reader.readMessage(value,proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader); - msg.addForwardingEvents(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastOffsetIndex(value); - break; default: reader.skipField(); break; @@ -38877,9 +47300,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.ChannelBackupSubscription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38887,83 +47310,12 @@ 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.ChannelBackupSubscription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getForwardingEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter - ); - } - f = message.getLastOffsetIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * repeated ForwardingEvent forwarding_events = 1; - * @return {!Array} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this -*/ -proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ForwardingEvent=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ForwardingEvent} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.addForwardingEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ForwardingEvent, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.clearForwardingEventsList = function() { - return this.setForwardingEventsList([]); -}; - - -/** - * optional uint32 last_offset_index = 2; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.lnrpc.ForwardingHistoryResponse} returns this - */ -proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); }; @@ -38983,8 +47335,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.VerifyChanBackupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyChanBackupResponse.toObject(opt_includeInstance, this); }; @@ -38993,13 +47345,13 @@ proto.lnrpc.ExportChannelBackupRequest.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. 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.VerifyChanBackupResponse} 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.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { var f, obj = { - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + }; if (includeInstance) { @@ -39013,34 +47365,29 @@ 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.VerifyChanBackupResponse} */ -proto.lnrpc.ExportChannelBackupRequest.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyChanBackupResponse.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.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.ExportChannelBackupRequest} 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.ExportChannelBackupRequest} + * @return {!proto.lnrpc.VerifyChanBackupResponse} */ -proto.lnrpc.ExportChannelBackupRequest.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.setChanPoint(value); - break; default: reader.skipField(); break; @@ -39054,9 +47401,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.VerifyChanBackupResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39064,57 +47411,12 @@ 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.VerifyChanBackupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** - * @param {?proto.lnrpc.ChannelPoint|undefined} value - * @return {!proto.lnrpc.ExportChannelBackupRequest} returns this -*/ -proto.lnrpc.ExportChannelBackupRequest.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ExportChannelBackupRequest} returns this - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 1) != null; }; @@ -39134,8 +47436,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.MacaroonPermission.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MacaroonPermission.toObject(opt_includeInstance, this); }; @@ -39144,14 +47446,14 @@ proto.lnrpc.ChannelBackup.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.MacaroonPermission} 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.MacaroonPermission.toObject = function(includeInstance, msg) { var f, obj = { - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - chanBackup: msg.getChanBackup_asB64() + entity: jspb.Message.getFieldWithDefault(msg, 1, ""), + action: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -39165,23 +47467,23 @@ 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.MacaroonPermission} */ -proto.lnrpc.ChannelBackup.deserializeBinary = function(bytes) { +proto.lnrpc.MacaroonPermission.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.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.ChannelBackup} 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.ChannelBackup} + * @return {!proto.lnrpc.MacaroonPermission} */ -proto.lnrpc.ChannelBackup.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39189,13 +47491,12 @@ proto.lnrpc.ChannelBackup.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); + var value = /** @type {string} */ (reader.readString()); + msg.setEntity(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChanBackup(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAction(value); break; default: reader.skipField(); @@ -39210,9 +47511,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.MacaroonPermission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackup.serializeBinaryToWriter(this, writer); + proto.lnrpc.MacaroonPermission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39220,23 +47521,22 @@ 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.MacaroonPermission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackup.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MacaroonPermission.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( + f = message.getEntity(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + f ); } - f = message.getChanBackup_asU8(); + f = message.getAction(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); @@ -39245,81 +47545,38 @@ proto.lnrpc.ChannelBackup.serializeBinaryToWriter = function(message, writer) { /** - * optional ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} - */ -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 - * @return {!proto.lnrpc.ChannelBackup} returns this -*/ -proto.lnrpc.ChannelBackup.prototype.setChanPoint = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChannelBackup} returns this - */ -proto.lnrpc.ChannelBackup.prototype.clearChanPoint = function() { - return this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * optional string entity = 1; + * @return {string} */ -proto.lnrpc.ChannelBackup.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.MacaroonPermission.prototype.getEntity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes chan_backup = 2; - * @return {!(string|Uint8Array)} + * @param {string} value + * @return {!proto.lnrpc.MacaroonPermission} returns this */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.MacaroonPermission.prototype.setEntity = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes chan_backup = 2; - * This is a type-conversion wrapper around `getChanBackup()` + * optional string action = 2; * @return {string} */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChanBackup())); -}; - - -/** - * 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.ChannelBackup.prototype.getChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChanBackup())); +proto.lnrpc.MacaroonPermission.prototype.getAction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelBackup} returns this + * @param {string} value + * @return {!proto.lnrpc.MacaroonPermission} returns this */ -proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.MacaroonPermission.prototype.setAction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -39329,7 +47586,7 @@ proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { * @private {!Array} * @const */ -proto.lnrpc.MultiChanBackup.repeatedFields_ = [1]; +proto.lnrpc.BakeMacaroonRequest.repeatedFields_ = [1]; @@ -39346,8 +47603,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.BakeMacaroonRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BakeMacaroonRequest.toObject(opt_includeInstance, this); }; @@ -39356,15 +47613,16 @@ proto.lnrpc.MultiChanBackup.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.BakeMacaroonRequest} 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.BakeMacaroonRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanPointsList: jspb.Message.toObjectList(msg.getChanPointsList(), - proto.lnrpc.ChannelPoint.toObject, includeInstance), - multiChanBackup: msg.getMultiChanBackup_asB64() + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.lnrpc.MacaroonPermission.toObject, includeInstance), + rootKeyId: jspb.Message.getFieldWithDefault(msg, 2, 0), + allowExternalPermissions: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -39378,23 +47636,23 @@ 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.BakeMacaroonRequest} */ -proto.lnrpc.MultiChanBackup.deserializeBinary = function(bytes) { +proto.lnrpc.BakeMacaroonRequest.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.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.MultiChanBackup} 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.MultiChanBackup} + * @return {!proto.lnrpc.BakeMacaroonRequest} */ -proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39402,13 +47660,17 @@ proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.addChanPoints(value); + var value = new proto.lnrpc.MacaroonPermission; + reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); + msg.addPermissions(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiChanBackup(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRootKeyId(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowExternalPermissions(value); break; default: reader.skipField(); @@ -39423,9 +47685,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.BakeMacaroonRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.MultiChanBackup.serializeBinaryToWriter(this, writer); + proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39433,107 +47695,108 @@ 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.BakeMacaroonRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MultiChanBackup.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPointsList(); + f = message.getPermissionsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + proto.lnrpc.MacaroonPermission.serializeBinaryToWriter ); } - f = message.getMultiChanBackup_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getRootKeyId(); + if (f !== 0) { + writer.writeUint64( 2, f ); } + f = message.getAllowExternalPermissions(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * repeated ChannelPoint chan_points = 1; - * @return {!Array} + * repeated MacaroonPermission permissions = 1; + * @return {!Array} */ -proto.lnrpc.MultiChanBackup.prototype.getChanPointsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.BakeMacaroonRequest.prototype.getPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.MultiChanBackup} returns this + * @param {!Array} value + * @return {!proto.lnrpc.BakeMacaroonRequest} returns this */ -proto.lnrpc.MultiChanBackup.prototype.setChanPointsList = function(value) { +proto.lnrpc.BakeMacaroonRequest.prototype.setPermissionsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.ChannelPoint=} opt_value + * @param {!proto.lnrpc.MacaroonPermission=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.MacaroonPermission} */ -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.BakeMacaroonRequest.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.MultiChanBackup} returns this + * @return {!proto.lnrpc.BakeMacaroonRequest} returns this */ -proto.lnrpc.MultiChanBackup.prototype.clearChanPointsList = function() { - return this.setChanPointsList([]); +proto.lnrpc.BakeMacaroonRequest.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); }; /** - * optional bytes multi_chan_backup = 2; - * @return {!(string|Uint8Array)} + * optional uint64 root_key_id = 2; + * @return {number} */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.BakeMacaroonRequest.prototype.getRootKeyId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * optional bytes multi_chan_backup = 2; - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {string} + * @param {number} value + * @return {!proto.lnrpc.BakeMacaroonRequest} returns this */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiChanBackup())); +proto.lnrpc.BakeMacaroonRequest.prototype.setRootKeyId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bytes multi_chan_backup = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {!Uint8Array} + * optional bool allow_external_permissions = 3; + * @return {boolean} */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiChanBackup())); +proto.lnrpc.BakeMacaroonRequest.prototype.getAllowExternalPermissions = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MultiChanBackup} returns this + * @param {boolean} value + * @return {!proto.lnrpc.BakeMacaroonRequest} returns this */ -proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.BakeMacaroonRequest.prototype.setAllowExternalPermissions = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -39553,8 +47816,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.BakeMacaroonResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BakeMacaroonResponse.toObject(opt_includeInstance, this); }; @@ -39563,13 +47826,13 @@ proto.lnrpc.ChanBackupExportRequest.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. 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.BakeMacaroonResponse} 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.BakeMacaroonResponse.toObject = function(includeInstance, msg) { var f, obj = { - + macaroon: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -39583,29 +47846,33 @@ 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.BakeMacaroonResponse} */ -proto.lnrpc.ChanBackupExportRequest.deserializeBinary = function(bytes) { +proto.lnrpc.BakeMacaroonResponse.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.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.ChanBackupExportRequest} 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.ChanBackupExportRequest} + * @return {!proto.lnrpc.BakeMacaroonResponse} */ -proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BakeMacaroonResponse.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.setMacaroon(value); + break; default: reader.skipField(); break; @@ -39619,9 +47886,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.BakeMacaroonResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39629,12 +47896,37 @@ 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.BakeMacaroonResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getMacaroon(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string macaroon = 1; + * @return {string} + */ +proto.lnrpc.BakeMacaroonResponse.prototype.getMacaroon = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.BakeMacaroonResponse} returns this + */ +proto.lnrpc.BakeMacaroonResponse.prototype.setMacaroon = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -39654,8 +47946,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ListMacaroonIDsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListMacaroonIDsRequest.toObject(opt_includeInstance, this); }; @@ -39664,14 +47956,13 @@ proto.lnrpc.ChanBackupSnapshot.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. 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.ListMacaroonIDsRequest} 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.ListMacaroonIDsRequest.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) + }; if (includeInstance) { @@ -39685,158 +47976,58 @@ 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.ListMacaroonIDsRequest} */ -proto.lnrpc.ChanBackupSnapshot.deserializeBinary = function(bytes) { +proto.lnrpc.ListMacaroonIDsRequest.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.ListMacaroonIDsRequest; + return proto.lnrpc.ListMacaroonIDsRequest.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.ListMacaroonIDsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanBackupSnapshot} + * @return {!proto.lnrpc.ListMacaroonIDsRequest} */ -proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListMacaroonIDsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } 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); - break; default: reader.skipField(); break; } } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanBackupSnapshot.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.ChanBackupSnapshot} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSingleChanBackups(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelBackups.serializeBinaryToWriter - ); - } - f = message.getMultiChanBackup(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.MultiChanBackup.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ChannelBackups single_chan_backups = 1; - * @return {?proto.lnrpc.ChannelBackups} - */ -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 - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this -*/ -proto.lnrpc.ChanBackupSnapshot.prototype.setSingleChanBackups = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this - */ -proto.lnrpc.ChanBackupSnapshot.prototype.clearSingleChanBackups = function() { - return this.setSingleChanBackups(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.hasSingleChanBackups = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional MultiChanBackup multi_chan_backup = 2; - * @return {?proto.lnrpc.MultiChanBackup} - */ -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 - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this -*/ -proto.lnrpc.ChanBackupSnapshot.prototype.setMultiChanBackup = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.ChanBackupSnapshot} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ChanBackupSnapshot.prototype.clearMultiChanBackup = function() { - return this.setMultiChanBackup(undefined); +proto.lnrpc.ListMacaroonIDsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListMacaroonIDsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ListMacaroonIDsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.ListMacaroonIDsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -39846,7 +48037,7 @@ proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { * @private {!Array} * @const */ -proto.lnrpc.ChannelBackups.repeatedFields_ = [1]; +proto.lnrpc.ListMacaroonIDsResponse.repeatedFields_ = [1]; @@ -39863,8 +48054,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.ListMacaroonIDsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListMacaroonIDsResponse.toObject(opt_includeInstance, this); }; @@ -39873,14 +48064,13 @@ proto.lnrpc.ChannelBackups.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. 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.ListMacaroonIDsResponse} 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.ListMacaroonIDsResponse.toObject = function(includeInstance, msg) { var f, obj = { - chanBackupsList: jspb.Message.toObjectList(msg.getChanBackupsList(), - proto.lnrpc.ChannelBackup.toObject, includeInstance) + rootKeyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -39894,23 +48084,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.ListMacaroonIDsResponse} */ -proto.lnrpc.ChannelBackups.deserializeBinary = function(bytes) { +proto.lnrpc.ListMacaroonIDsResponse.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.ListMacaroonIDsResponse; + return proto.lnrpc.ListMacaroonIDsResponse.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.ListMacaroonIDsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBackups} + * @return {!proto.lnrpc.ListMacaroonIDsResponse} */ -proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListMacaroonIDsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39918,9 +48108,10 @@ 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 values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addRootKeyIds(values[i]); + } break; default: reader.skipField(); @@ -39935,9 +48126,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.ListMacaroonIDsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackups.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39945,88 +48136,60 @@ 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.ListMacaroonIDsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackups.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanBackupsList(); + f = message.getRootKeyIdsList(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writePackedUint64( 1, - f, - proto.lnrpc.ChannelBackup.serializeBinaryToWriter + f ); } }; /** - * repeated ChannelBackup chan_backups = 1; - * @return {!Array} + * repeated uint64 root_key_ids = 1; + * @return {!Array} */ -proto.lnrpc.ChannelBackups.prototype.getChanBackupsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelBackup, 1)); +proto.lnrpc.ListMacaroonIDsResponse.prototype.getRootKeyIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ChannelBackups} returns this -*/ -proto.lnrpc.ChannelBackups.prototype.setChanBackupsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {!Array} value + * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this + */ +proto.lnrpc.ListMacaroonIDsResponse.prototype.setRootKeyIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * @param {!proto.lnrpc.ChannelBackup=} opt_value + * @param {number} value * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelBackup} + * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this */ -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.ListMacaroonIDsResponse.prototype.addRootKeyIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ChannelBackups} returns this + * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this */ -proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { - return this.setChanBackupsList([]); +proto.lnrpc.ListMacaroonIDsResponse.prototype.clearRootKeyIdsList = function() { + return this.setRootKeyIdsList([]); }; -/** - * 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) { @@ -40042,8 +48205,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.DeleteMacaroonIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeleteMacaroonIDRequest.toObject(opt_includeInstance, this); }; @@ -40052,14 +48215,13 @@ proto.lnrpc.RestoreChanBackupRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. 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.DeleteMacaroonIDRequest} 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.DeleteMacaroonIDRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanBackups: (f = msg.getChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), - multiChanBackup: msg.getMultiChanBackup_asB64() + rootKeyId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -40073,23 +48235,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.DeleteMacaroonIDRequest} */ -proto.lnrpc.RestoreChanBackupRequest.deserializeBinary = function(bytes) { +proto.lnrpc.DeleteMacaroonIDRequest.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.DeleteMacaroonIDRequest; + return proto.lnrpc.DeleteMacaroonIDRequest.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.DeleteMacaroonIDRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RestoreChanBackupRequest} + * @return {!proto.lnrpc.DeleteMacaroonIDRequest} */ -proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40097,13 +48259,8 @@ 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); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiChanBackup(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRootKeyId(value); break; default: reader.skipField(); @@ -40118,9 +48275,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.DeleteMacaroonIDRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40128,24 +48285,16 @@ 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.DeleteMacaroonIDRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanBackups(); - if (f != null) { - writer.writeMessage( + f = message.getRootKeyId(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.lnrpc.ChannelBackups.serializeBinaryToWriter - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, f ); } @@ -40153,103 +48302,161 @@ proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, /** - * optional ChannelBackups chan_backups = 1; - * @return {?proto.lnrpc.ChannelBackups} + * optional uint64 root_key_id = 1; + * @return {number} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getChanBackups = function() { - return /** @type{?proto.lnrpc.ChannelBackups} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); +proto.lnrpc.DeleteMacaroonIDRequest.prototype.getRootKeyId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {?proto.lnrpc.ChannelBackups|undefined} value - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this -*/ -proto.lnrpc.RestoreChanBackupRequest.prototype.setChanBackups = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.lnrpc.DeleteMacaroonIDRequest} returns this + */ +proto.lnrpc.DeleteMacaroonIDRequest.prototype.setRootKeyId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { - return this.setChanBackups(undefined); +proto.lnrpc.DeleteMacaroonIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeleteMacaroonIDResponse.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.DeleteMacaroonIDResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreChanBackupRequest.prototype.hasChanBackups = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.DeleteMacaroonIDResponse.toObject = function(includeInstance, msg) { + var f, obj = { + deleted: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes multi_chan_backup = 2; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DeleteMacaroonIDResponse} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.DeleteMacaroonIDResponse; + return proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes multi_chan_backup = 2; - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.DeleteMacaroonIDResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DeleteMacaroonIDResponse} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiChanBackup())); +proto.lnrpc.DeleteMacaroonIDResponse.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.setDeleted(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * 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()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiChanBackup())); +proto.lnrpc.DeleteMacaroonIDResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DeleteMacaroonIDResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.DeleteMacaroonIDResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreChanBackupRequest.prototype.setMultiChanBackup = function(value) { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); +proto.lnrpc.DeleteMacaroonIDResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDeleted(); + if (f) { + writer.writeBool( + 1, + f + ); + } }; /** - * Clears the field making it undefined. - * @return {!proto.lnrpc.RestoreChanBackupRequest} returns this + * optional bool deleted = 1; + * @return {boolean} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.clearMultiChanBackup = function() { - return jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], undefined); +proto.lnrpc.DeleteMacaroonIDResponse.prototype.getDeleted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.lnrpc.DeleteMacaroonIDResponse} returns this */ -proto.lnrpc.RestoreChanBackupRequest.prototype.hasMultiChanBackup = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.DeleteMacaroonIDResponse.prototype.setDeleted = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.MacaroonPermissionList.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -40265,8 +48472,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.MacaroonPermissionList.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MacaroonPermissionList.toObject(opt_includeInstance, this); }; @@ -40275,13 +48482,14 @@ proto.lnrpc.RestoreBackupResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. 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.MacaroonPermissionList} 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.MacaroonPermissionList.toObject = function(includeInstance, msg) { var f, obj = { - + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.lnrpc.MacaroonPermission.toObject, includeInstance) }; if (includeInstance) { @@ -40295,29 +48503,34 @@ 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.MacaroonPermissionList} */ -proto.lnrpc.RestoreBackupResponse.deserializeBinary = function(bytes) { +proto.lnrpc.MacaroonPermissionList.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.MacaroonPermissionList; + return proto.lnrpc.MacaroonPermissionList.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.MacaroonPermissionList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RestoreBackupResponse} + * @return {!proto.lnrpc.MacaroonPermissionList} */ -proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.lnrpc.MacaroonPermission; + reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; default: reader.skipField(); break; @@ -40331,9 +48544,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.MacaroonPermissionList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40341,12 +48554,58 @@ 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.MacaroonPermissionList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.MacaroonPermission.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MacaroonPermission permissions = 1; + * @return {!Array} + */ +proto.lnrpc.MacaroonPermissionList.prototype.getPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.MacaroonPermissionList} returns this +*/ +proto.lnrpc.MacaroonPermissionList.prototype.setPermissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.MacaroonPermission=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.MacaroonPermission} + */ +proto.lnrpc.MacaroonPermissionList.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.MacaroonPermissionList} returns this + */ +proto.lnrpc.MacaroonPermissionList.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); }; @@ -40366,8 +48625,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelBackupSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackupSubscription.toObject(opt_includeInstance, this); +proto.lnrpc.ListPermissionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPermissionsRequest.toObject(opt_includeInstance, this); }; @@ -40376,11 +48635,11 @@ proto.lnrpc.ChannelBackupSubscription.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.ListPermissionsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackupSubscription.toObject = function(includeInstance, msg) { +proto.lnrpc.ListPermissionsRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -40396,23 +48655,23 @@ proto.lnrpc.ChannelBackupSubscription.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackupSubscription} + * @return {!proto.lnrpc.ListPermissionsRequest} */ -proto.lnrpc.ChannelBackupSubscription.deserializeBinary = function(bytes) { +proto.lnrpc.ListPermissionsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBackupSubscription; - return proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListPermissionsRequest; + return proto.lnrpc.ListPermissionsRequest.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.ListPermissionsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBackupSubscription} + * @return {!proto.lnrpc.ListPermissionsRequest} */ -proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPermissionsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40432,9 +48691,9 @@ proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelBackupSubscription.prototype.serializeBinary = function() { +proto.lnrpc.ListPermissionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListPermissionsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40442,11 +48701,11 @@ proto.lnrpc.ChannelBackupSubscription.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBackupSubscription} message + * @param {!proto.lnrpc.ListPermissionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListPermissionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -40467,8 +48726,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.VerifyChanBackupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyChanBackupResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ListPermissionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPermissionsResponse.toObject(opt_includeInstance, this); }; @@ -40477,13 +48736,13 @@ proto.lnrpc.VerifyChanBackupResponse.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. 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. + * @param {!proto.lnrpc.ListPermissionsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ListPermissionsResponse.toObject = function(includeInstance, msg) { var f, obj = { - + methodPermissionsMap: (f = msg.getMethodPermissionsMap()) ? f.toObject(includeInstance, proto.lnrpc.MacaroonPermissionList.toObject) : [] }; if (includeInstance) { @@ -40497,29 +48756,35 @@ proto.lnrpc.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyChanBackupResponse} + * @return {!proto.lnrpc.ListPermissionsResponse} */ -proto.lnrpc.VerifyChanBackupResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListPermissionsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyChanBackupResponse; - return proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListPermissionsResponse; + return proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.ListPermissionsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyChanBackupResponse} + * @return {!proto.lnrpc.ListPermissionsResponse} */ -proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = msg.getMethodPermissionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader, "", new proto.lnrpc.MacaroonPermissionList()); + }); + break; default: reader.skipField(); break; @@ -40533,23 +48798,49 @@ proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.VerifyChanBackupResponse.prototype.serializeBinary = function() { +proto.lnrpc.ListPermissionsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListPermissionsResponse.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.VerifyChanBackupResponse} 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.ListPermissionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListPermissionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMethodPermissionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter); + } +}; + + +/** + * map method_permissions = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.ListPermissionsResponse.prototype.getMethodPermissionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.lnrpc.MacaroonPermissionList)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.lnrpc.ListPermissionsResponse} returns this */ -proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; +proto.lnrpc.ListPermissionsResponse.prototype.clearMethodPermissionsMap = function() { + this.getMethodPermissionsMap().clear(); + return this;}; @@ -40568,8 +48859,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.MacaroonPermission.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MacaroonPermission.toObject(opt_includeInstance, this); +proto.lnrpc.Failure.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Failure.toObject(opt_includeInstance, this); }; @@ -40578,14 +48869,20 @@ proto.lnrpc.MacaroonPermission.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.MacaroonPermission} 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.MacaroonPermission.toObject = function(includeInstance, msg) { +proto.lnrpc.Failure.toObject = function(includeInstance, msg) { var f, obj = { - entity: jspb.Message.getFieldWithDefault(msg, 1, ""), - action: jspb.Message.getFieldWithDefault(msg, 2, "") + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + channelUpdate: (f = msg.getChannelUpdate()) && proto.lnrpc.ChannelUpdate.toObject(includeInstance, f), + htlcMAtoms: 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) { @@ -40599,23 +48896,23 @@ proto.lnrpc.MacaroonPermission.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MacaroonPermission} + * @return {!proto.lnrpc.Failure} */ -proto.lnrpc.MacaroonPermission.deserializeBinary = function(bytes) { +proto.lnrpc.Failure.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MacaroonPermission; - return proto.lnrpc.MacaroonPermission.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.MacaroonPermission} 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.MacaroonPermission} + * @return {!proto.lnrpc.Failure} */ -proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40623,12 +48920,37 @@ proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntity(value); + var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum()); + msg.setCode(value); break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAction(value); + 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.setHtlcMAtoms(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + 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(); @@ -40643,9 +48965,9 @@ proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.MacaroonPermission.prototype.serializeBinary = function() { +proto.lnrpc.Failure.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.MacaroonPermission.serializeBinaryToWriter(this, writer); + proto.lnrpc.Failure.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40653,23 +48975,66 @@ proto.lnrpc.MacaroonPermission.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MacaroonPermission} message + * @param {!proto.lnrpc.Failure} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MacaroonPermission.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Failure.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEntity(); - if (f.length > 0) { - writer.writeString( + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getAction(); + f = message.getChannelUpdate(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.ChannelUpdate.serializeBinaryToWriter + ); + } + f = message.getHtlcMAtoms(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getOnionSha256_asU8(); if (f.length > 0) { - writer.writeString( - 2, + writer.writeBytes( + 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 ); } @@ -40677,48 +49042,226 @@ proto.lnrpc.MacaroonPermission.serializeBinaryToWriter = function(message, write /** - * optional string entity = 1; - * @return {string} + * @enum {number} */ -proto.lnrpc.MacaroonPermission.prototype.getEntity = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 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, + INVALID_ONION_PAYLOAD: 24, + 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 {string} value - * @return {!proto.lnrpc.MacaroonPermission} returns this + * @param {!proto.lnrpc.Failure.FailureCode} value + * @return {!proto.lnrpc.Failure} returns this */ -proto.lnrpc.MacaroonPermission.prototype.setEntity = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.Failure.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional string action = 2; + * 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)); +}; + + +/** + * @param {?proto.lnrpc.ChannelUpdate|undefined} value + * @return {!proto.lnrpc.Failure} returns this +*/ +proto.lnrpc.Failure.prototype.setChannelUpdate = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.clearChannelUpdate = function() { + return this.setChannelUpdate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Failure.prototype.hasChannelUpdate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 htlc_m_atoms = 4; + * @return {number} + */ +proto.lnrpc.Failure.prototype.getHtlcMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.setHtlcMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes onion_sha_256 = 5; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.Failure.prototype.getOnionSha256 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes onion_sha_256 = 5; + * This is a type-conversion wrapper around `getOnionSha256()` * @return {string} */ -proto.lnrpc.MacaroonPermission.prototype.getAction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Failure.prototype.getOnionSha256_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOnionSha256())); }; /** - * @param {string} value - * @return {!proto.lnrpc.MacaroonPermission} returns this + * 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 `getOnionSha256()` + * @return {!Uint8Array} */ -proto.lnrpc.MacaroonPermission.prototype.setAction = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.Failure.prototype.getOnionSha256_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOnionSha256())); }; +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.setOnionSha256 = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional uint32 cltv_expiry = 6; + * @return {number} */ -proto.lnrpc.BakeMacaroonRequest.repeatedFields_ = [1]; +proto.lnrpc.Failure.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.setCltvExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint32 flags = 7; + * @return {number} + */ +proto.lnrpc.Failure.prototype.getFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.setFlags = function(value) { + return 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 + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.setFailureSourceIndex = function(value) { + return 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 + * @return {!proto.lnrpc.Failure} returns this + */ +proto.lnrpc.Failure.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + @@ -40735,8 +49278,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.BakeMacaroonRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BakeMacaroonRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelUpdate.toObject(opt_includeInstance, this); }; @@ -40745,15 +49288,24 @@ proto.lnrpc.BakeMacaroonRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.BakeMacaroonRequest} 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.BakeMacaroonRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelUpdate.toObject = function(includeInstance, msg) { var f, obj = { - permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.lnrpc.MacaroonPermission.toObject, includeInstance), - rootKeyId: jspb.Message.getFieldWithDefault(msg, 2, 0) + 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), + htlcMinimumMAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), + baseFee: jspb.Message.getFieldWithDefault(msg, 8, 0), + feeRate: jspb.Message.getFieldWithDefault(msg, 9, 0), + htlcMaximumMAtoms: jspb.Message.getFieldWithDefault(msg, 11, 0), + extraOpaqueData: msg.getExtraOpaqueData_asB64() }; if (includeInstance) { @@ -40767,23 +49319,23 @@ proto.lnrpc.BakeMacaroonRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BakeMacaroonRequest} + * @return {!proto.lnrpc.ChannelUpdate} */ -proto.lnrpc.BakeMacaroonRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BakeMacaroonRequest; - return proto.lnrpc.BakeMacaroonRequest.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.BakeMacaroonRequest} 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.BakeMacaroonRequest} + * @return {!proto.lnrpc.ChannelUpdate} */ -proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40791,55 +49343,163 @@ proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.MacaroonPermission; - reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); - msg.addPermissions(value); + 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.setRootKeyId(value); + msg.setHtlcMinimumMAtoms(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.setHtlcMaximumMAtoms(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtraOpaqueData(value); break; default: reader.skipField(); break; } } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.BakeMacaroonRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BakeMacaroonRequest.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.BakeMacaroonRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPermissionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.MacaroonPermission.serializeBinaryToWriter + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelUpdate.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.ChannelUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.getHtlcMinimumMAtoms(); + if (f !== 0) { + writer.writeUint64( + 7, + f ); } - f = message.getRootKeyId(); + f = message.getBaseFee(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getFeeRate(); + if (f !== 0) { + writer.writeUint32( + 9, + f + ); + } + f = message.getHtlcMaximumMAtoms(); if (f !== 0) { writer.writeUint64( - 2, + 11, + f + ); + } + f = message.getExtraOpaqueData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, f ); } @@ -40847,450 +49507,300 @@ proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter = function(message, writ /** - * repeated MacaroonPermission permissions = 1; - * @return {!Array} + * optional bytes signature = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.BakeMacaroonRequest.prototype.getPermissionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); +proto.lnrpc.ChannelUpdate.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this -*/ -proto.lnrpc.BakeMacaroonRequest.prototype.setPermissionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * optional bytes signature = 1; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.lnrpc.ChannelUpdate.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); }; /** - * @param {!proto.lnrpc.MacaroonPermission=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.MacaroonPermission} + * 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.BakeMacaroonRequest.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); +proto.lnrpc.ChannelUpdate.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.BakeMacaroonRequest.prototype.clearPermissionsList = function() { - return this.setPermissionsList([]); +proto.lnrpc.ChannelUpdate.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint64 root_key_id = 2; - * @return {number} + * optional bytes chain_hash = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.BakeMacaroonRequest.prototype.getRootKeyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelUpdate.prototype.getChainHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.BakeMacaroonRequest} returns this + * optional bytes chain_hash = 2; + * This is a type-conversion wrapper around `getChainHash()` + * @return {string} */ -proto.lnrpc.BakeMacaroonRequest.prototype.setRootKeyId = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ChannelUpdate.prototype.getChainHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChainHash())); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * 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.BakeMacaroonResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.BakeMacaroonResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.getChainHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChainHash())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.BakeMacaroonResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.BakeMacaroonResponse.toObject = function(includeInstance, msg) { - var f, obj = { - macaroon: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.ChannelUpdate.prototype.setChainHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.BakeMacaroonResponse} + * optional uint64 chan_id = 3; + * @return {string} */ -proto.lnrpc.BakeMacaroonResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.BakeMacaroonResponse; - return proto.lnrpc.BakeMacaroonResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.ChannelUpdate.prototype.getChanId = function() { + return /** @type {string} */ (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.BakeMacaroonResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.BakeMacaroonResponse} + * @param {string} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.BakeMacaroonResponse.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.setMacaroon(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.ChannelUpdate.prototype.setChanId = function(value) { + return jspb.Message.setProto3StringIntField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 timestamp = 4; + * @return {number} */ -proto.lnrpc.BakeMacaroonResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelUpdate.prototype.getTimestamp = 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.BakeMacaroonResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMacaroon(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } +proto.lnrpc.ChannelUpdate.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional string macaroon = 1; - * @return {string} + * optional uint32 message_flags = 10; + * @return {number} */ -proto.lnrpc.BakeMacaroonResponse.prototype.getMacaroon = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelUpdate.prototype.getMessageFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * @param {string} value - * @return {!proto.lnrpc.BakeMacaroonResponse} returns this + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.BakeMacaroonResponse.prototype.setMacaroon = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.ChannelUpdate.prototype.setMessageFlags = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint32 channel_flags = 5; + * @return {number} */ -proto.lnrpc.ListMacaroonIDsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListMacaroonIDsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.getChannelFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListMacaroonIDsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.ChannelUpdate.prototype.setChannelFlags = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListMacaroonIDsRequest} + * optional uint32 time_lock_delta = 6; + * @return {number} */ -proto.lnrpc.ListMacaroonIDsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListMacaroonIDsRequest; - return proto.lnrpc.ListMacaroonIDsRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.ChannelUpdate.prototype.getTimeLockDelta = 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.ListMacaroonIDsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListMacaroonIDsRequest} + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsRequest.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.setTimeLockDelta = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 htlc_minimum_m_atoms = 7; + * @return {number} */ -proto.lnrpc.ListMacaroonIDsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListMacaroonIDsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelUpdate.prototype.getHtlcMinimumMAtoms = 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.ListMacaroonIDsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ChannelUpdate.prototype.setHtlcMinimumMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional uint32 base_fee = 8; + * @return {number} */ -proto.lnrpc.ListMacaroonIDsResponse.repeatedFields_ = [1]; - +proto.lnrpc.ChannelUpdate.prototype.getBaseFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListMacaroonIDsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.setBaseFee = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListMacaroonIDsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 fee_rate = 9; + * @return {number} */ -proto.lnrpc.ListMacaroonIDsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - rootKeyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.ChannelUpdate.prototype.getFeeRate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListMacaroonIDsResponse} + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListMacaroonIDsResponse; - return proto.lnrpc.ListMacaroonIDsResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.ChannelUpdate.prototype.setFeeRate = function(value) { + return 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.ListMacaroonIDsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListMacaroonIDsResponse} + * optional uint64 htlc_maximum_m_atoms = 11; + * @return {number} */ -proto.lnrpc.ListMacaroonIDsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); - for (var i = 0; i < values.length; i++) { - msg.addRootKeyIds(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.ChannelUpdate.prototype.getHtlcMaximumMAtoms = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {number} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelUpdate.prototype.setHtlcMaximumMAtoms = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListMacaroonIDsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes extra_opaque_data = 12; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRootKeyIdsList(); - if (f.length > 0) { - writer.writePackedUint64( - 1, - f - ); - } +proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** - * repeated uint64 root_key_ids = 1; - * @return {!Array} + * optional bytes extra_opaque_data = 12; + * This is a type-conversion wrapper around `getExtraOpaqueData()` + * @return {string} */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.getRootKeyIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtraOpaqueData())); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this + * 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.ListMacaroonIDsResponse.prototype.setRootKeyIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtraOpaqueData())); }; /** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChannelUpdate} returns this */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.addRootKeyIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.lnrpc.ChannelUpdate.prototype.setExtraOpaqueData = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.ListMacaroonIDsResponse} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.ListMacaroonIDsResponse.prototype.clearRootKeyIdsList = function() { - return this.setRootKeyIdsList([]); -}; - - +proto.lnrpc.MacaroonId.repeatedFields_ = [3]; @@ -41307,8 +49817,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteMacaroonIDRequest.toObject(opt_includeInstance, this); +proto.lnrpc.MacaroonId.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MacaroonId.toObject(opt_includeInstance, this); }; @@ -41317,13 +49827,16 @@ proto.lnrpc.DeleteMacaroonIDRequest.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteMacaroonIDRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.MacaroonId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteMacaroonIDRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.MacaroonId.toObject = function(includeInstance, msg) { var f, obj = { - rootKeyId: jspb.Message.getFieldWithDefault(msg, 1, 0) + nonce: msg.getNonce_asB64(), + storageid: msg.getStorageid_asB64(), + opsList: jspb.Message.toObjectList(msg.getOpsList(), + proto.lnrpc.Op.toObject, includeInstance) }; if (includeInstance) { @@ -41337,23 +49850,23 @@ proto.lnrpc.DeleteMacaroonIDRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteMacaroonIDRequest} + * @return {!proto.lnrpc.MacaroonId} */ -proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinary = function(bytes) { +proto.lnrpc.MacaroonId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteMacaroonIDRequest; - return proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.MacaroonId; + return proto.lnrpc.MacaroonId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DeleteMacaroonIDRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.MacaroonId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteMacaroonIDRequest} + * @return {!proto.lnrpc.MacaroonId} */ -proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MacaroonId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41361,8 +49874,17 @@ proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRootKeyId(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNonce(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStorageid(value); + break; + case 3: + var value = new proto.lnrpc.Op; + reader.readMessage(value,proto.lnrpc.Op.deserializeBinaryFromReader); + msg.addOps(value); break; default: reader.skipField(); @@ -41377,9 +49899,9 @@ proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.serializeBinary = function() { +proto.lnrpc.MacaroonId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.MacaroonId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41387,41 +49909,167 @@ proto.lnrpc.DeleteMacaroonIDRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteMacaroonIDRequest} message + * @param {!proto.lnrpc.MacaroonId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MacaroonId.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRootKeyId(); - if (f !== 0) { - writer.writeUint64( + f = message.getNonce_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } + f = message.getStorageid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getOpsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.lnrpc.Op.serializeBinaryToWriter + ); + } }; /** - * optional uint64 root_key_id = 1; - * @return {number} + * optional bytes nonce = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.getRootKeyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.MacaroonId.prototype.getNonce = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.lnrpc.DeleteMacaroonIDRequest} returns this + * optional bytes nonce = 1; + * This is a type-conversion wrapper around `getNonce()` + * @return {string} */ -proto.lnrpc.DeleteMacaroonIDRequest.prototype.setRootKeyId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.MacaroonId.prototype.getNonce_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNonce())); +}; + + +/** + * optional bytes nonce = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNonce()` + * @return {!Uint8Array} + */ +proto.lnrpc.MacaroonId.prototype.getNonce_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNonce())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.MacaroonId} returns this + */ +proto.lnrpc.MacaroonId.prototype.setNonce = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes storageId = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.MacaroonId.prototype.getStorageid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes storageId = 2; + * This is a type-conversion wrapper around `getStorageid()` + * @return {string} + */ +proto.lnrpc.MacaroonId.prototype.getStorageid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStorageid())); +}; + + +/** + * optional bytes storageId = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStorageid()` + * @return {!Uint8Array} + */ +proto.lnrpc.MacaroonId.prototype.getStorageid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStorageid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.MacaroonId} returns this + */ +proto.lnrpc.MacaroonId.prototype.setStorageid = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated Op ops = 3; + * @return {!Array} + */ +proto.lnrpc.MacaroonId.prototype.getOpsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Op, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.MacaroonId} returns this +*/ +proto.lnrpc.MacaroonId.prototype.setOpsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.lnrpc.Op=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Op} + */ +proto.lnrpc.MacaroonId.prototype.addOps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.Op, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.MacaroonId} returns this + */ +proto.lnrpc.MacaroonId.prototype.clearOpsList = function() { + return this.setOpsList([]); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Op.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -41437,8 +50085,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteMacaroonIDResponse.toObject(opt_includeInstance, this); +proto.lnrpc.Op.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Op.toObject(opt_includeInstance, this); }; @@ -41447,13 +50095,14 @@ proto.lnrpc.DeleteMacaroonIDResponse.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteMacaroonIDResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.Op} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteMacaroonIDResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.Op.toObject = function(includeInstance, msg) { var f, obj = { - deleted: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + entity: jspb.Message.getFieldWithDefault(msg, 1, ""), + actionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { @@ -41467,23 +50116,23 @@ proto.lnrpc.DeleteMacaroonIDResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteMacaroonIDResponse} + * @return {!proto.lnrpc.Op} */ -proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinary = function(bytes) { +proto.lnrpc.Op.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteMacaroonIDResponse; - return proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Op; + return proto.lnrpc.Op.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DeleteMacaroonIDResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.Op} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteMacaroonIDResponse} + * @return {!proto.lnrpc.Op} */ -proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Op.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41491,8 +50140,12 @@ proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDeleted(value); + var value = /** @type {string} */ (reader.readString()); + msg.setEntity(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addActions(value); break; default: reader.skipField(); @@ -41507,9 +50160,9 @@ proto.lnrpc.DeleteMacaroonIDResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.serializeBinary = function() { +proto.lnrpc.Op.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteMacaroonIDResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.Op.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41517,37 +50170,81 @@ proto.lnrpc.DeleteMacaroonIDResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteMacaroonIDResponse} message + * @param {!proto.lnrpc.Op} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteMacaroonIDResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Op.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDeleted(); - if (f) { - writer.writeBool( + f = message.getEntity(); + if (f.length > 0) { + writer.writeString( 1, f ); } + f = message.getActionsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } }; /** - * optional bool deleted = 1; - * @return {boolean} + * optional string entity = 1; + * @return {string} */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.getDeleted = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.lnrpc.Op.prototype.getEntity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.lnrpc.DeleteMacaroonIDResponse} returns this + * @param {string} value + * @return {!proto.lnrpc.Op} returns this */ -proto.lnrpc.DeleteMacaroonIDResponse.prototype.setDeleted = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.Op.prototype.setEntity = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string actions = 2; + * @return {!Array} + */ +proto.lnrpc.Op.prototype.getActionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.Op} returns this + */ +proto.lnrpc.Op.prototype.setActionsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.lnrpc.Op} returns this + */ +proto.lnrpc.Op.prototype.addActions = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.Op} returns this + */ +proto.lnrpc.Op.prototype.clearActionsList = function() { + return this.setActionsList([]); }; @@ -41557,7 +50254,7 @@ proto.lnrpc.DeleteMacaroonIDResponse.prototype.setDeleted = function(value) { * @private {!Array} * @const */ -proto.lnrpc.MacaroonPermissionList.repeatedFields_ = [1]; +proto.lnrpc.CheckMacPermRequest.repeatedFields_ = [2]; @@ -41574,8 +50271,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.MacaroonPermissionList.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MacaroonPermissionList.toObject(opt_includeInstance, this); +proto.lnrpc.CheckMacPermRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CheckMacPermRequest.toObject(opt_includeInstance, this); }; @@ -41584,14 +50281,16 @@ proto.lnrpc.MacaroonPermissionList.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.MacaroonPermissionList} msg The msg instance to transform. + * @param {!proto.lnrpc.CheckMacPermRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MacaroonPermissionList.toObject = function(includeInstance, msg) { +proto.lnrpc.CheckMacPermRequest.toObject = function(includeInstance, msg) { var f, obj = { + macaroon: msg.getMacaroon_asB64(), permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), - proto.lnrpc.MacaroonPermission.toObject, includeInstance) + proto.lnrpc.MacaroonPermission.toObject, includeInstance), + fullmethod: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -41605,23 +50304,23 @@ proto.lnrpc.MacaroonPermissionList.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MacaroonPermissionList} + * @return {!proto.lnrpc.CheckMacPermRequest} */ -proto.lnrpc.MacaroonPermissionList.deserializeBinary = function(bytes) { +proto.lnrpc.CheckMacPermRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MacaroonPermissionList; - return proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.CheckMacPermRequest; + return proto.lnrpc.CheckMacPermRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.MacaroonPermissionList} msg The message object to deserialize into. + * @param {!proto.lnrpc.CheckMacPermRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MacaroonPermissionList} + * @return {!proto.lnrpc.CheckMacPermRequest} */ -proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CheckMacPermRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41629,10 +50328,18 @@ proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMacaroon(value); + break; + case 2: var value = new proto.lnrpc.MacaroonPermission; reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); msg.addPermissions(value); break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFullmethod(value); + break; default: reader.skipField(); break; @@ -41646,9 +50353,9 @@ proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.MacaroonPermissionList.prototype.serializeBinary = function() { +proto.lnrpc.CheckMacPermRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter(this, writer); + proto.lnrpc.CheckMacPermRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41656,159 +50363,132 @@ proto.lnrpc.MacaroonPermissionList.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MacaroonPermissionList} message + * @param {!proto.lnrpc.CheckMacPermRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CheckMacPermRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getMacaroon_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } f = message.getPermissionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 1, + 2, f, proto.lnrpc.MacaroonPermission.serializeBinaryToWriter ); } + f = message.getFullmethod(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * repeated MacaroonPermission permissions = 1; - * @return {!Array} + * optional bytes macaroon = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.MacaroonPermissionList.prototype.getPermissionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); +proto.lnrpc.CheckMacPermRequest.prototype.getMacaroon = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.MacaroonPermissionList} returns this -*/ -proto.lnrpc.MacaroonPermissionList.prototype.setPermissionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * optional bytes macaroon = 1; + * This is a type-conversion wrapper around `getMacaroon()` + * @return {string} + */ +proto.lnrpc.CheckMacPermRequest.prototype.getMacaroon_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMacaroon())); }; /** - * @param {!proto.lnrpc.MacaroonPermission=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.MacaroonPermission} + * optional bytes macaroon = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMacaroon()` + * @return {!Uint8Array} */ -proto.lnrpc.MacaroonPermissionList.prototype.addPermissions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); +proto.lnrpc.CheckMacPermRequest.prototype.getMacaroon_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMacaroon())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.MacaroonPermissionList} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.CheckMacPermRequest} returns this */ -proto.lnrpc.MacaroonPermissionList.prototype.clearPermissionsList = function() { - return this.setPermissionsList([]); +proto.lnrpc.CheckMacPermRequest.prototype.setMacaroon = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * repeated MacaroonPermission permissions = 2; + * @return {!Array} */ -proto.lnrpc.ListPermissionsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPermissionsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.CheckMacPermRequest.prototype.getPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 2)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPermissionsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPermissionsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {!Array} value + * @return {!proto.lnrpc.CheckMacPermRequest} returns this +*/ +proto.lnrpc.CheckMacPermRequest.prototype.setPermissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPermissionsRequest} + * @param {!proto.lnrpc.MacaroonPermission=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.MacaroonPermission} */ -proto.lnrpc.ListPermissionsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPermissionsRequest; - return proto.lnrpc.ListPermissionsRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.CheckMacPermRequest.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.MacaroonPermission, opt_index); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPermissionsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPermissionsRequest} + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.CheckMacPermRequest} returns this */ -proto.lnrpc.ListPermissionsRequest.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.CheckMacPermRequest.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string fullMethod = 3; + * @return {string} */ -proto.lnrpc.ListPermissionsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPermissionsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.CheckMacPermRequest.prototype.getFullmethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPermissionsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.lnrpc.CheckMacPermRequest} returns this */ -proto.lnrpc.ListPermissionsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.CheckMacPermRequest.prototype.setFullmethod = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -41828,8 +50508,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListPermissionsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPermissionsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.CheckMacPermResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CheckMacPermResponse.toObject(opt_includeInstance, this); }; @@ -41838,13 +50518,13 @@ proto.lnrpc.ListPermissionsResponse.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPermissionsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.CheckMacPermResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPermissionsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.CheckMacPermResponse.toObject = function(includeInstance, msg) { var f, obj = { - methodPermissionsMap: (f = msg.getMethodPermissionsMap()) ? f.toObject(includeInstance, proto.lnrpc.MacaroonPermissionList.toObject) : [] + valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -41858,23 +50538,23 @@ proto.lnrpc.ListPermissionsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPermissionsResponse} + * @return {!proto.lnrpc.CheckMacPermResponse} */ -proto.lnrpc.ListPermissionsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.CheckMacPermResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPermissionsResponse; - return proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.CheckMacPermResponse; + return proto.lnrpc.CheckMacPermResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListPermissionsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.CheckMacPermResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPermissionsResponse} + * @return {!proto.lnrpc.CheckMacPermResponse} */ -proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CheckMacPermResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41882,10 +50562,8 @@ proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = msg.getMethodPermissionsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.MacaroonPermissionList.deserializeBinaryFromReader, "", new proto.lnrpc.MacaroonPermissionList()); - }); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValid(value); break; default: reader.skipField(); @@ -41900,9 +50578,9 @@ proto.lnrpc.ListPermissionsResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListPermissionsResponse.prototype.serializeBinary = function() { +proto.lnrpc.CheckMacPermResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPermissionsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.CheckMacPermResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41910,41 +50588,67 @@ proto.lnrpc.ListPermissionsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPermissionsResponse} message + * @param {!proto.lnrpc.CheckMacPermResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPermissionsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CheckMacPermResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMethodPermissionsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.MacaroonPermissionList.serializeBinaryToWriter); + f = message.getValid(); + if (f) { + writer.writeBool( + 1, + f + ); } }; /** - * map method_permissions = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional bool valid = 1; + * @return {boolean} + */ +proto.lnrpc.CheckMacPermResponse.prototype.getValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.CheckMacPermResponse} returns this + */ +proto.lnrpc.CheckMacPermResponse.prototype.setValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, 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 + */ +proto.lnrpc.RPCMiddlewareRequest.oneofGroups_ = [[4,5,6]]; + +/** + * @enum {number} */ -proto.lnrpc.ListPermissionsResponse.prototype.getMethodPermissionsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.lnrpc.MacaroonPermissionList)); +proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase = { + INTERCEPT_TYPE_NOT_SET: 0, + STREAM_AUTH: 4, + REQUEST: 5, + RESPONSE: 6 }; - /** - * Clears values from the map. The map will be non-null. - * @return {!proto.lnrpc.ListPermissionsResponse} returns this + * @return {proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase} */ -proto.lnrpc.ListPermissionsResponse.prototype.clearMethodPermissionsMap = function() { - this.getMethodPermissionsMap().clear(); - return this;}; - - +proto.lnrpc.RPCMiddlewareRequest.prototype.getInterceptTypeCase = function() { + return /** @type {proto.lnrpc.RPCMiddlewareRequest.InterceptTypeCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0])); +}; @@ -41961,8 +50665,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Failure.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Failure.toObject(opt_includeInstance, this); +proto.lnrpc.RPCMiddlewareRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RPCMiddlewareRequest.toObject(opt_includeInstance, this); }; @@ -41971,20 +50675,19 @@ proto.lnrpc.Failure.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Failure} msg The msg instance to transform. + * @param {!proto.lnrpc.RPCMiddlewareRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Failure.toObject = function(includeInstance, msg) { +proto.lnrpc.RPCMiddlewareRequest.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - channelUpdate: (f = msg.getChannelUpdate()) && proto.lnrpc.ChannelUpdate.toObject(includeInstance, f), - htlcMAtoms: 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) + requestId: jspb.Message.getFieldWithDefault(msg, 1, 0), + rawMacaroon: msg.getRawMacaroon_asB64(), + customCaveatCondition: jspb.Message.getFieldWithDefault(msg, 3, ""), + streamAuth: (f = msg.getStreamAuth()) && proto.lnrpc.StreamAuth.toObject(includeInstance, f), + request: (f = msg.getRequest()) && proto.lnrpc.RPCMessage.toObject(includeInstance, f), + response: (f = msg.getResponse()) && proto.lnrpc.RPCMessage.toObject(includeInstance, f), + msgId: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -41998,23 +50701,23 @@ proto.lnrpc.Failure.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Failure} + * @return {!proto.lnrpc.RPCMiddlewareRequest} */ -proto.lnrpc.Failure.deserializeBinary = function(bytes) { +proto.lnrpc.RPCMiddlewareRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Failure; - return proto.lnrpc.Failure.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.RPCMiddlewareRequest; + return proto.lnrpc.RPCMiddlewareRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Failure} msg The message object to deserialize into. + * @param {!proto.lnrpc.RPCMiddlewareRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Failure} + * @return {!proto.lnrpc.RPCMiddlewareRequest} */ -proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RPCMiddlewareRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42022,37 +50725,35 @@ proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum()); - msg.setCode(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRawMacaroon(value); break; case 3: - var value = new proto.lnrpc.ChannelUpdate; - reader.readMessage(value,proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader); - msg.setChannelUpdate(value); + var value = /** @type {string} */ (reader.readString()); + msg.setCustomCaveatCondition(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcMAtoms(value); + var value = new proto.lnrpc.StreamAuth; + reader.readMessage(value,proto.lnrpc.StreamAuth.deserializeBinaryFromReader); + msg.setStreamAuth(value); break; case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOnionSha256(value); + var value = new proto.lnrpc.RPCMessage; + reader.readMessage(value,proto.lnrpc.RPCMessage.deserializeBinaryFromReader); + msg.setRequest(value); break; case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvExpiry(value); + var value = new proto.lnrpc.RPCMessage; + reader.readMessage(value,proto.lnrpc.RPCMessage.deserializeBinaryFromReader); + msg.setResponse(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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setMsgId(value); break; default: reader.skipField(); @@ -42067,9 +50768,9 @@ proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Failure.prototype.serializeBinary = function() { +proto.lnrpc.RPCMiddlewareRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Failure.serializeBinaryToWriter(this, writer); + proto.lnrpc.RPCMiddlewareRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42077,66 +50778,61 @@ proto.lnrpc.Failure.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Failure} message + * @param {!proto.lnrpc.RPCMiddlewareRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Failure.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RPCMiddlewareRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getChannelUpdate(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelUpdate.serializeBinaryToWriter - ); - } - f = message.getHtlcMAtoms(); + f = message.getRequestId(); if (f !== 0) { writer.writeUint64( - 4, + 1, f ); } - f = message.getOnionSha256_asU8(); + f = message.getRawMacaroon_asU8(); if (f.length > 0) { writer.writeBytes( - 5, + 2, f ); } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint32( - 6, + f = message.getCustomCaveatCondition(); + if (f.length > 0) { + writer.writeString( + 3, f ); } - f = message.getFlags(); - if (f !== 0) { - writer.writeUint32( - 7, - f + f = message.getStreamAuth(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.lnrpc.StreamAuth.serializeBinaryToWriter ); } - f = message.getFailureSourceIndex(); - if (f !== 0) { - writer.writeUint32( - 8, - f + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.lnrpc.RPCMessage.serializeBinaryToWriter ); } - f = message.getHeight(); + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.lnrpc.RPCMessage.serializeBinaryToWriter + ); + } + f = message.getMsgId(); if (f !== 0) { - writer.writeUint32( - 9, + writer.writeUint64( + 7, f ); } @@ -42144,81 +50840,108 @@ proto.lnrpc.Failure.serializeBinaryToWriter = function(message, writer) { /** - * @enum {number} + * optional uint64 request_id = 1; + * @return {number} */ -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 +proto.lnrpc.RPCMiddlewareRequest.prototype.getRequestId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** - * optional FailureCode code = 1; - * @return {!proto.lnrpc.Failure.FailureCode} + * @param {number} value + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this */ -proto.lnrpc.Failure.prototype.getCode = function() { - return /** @type {!proto.lnrpc.Failure.FailureCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.RPCMiddlewareRequest.prototype.setRequestId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * @param {!proto.lnrpc.Failure.FailureCode} value - * @return {!proto.lnrpc.Failure} returns this + * optional bytes raw_macaroon = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Failure.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.lnrpc.RPCMiddlewareRequest.prototype.getRawMacaroon = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional ChannelUpdate channel_update = 3; - * @return {?proto.lnrpc.ChannelUpdate} + * optional bytes raw_macaroon = 2; + * This is a type-conversion wrapper around `getRawMacaroon()` + * @return {string} */ -proto.lnrpc.Failure.prototype.getChannelUpdate = function() { - return /** @type{?proto.lnrpc.ChannelUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelUpdate, 3)); +proto.lnrpc.RPCMiddlewareRequest.prototype.getRawMacaroon_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRawMacaroon())); }; /** - * @param {?proto.lnrpc.ChannelUpdate|undefined} value - * @return {!proto.lnrpc.Failure} returns this + * optional bytes raw_macaroon = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRawMacaroon()` + * @return {!Uint8Array} + */ +proto.lnrpc.RPCMiddlewareRequest.prototype.getRawMacaroon_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRawMacaroon())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this + */ +proto.lnrpc.RPCMiddlewareRequest.prototype.setRawMacaroon = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string custom_caveat_condition = 3; + * @return {string} + */ +proto.lnrpc.RPCMiddlewareRequest.prototype.getCustomCaveatCondition = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this + */ +proto.lnrpc.RPCMiddlewareRequest.prototype.setCustomCaveatCondition = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional StreamAuth stream_auth = 4; + * @return {?proto.lnrpc.StreamAuth} + */ +proto.lnrpc.RPCMiddlewareRequest.prototype.getStreamAuth = function() { + return /** @type{?proto.lnrpc.StreamAuth} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.StreamAuth, 4)); +}; + + +/** + * @param {?proto.lnrpc.StreamAuth|undefined} value + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this */ -proto.lnrpc.Failure.prototype.setChannelUpdate = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.lnrpc.RPCMiddlewareRequest.prototype.setStreamAuth = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.lnrpc.Failure} returns this + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this */ -proto.lnrpc.Failure.prototype.clearChannelUpdate = function() { - return this.setChannelUpdate(undefined); +proto.lnrpc.RPCMiddlewareRequest.prototype.clearStreamAuth = function() { + return this.setStreamAuth(undefined); }; @@ -42226,140 +50949,230 @@ proto.lnrpc.Failure.prototype.clearChannelUpdate = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.Failure.prototype.hasChannelUpdate = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.RPCMiddlewareRequest.prototype.hasStreamAuth = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional uint64 htlc_m_atoms = 4; - * @return {number} + * optional RPCMessage request = 5; + * @return {?proto.lnrpc.RPCMessage} */ -proto.lnrpc.Failure.prototype.getHtlcMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.RPCMiddlewareRequest.prototype.getRequest = function() { + return /** @type{?proto.lnrpc.RPCMessage} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RPCMessage, 5)); }; /** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setHtlcMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + * @param {?proto.lnrpc.RPCMessage|undefined} value + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this +*/ +proto.lnrpc.RPCMiddlewareRequest.prototype.setRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0], value); }; /** - * optional bytes onion_sha_256 = 5; - * @return {!(string|Uint8Array)} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this */ -proto.lnrpc.Failure.prototype.getOnionSha256 = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.RPCMiddlewareRequest.prototype.clearRequest = function() { + return this.setRequest(undefined); }; /** - * optional bytes onion_sha_256 = 5; - * This is a type-conversion wrapper around `getOnionSha256()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Failure.prototype.getOnionSha256_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOnionSha256())); +proto.lnrpc.RPCMiddlewareRequest.prototype.hasRequest = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * 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 `getOnionSha256()` - * @return {!Uint8Array} + * optional RPCMessage response = 6; + * @return {?proto.lnrpc.RPCMessage} */ -proto.lnrpc.Failure.prototype.getOnionSha256_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOnionSha256())); +proto.lnrpc.RPCMiddlewareRequest.prototype.getResponse = function() { + return /** @type{?proto.lnrpc.RPCMessage} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RPCMessage, 6)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.Failure} returns this - */ -proto.lnrpc.Failure.prototype.setOnionSha256 = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); + * @param {?proto.lnrpc.RPCMessage|undefined} value + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this +*/ +proto.lnrpc.RPCMiddlewareRequest.prototype.setResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.lnrpc.RPCMiddlewareRequest.oneofGroups_[0], value); }; /** - * optional uint32 cltv_expiry = 6; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this */ -proto.lnrpc.Failure.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.RPCMiddlewareRequest.prototype.clearResponse = function() { + return this.setResponse(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.Failure.prototype.setCltvExpiry = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.RPCMiddlewareRequest.prototype.hasResponse = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional uint32 flags = 7; + * optional uint64 msg_id = 7; * @return {number} */ -proto.lnrpc.Failure.prototype.getFlags = function() { +proto.lnrpc.RPCMiddlewareRequest.prototype.getMsgId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.Failure} returns this + * @return {!proto.lnrpc.RPCMiddlewareRequest} returns this */ -proto.lnrpc.Failure.prototype.setFlags = function(value) { +proto.lnrpc.RPCMiddlewareRequest.prototype.setMsgId = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint32 failure_source_index = 8; - * @return {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Failure.prototype.getFailureSourceIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.StreamAuth.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.StreamAuth.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.StreamAuth} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Failure.prototype.setFailureSourceIndex = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.StreamAuth.toObject = function(includeInstance, msg) { + var f, obj = { + methodFullUri: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint32 height = 9; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.StreamAuth} */ -proto.lnrpc.Failure.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.StreamAuth.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.StreamAuth; + return proto.lnrpc.StreamAuth.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.Failure} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.StreamAuth} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.StreamAuth} */ -proto.lnrpc.Failure.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.lnrpc.StreamAuth.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.setMethodFullUri(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.StreamAuth.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.StreamAuth.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.StreamAuth} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.StreamAuth.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMethodFullUri(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string method_full_uri = 1; + * @return {string} + */ +proto.lnrpc.StreamAuth.prototype.getMethodFullUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.StreamAuth} returns this + */ +proto.lnrpc.StreamAuth.prototype.setMethodFullUri = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -42379,8 +51192,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.RPCMessage.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RPCMessage.toObject(opt_includeInstance, this); }; @@ -42389,24 +51202,16 @@ proto.lnrpc.ChannelUpdate.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.RPCMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.RPCMessage.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), - htlcMinimumMAtoms: jspb.Message.getFieldWithDefault(msg, 7, 0), - baseFee: jspb.Message.getFieldWithDefault(msg, 8, 0), - feeRate: jspb.Message.getFieldWithDefault(msg, 9, 0), - htlcMaximumMAtoms: jspb.Message.getFieldWithDefault(msg, 11, 0), - extraOpaqueData: msg.getExtraOpaqueData_asB64() + methodFullUri: jspb.Message.getFieldWithDefault(msg, 1, ""), + streamRpc: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + typeName: jspb.Message.getFieldWithDefault(msg, 3, ""), + serialized: msg.getSerialized_asB64() }; if (includeInstance) { @@ -42420,23 +51225,23 @@ proto.lnrpc.ChannelUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelUpdate} + * @return {!proto.lnrpc.RPCMessage} */ -proto.lnrpc.ChannelUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.RPCMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelUpdate; - return proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.RPCMessage; + return proto.lnrpc.RPCMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.RPCMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelUpdate} + * @return {!proto.lnrpc.RPCMessage} */ -proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RPCMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42444,52 +51249,20 @@ proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); + var value = /** @type {string} */ (reader.readString()); + msg.setMethodFullUri(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChainHash(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStreamRpc(value); break; case 3: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTypeName(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.setHtlcMinimumMAtoms(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.setHtlcMaximumMAtoms(value); - break; - case 12: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setExtraOpaqueData(value); + msg.setSerialized(value); break; default: reader.skipField(); @@ -42504,9 +51277,9 @@ proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelUpdate.prototype.serializeBinary = function() { +proto.lnrpc.RPCMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.RPCMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42514,93 +51287,37 @@ proto.lnrpc.ChannelUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelUpdate} message + * @param {!proto.lnrpc.RPCMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RPCMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignature_asU8(); + f = message.getMethodFullUri(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getChainHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getStreamRpc(); + if (f) { + writer.writeBool( 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.getHtlcMinimumMAtoms(); - 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.getHtlcMaximumMAtoms(); - if (f !== 0) { - writer.writeUint64( - 11, + } + f = message.getTypeName(); + if (f.length > 0) { + writer.writeString( + 3, f ); } - f = message.getExtraOpaqueData_asU8(); + f = message.getSerialized_asU8(); if (f.length > 0) { writer.writeBytes( - 12, + 4, f ); } @@ -42608,301 +51325,360 @@ proto.lnrpc.ChannelUpdate.serializeBinaryToWriter = function(message, writer) { /** - * optional bytes signature = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChannelUpdate.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes signature = 1; - * This is a type-conversion wrapper around `getSignature()` + * optional string method_full_uri = 1; * @return {string} */ -proto.lnrpc.ChannelUpdate.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); +proto.lnrpc.RPCMessage.prototype.getMethodFullUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * 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} + * @param {string} value + * @return {!proto.lnrpc.RPCMessage} returns this */ -proto.lnrpc.ChannelUpdate.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); +proto.lnrpc.RPCMessage.prototype.setMethodFullUri = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * optional bool stream_rpc = 2; + * @return {boolean} */ -proto.lnrpc.ChannelUpdate.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.RPCMessage.prototype.getStreamRpc = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * optional bytes chain_hash = 2; - * @return {!(string|Uint8Array)} + * @param {boolean} value + * @return {!proto.lnrpc.RPCMessage} returns this */ -proto.lnrpc.ChannelUpdate.prototype.getChainHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.RPCMessage.prototype.setStreamRpc = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes chain_hash = 2; - * This is a type-conversion wrapper around `getChainHash()` + * optional string type_name = 3; * @return {string} */ -proto.lnrpc.ChannelUpdate.prototype.getChainHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChainHash())); +proto.lnrpc.RPCMessage.prototype.getTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * 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} + * @param {string} value + * @return {!proto.lnrpc.RPCMessage} returns this */ -proto.lnrpc.ChannelUpdate.prototype.getChainHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChainHash())); +proto.lnrpc.RPCMessage.prototype.setTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * optional bytes serialized = 4; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelUpdate.prototype.setChainHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.RPCMessage.prototype.getSerialized = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional uint64 chan_id = 3; + * optional bytes serialized = 4; + * This is a type-conversion wrapper around `getSerialized()` * @return {string} */ -proto.lnrpc.ChannelUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +proto.lnrpc.RPCMessage.prototype.getSerialized_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSerialized())); }; /** - * @param {string} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * optional bytes serialized = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSerialized()` + * @return {!Uint8Array} */ -proto.lnrpc.ChannelUpdate.prototype.setChanId = function(value) { - return jspb.Message.setProto3StringIntField(this, 3, value); +proto.lnrpc.RPCMessage.prototype.getSerialized_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSerialized())); }; /** - * optional uint32 timestamp = 4; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.RPCMessage} returns this */ -proto.lnrpc.ChannelUpdate.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.RPCMessage.prototype.setSerialized = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; + /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * 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.ChannelUpdate.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - +proto.lnrpc.RPCMiddlewareResponse.oneofGroups_ = [[2,3]]; /** - * optional uint32 message_flags = 10; - * @return {number} + * @enum {number} */ -proto.lnrpc.ChannelUpdate.prototype.getMessageFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase = { + MIDDLEWARE_MESSAGE_NOT_SET: 0, + REGISTER: 2, + FEEDBACK: 3 }; - /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * @return {proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase} */ -proto.lnrpc.ChannelUpdate.prototype.setMessageFlags = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.RPCMiddlewareResponse.prototype.getMiddlewareMessageCase = function() { + return /** @type {proto.lnrpc.RPCMiddlewareResponse.MiddlewareMessageCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint32 channel_flags = 5; - * @return {number} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.ChannelUpdate.prototype.getChannelFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.RPCMiddlewareResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RPCMiddlewareResponse.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.RPCMiddlewareResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelUpdate.prototype.setChannelFlags = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.RPCMiddlewareResponse.toObject = function(includeInstance, msg) { + var f, obj = { + refMsgId: jspb.Message.getFieldWithDefault(msg, 1, 0), + register: (f = msg.getRegister()) && proto.lnrpc.MiddlewareRegistration.toObject(includeInstance, f), + feedback: (f = msg.getFeedback()) && proto.lnrpc.InterceptFeedback.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint32 time_lock_delta = 6; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.RPCMiddlewareResponse} */ -proto.lnrpc.ChannelUpdate.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.RPCMiddlewareResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.RPCMiddlewareResponse; + return proto.lnrpc.RPCMiddlewareResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.RPCMiddlewareResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.RPCMiddlewareResponse} */ -proto.lnrpc.ChannelUpdate.prototype.setTimeLockDelta = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.RPCMiddlewareResponse.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.setRefMsgId(value); + break; + case 2: + var value = new proto.lnrpc.MiddlewareRegistration; + reader.readMessage(value,proto.lnrpc.MiddlewareRegistration.deserializeBinaryFromReader); + msg.setRegister(value); + break; + case 3: + var value = new proto.lnrpc.InterceptFeedback; + reader.readMessage(value,proto.lnrpc.InterceptFeedback.deserializeBinaryFromReader); + msg.setFeedback(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 htlc_minimum_m_atoms = 7; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ChannelUpdate.prototype.getHtlcMinimumMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.RPCMiddlewareResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.RPCMiddlewareResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.RPCMiddlewareResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelUpdate.prototype.setHtlcMinimumMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.RPCMiddlewareResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRefMsgId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRegister(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.lnrpc.MiddlewareRegistration.serializeBinaryToWriter + ); + } + f = message.getFeedback(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.InterceptFeedback.serializeBinaryToWriter + ); + } }; /** - * optional uint32 base_fee = 8; + * optional uint64 ref_msg_id = 1; * @return {number} */ -proto.lnrpc.ChannelUpdate.prototype.getBaseFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.RPCMiddlewareResponse.prototype.getRefMsgId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this */ -proto.lnrpc.ChannelUpdate.prototype.setBaseFee = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.RPCMiddlewareResponse.prototype.setRefMsgId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 fee_rate = 9; - * @return {number} + * optional MiddlewareRegistration register = 2; + * @return {?proto.lnrpc.MiddlewareRegistration} */ -proto.lnrpc.ChannelUpdate.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.RPCMiddlewareResponse.prototype.getRegister = function() { + return /** @type{?proto.lnrpc.MiddlewareRegistration} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.MiddlewareRegistration, 2)); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this - */ -proto.lnrpc.ChannelUpdate.prototype.setFeeRate = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + * @param {?proto.lnrpc.MiddlewareRegistration|undefined} value + * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this +*/ +proto.lnrpc.RPCMiddlewareResponse.prototype.setRegister = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_[0], value); }; /** - * optional uint64 htlc_maximum_m_atoms = 11; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this */ -proto.lnrpc.ChannelUpdate.prototype.getHtlcMaximumMAtoms = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.RPCMiddlewareResponse.prototype.clearRegister = function() { + return this.setRegister(undefined); }; /** - * @param {number} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelUpdate.prototype.setHtlcMaximumMAtoms = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.RPCMiddlewareResponse.prototype.hasRegister = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional bytes extra_opaque_data = 12; - * @return {!(string|Uint8Array)} + * optional InterceptFeedback feedback = 3; + * @return {?proto.lnrpc.InterceptFeedback} */ -proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +proto.lnrpc.RPCMiddlewareResponse.prototype.getFeedback = function() { + return /** @type{?proto.lnrpc.InterceptFeedback} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.InterceptFeedback, 3)); }; /** - * 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())); + * @param {?proto.lnrpc.InterceptFeedback|undefined} value + * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this +*/ +proto.lnrpc.RPCMiddlewareResponse.prototype.setFeedback = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.RPCMiddlewareResponse.oneofGroups_[0], value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.lnrpc.RPCMiddlewareResponse} returns this */ -proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getExtraOpaqueData())); +proto.lnrpc.RPCMiddlewareResponse.prototype.clearFeedback = function() { + return this.setFeedback(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.ChannelUpdate} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelUpdate.prototype.setExtraOpaqueData = function(value) { - return jspb.Message.setProto3BytesField(this, 12, value); +proto.lnrpc.RPCMiddlewareResponse.prototype.hasFeedback = function() { + return jspb.Message.getField(this, 3) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.MacaroonId.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -42918,8 +51694,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.MacaroonId.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MacaroonId.toObject(opt_includeInstance, this); +proto.lnrpc.MiddlewareRegistration.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MiddlewareRegistration.toObject(opt_includeInstance, this); }; @@ -42928,16 +51704,15 @@ proto.lnrpc.MacaroonId.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.MacaroonId} msg The msg instance to transform. + * @param {!proto.lnrpc.MiddlewareRegistration} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MacaroonId.toObject = function(includeInstance, msg) { +proto.lnrpc.MiddlewareRegistration.toObject = function(includeInstance, msg) { var f, obj = { - nonce: msg.getNonce_asB64(), - storageid: msg.getStorageid_asB64(), - opsList: jspb.Message.toObjectList(msg.getOpsList(), - proto.lnrpc.Op.toObject, includeInstance) + middlewareName: jspb.Message.getFieldWithDefault(msg, 1, ""), + customMacaroonCaveatName: jspb.Message.getFieldWithDefault(msg, 2, ""), + readOnlyMode: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -42951,23 +51726,23 @@ proto.lnrpc.MacaroonId.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MacaroonId} + * @return {!proto.lnrpc.MiddlewareRegistration} */ -proto.lnrpc.MacaroonId.deserializeBinary = function(bytes) { +proto.lnrpc.MiddlewareRegistration.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MacaroonId; - return proto.lnrpc.MacaroonId.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.MiddlewareRegistration; + return proto.lnrpc.MiddlewareRegistration.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.MacaroonId} msg The message object to deserialize into. + * @param {!proto.lnrpc.MiddlewareRegistration} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.MacaroonId} + * @return {!proto.lnrpc.MiddlewareRegistration} */ -proto.lnrpc.MacaroonId.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MiddlewareRegistration.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42975,17 +51750,16 @@ proto.lnrpc.MacaroonId.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNonce(value); + var value = /** @type {string} */ (reader.readString()); + msg.setMiddlewareName(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStorageid(value); + var value = /** @type {string} */ (reader.readString()); + msg.setCustomMacaroonCaveatName(value); break; case 3: - var value = new proto.lnrpc.Op; - reader.readMessage(value,proto.lnrpc.Op.deserializeBinaryFromReader); - msg.addOps(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReadOnlyMode(value); break; default: reader.skipField(); @@ -43000,9 +51774,9 @@ proto.lnrpc.MacaroonId.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.MacaroonId.prototype.serializeBinary = function() { +proto.lnrpc.MiddlewareRegistration.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.MacaroonId.serializeBinaryToWriter(this, writer); + proto.lnrpc.MiddlewareRegistration.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43010,167 +51784,91 @@ proto.lnrpc.MacaroonId.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MacaroonId} message + * @param {!proto.lnrpc.MiddlewareRegistration} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MacaroonId.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MiddlewareRegistration.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNonce_asU8(); + f = message.getMiddlewareName(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getStorageid_asU8(); + f = message.getCustomMacaroonCaveatName(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } - f = message.getOpsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getReadOnlyMode(); + if (f) { + writer.writeBool( 3, - f, - proto.lnrpc.Op.serializeBinaryToWriter + f ); } }; /** - * optional bytes nonce = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MacaroonId.prototype.getNonce = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes nonce = 1; - * This is a type-conversion wrapper around `getNonce()` + * optional string middleware_name = 1; * @return {string} */ -proto.lnrpc.MacaroonId.prototype.getNonce_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNonce())); -}; - - -/** - * optional bytes nonce = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNonce()` - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonId.prototype.getNonce_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNonce())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MacaroonId} returns this - */ -proto.lnrpc.MacaroonId.prototype.setNonce = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.MiddlewareRegistration.prototype.getMiddlewareName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes storageId = 2; - * @return {!(string|Uint8Array)} + * @param {string} value + * @return {!proto.lnrpc.MiddlewareRegistration} returns this */ -proto.lnrpc.MacaroonId.prototype.getStorageid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.MiddlewareRegistration.prototype.setMiddlewareName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes storageId = 2; - * This is a type-conversion wrapper around `getStorageid()` + * optional string custom_macaroon_caveat_name = 2; * @return {string} */ -proto.lnrpc.MacaroonId.prototype.getStorageid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStorageid())); -}; - - -/** - * optional bytes storageId = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStorageid()` - * @return {!Uint8Array} - */ -proto.lnrpc.MacaroonId.prototype.getStorageid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStorageid())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.MacaroonId} returns this - */ -proto.lnrpc.MacaroonId.prototype.setStorageid = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.MiddlewareRegistration.prototype.getCustomMacaroonCaveatName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * repeated Op ops = 3; - * @return {!Array} + * @param {string} value + * @return {!proto.lnrpc.MiddlewareRegistration} returns this */ -proto.lnrpc.MacaroonId.prototype.getOpsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Op, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.lnrpc.MacaroonId} returns this -*/ -proto.lnrpc.MacaroonId.prototype.setOpsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.lnrpc.MiddlewareRegistration.prototype.setCustomMacaroonCaveatName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * @param {!proto.lnrpc.Op=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Op} + * optional bool read_only_mode = 3; + * @return {boolean} */ -proto.lnrpc.MacaroonId.prototype.addOps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.Op, opt_index); +proto.lnrpc.MiddlewareRegistration.prototype.getReadOnlyMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.MacaroonId} returns this + * @param {boolean} value + * @return {!proto.lnrpc.MiddlewareRegistration} returns this */ -proto.lnrpc.MacaroonId.prototype.clearOpsList = function() { - return this.setOpsList([]); +proto.lnrpc.MiddlewareRegistration.prototype.setReadOnlyMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Op.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -43186,8 +51884,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Op.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Op.toObject(opt_includeInstance, this); +proto.lnrpc.InterceptFeedback.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InterceptFeedback.toObject(opt_includeInstance, this); }; @@ -43196,14 +51894,15 @@ proto.lnrpc.Op.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Op} msg The msg instance to transform. + * @param {!proto.lnrpc.InterceptFeedback} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Op.toObject = function(includeInstance, msg) { +proto.lnrpc.InterceptFeedback.toObject = function(includeInstance, msg) { var f, obj = { - entity: jspb.Message.getFieldWithDefault(msg, 1, ""), - actionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + error: jspb.Message.getFieldWithDefault(msg, 1, ""), + replaceResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + replacementSerialized: msg.getReplacementSerialized_asB64() }; if (includeInstance) { @@ -43217,23 +51916,23 @@ proto.lnrpc.Op.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Op} + * @return {!proto.lnrpc.InterceptFeedback} */ -proto.lnrpc.Op.deserializeBinary = function(bytes) { +proto.lnrpc.InterceptFeedback.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Op; - return proto.lnrpc.Op.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.InterceptFeedback; + return proto.lnrpc.InterceptFeedback.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Op} msg The message object to deserialize into. + * @param {!proto.lnrpc.InterceptFeedback} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Op} + * @return {!proto.lnrpc.InterceptFeedback} */ -proto.lnrpc.Op.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.InterceptFeedback.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -43242,11 +51941,15 @@ proto.lnrpc.Op.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setEntity(value); + msg.setError(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addActions(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReplaceResponse(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReplacementSerialized(value); break; default: reader.skipField(); @@ -43261,9 +51964,9 @@ proto.lnrpc.Op.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Op.prototype.serializeBinary = function() { +proto.lnrpc.InterceptFeedback.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Op.serializeBinaryToWriter(this, writer); + proto.lnrpc.InterceptFeedback.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43271,81 +51974,111 @@ proto.lnrpc.Op.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Op} message + * @param {!proto.lnrpc.InterceptFeedback} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Op.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.InterceptFeedback.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEntity(); + f = message.getError(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedString( + f = message.getReplaceResponse(); + if (f) { + writer.writeBool( 2, f ); } + f = message.getReplacementSerialized_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional string entity = 1; + * optional string error = 1; * @return {string} */ -proto.lnrpc.Op.prototype.getEntity = function() { +proto.lnrpc.InterceptFeedback.prototype.getError = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.lnrpc.Op} returns this + * @return {!proto.lnrpc.InterceptFeedback} returns this */ -proto.lnrpc.Op.prototype.setEntity = function(value) { +proto.lnrpc.InterceptFeedback.prototype.setError = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated string actions = 2; - * @return {!Array} + * optional bool replace_response = 2; + * @return {boolean} */ -proto.lnrpc.Op.prototype.getActionsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.lnrpc.InterceptFeedback.prototype.getReplaceResponse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {!Array} value - * @return {!proto.lnrpc.Op} returns this + * @param {boolean} value + * @return {!proto.lnrpc.InterceptFeedback} returns this */ -proto.lnrpc.Op.prototype.setActionsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.lnrpc.InterceptFeedback.prototype.setReplaceResponse = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.lnrpc.Op} returns this + * optional bytes replacement_serialized = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Op.prototype.addActions = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.lnrpc.InterceptFeedback.prototype.getReplacementSerialized = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.lnrpc.Op} returns this + * optional bytes replacement_serialized = 3; + * This is a type-conversion wrapper around `getReplacementSerialized()` + * @return {string} */ -proto.lnrpc.Op.prototype.clearActionsList = function() { - return this.setActionsList([]); +proto.lnrpc.InterceptFeedback.prototype.getReplacementSerialized_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReplacementSerialized())); +}; + + +/** + * optional bytes replacement_serialized = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReplacementSerialized()` + * @return {!Uint8Array} + */ +proto.lnrpc.InterceptFeedback.prototype.getReplacementSerialized_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReplacementSerialized())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.InterceptFeedback} returns this + */ +proto.lnrpc.InterceptFeedback.prototype.setReplacementSerialized = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -43364,10 +52097,11 @@ proto.lnrpc.AddressType = { * @enum {number} */ proto.lnrpc.CommitmentType = { - LEGACY: 0, - STATIC_REMOTE_KEY: 1, - ANCHORS: 2, - UNKNOWN_COMMITMENT_TYPE: 999 + UNKNOWN_COMMITMENT_TYPE: 0, + LEGACY: 1, + STATIC_REMOTE_KEY: 2, + ANCHORS: 3, + SCRIPT_ENFORCED_LEASE: 4 }; /** @@ -43452,7 +52186,26 @@ proto.lnrpc.FeatureBit = { PAYMENT_ADDR_REQ: 14, PAYMENT_ADDR_OPT: 15, MPP_REQ: 16, - MPP_OPT: 17 + MPP_OPT: 17, + WUMBO_CHANNELS_REQ: 18, + WUMBO_CHANNELS_OPT: 19, + ANCHORS_REQ: 20, + ANCHORS_OPT: 21, + ANCHORS_ZERO_FEE_HTLC_REQ: 22, + ANCHORS_ZERO_FEE_HTLC_OPT: 23, + AMP_REQ: 30, + AMP_OPT: 31 +}; + +/** + * @enum {number} + */ +proto.lnrpc.UpdateFailure = { + UPDATE_FAILURE_UNKNOWN: 0, + UPDATE_FAILURE_PENDING: 1, + UPDATE_FAILURE_NOT_FOUND: 2, + UPDATE_FAILURE_INTERNAL_ERR: 3, + UPDATE_FAILURE_INVALID_PARAMETER: 4 }; goog.object.extend(exports, proto); diff --git a/app/middleware/ln/regen.sh b/app/middleware/ln/regen.sh index 44a185b042..4dbf3943c0 100755 --- a/app/middleware/ln/regen.sh +++ b/app/middleware/ln/regen.sh @@ -12,7 +12,7 @@ --js_out=import_style=commonjs_strict,binary:./ \ --grpc_out=generate_package_definition:./ \ --plugin=protoc-gen-grpc=./../../../node_modules/grpc-tools/bin/grpc_node_plugin \ - ./rpc.proto + ./lightning.proto ./../../../node_modules/grpc-tools/bin/protoc \ -I/usr/local/include \ @@ -53,8 +53,8 @@ # commonjs_strict is broken (see https://github.com/grpc/grpc-node/issues/1445). # To fix it, we need to tweak the require at the top of the pb files # to account for the extra package name. -sed -i "s/require('.\/rpc_pb.js')/require('.\/rpc_pb.js').lnrpc/" rpc_grpc_pb.js -sed -i "s/require('.\/rpc_pb.js')/require('.\/rpc_pb.js').lnrpc/" walletunlocker_grpc_pb.js +sed -i "s/require('.\/lightning_pb.js')/require('.\/lightning_pb.js').lnrpc/" lightning_grpc_pb.js +sed -i "s/require('.\/lightning_pb.js')/require('.\/lightning_pb.js').lnrpc/" walletunlocker_grpc_pb.js sed -i "s/require('.\/walletunlocker_pb.js')/require('.\/walletunlocker_pb.js').lnrpc/" walletunlocker_grpc_pb.js sed -i "s/require('.\/wtclient_pb.js')/require('.\/wtclient_pb.js').wtclientrpc/" wtclient_grpc_pb.js sed -i "s/require('.\/invoices_pb.js')/require('.\/invoices_pb.js').invoicesrpc/" invoices_grpc_pb.js diff --git a/app/middleware/ln/walletunlocker.proto b/app/middleware/ln/walletunlocker.proto index fca95ccc37..ad572f54ea 100644 --- a/app/middleware/ln/walletunlocker.proto +++ b/app/middleware/ln/walletunlocker.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -import "rpc.proto"; +import "lightning.proto"; package lnrpc; @@ -141,8 +141,117 @@ message InitWalletRequest { recover the funds in each channel from a remote force closed transaction. */ ChanBackupSnapshot channel_backups = 5; + + /* + stateless_init is an optional argument instructing the daemon NOT to create + any *.macaroon files in its filesystem. If this parameter is set, then the + admin macaroon returned in the response MUST be stored by the caller of the + RPC as otherwise all access to the daemon will be lost! + */ + bool stateless_init = 6; + + /* + extended_master_key is an alternative to specifying cipher_seed_mnemonic and + aezeed_passphrase. Instead of deriving the master root key from the entropy + of an aezeed cipher seed, the given extended master root key is used + directly as the wallet's master key. This allows users to import/use a + master key from another wallet. When doing so, lnd still uses its default + SegWit only (BIP49/84) derivation paths and funds from custom/non-default + derivation paths will not automatically appear in the on-chain wallet. Using + an 'xprv' instead of an aezeed also has the disadvantage that the wallet's + birthday is not known as that is an information that's only encoded in the + aezeed, not the xprv. Therefore a birthday needs to be specified in + extended_master_key_birthday_timestamp or a "safe" default value will be + used. + */ + string extended_master_key = 7; + + /* + extended_master_key_birthday_timestamp is the optional unix timestamp in + seconds to use as the wallet's birthday when using an extended master key + to restore the wallet. lnd will only start scanning for funds in blocks that + are after the birthday which can speed up the process significantly. If the + birthday is not known, this should be left at its default value of 0 in + which case lnd will start scanning from the first SegWit block (481824 on + mainnet). + */ + uint64 extended_master_key_birthday_timestamp = 8; + + /* + watch_only is the third option of initializing a wallet: by importing + account xpubs only and therefore creating a watch-only wallet that does not + contain any private keys. That means the wallet won't be able to sign for + any of the keys and _needs_ to be run with a remote signer that has the + corresponding private keys and can serve signing RPC requests. + */ + WatchOnly watch_only = 9; } message InitWalletResponse { + /* + The binary serialized admin macaroon that can be used to access the daemon + after creating the wallet. If the stateless_init parameter was set to true, + this is the ONLY copy of the macaroon and MUST be stored safely by the + caller. Otherwise a copy of this macaroon is also persisted on disk by the + daemon, together with other macaroon files. + */ + bytes admin_macaroon = 1; +} + +message WatchOnly { + /* + The unix timestamp in seconds of when the master key was created. lnd will + only start scanning for funds in blocks that are after the birthday which + can speed up the process significantly. If the birthday is not known, this + should be left at its default value of 0 in which case lnd will start + scanning from the first SegWit block (481824 on mainnet). + */ + uint64 master_key_birthday_timestamp = 1; + + /* + The fingerprint of the root key (also known as the key with derivation path + m/) from which the account public keys were derived from. This may be + required by some hardware wallets for proper identification and signing. The + bytes must be in big-endian order. + */ + bytes master_key_fingerprint = 2; + + /* + The list of accounts to import. There _must_ be an account for all of lnd's + main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the + coin type is always 0, even for testnet/regtest) and lnd's internal key + scope (m/1017'/'/'), where account is the key family as + defined in `keychain/derivation.go` (currently indices 0 to 9). + */ + repeated WatchOnlyAccount accounts = 3; +} + +message WatchOnlyAccount { + /* + Purpose is the first number in the derivation path, must be either 49, 84 + or 1017. + */ + uint32 purpose = 1; + + /* + Coin type is the second number in the derivation path, this is _always_ 0 + for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on + testnet or regtest. + */ + uint32 coin_type = 2; + + /* + Account is the third number in the derivation path. For purposes 49 and 84 + at least the default account (index 0) needs to be created but optional + additional accounts are allowed. For purpose 1017 there needs to be exactly + one account for each of the key families defined in `keychain/derivation.go` + (currently indices 0 to 9) + */ + uint32 account = 3; + + /* + The extended public key at depth 3 for the given account. + */ + string xpub = 4; } message UnlockWalletRequest { @@ -172,9 +281,28 @@ message UnlockWalletRequest { */ ChanBackupSnapshot channel_backups = 3; + /* + dcrw_client_key_cert is a key and cert blob generated by dcrwallet used to + authenticate grpc connections to it. + */ bytes dcrw_client_key_cert = 901; + + /* + stateless_init is an optional argument instructing the daemon NOT to create + any *.macaroon files in its file system. + */ + bool stateless_init = 4; } message UnlockWalletResponse { + /* + The binary serialized admin macaroon that can be used to access the daemon + after rotating the macaroon root key. If both the stateless_init and + new_macaroon_root_key parameter were set to true, this is the ONLY copy of + the macaroon that was created from the new root key and MUST be stored + safely by the caller. Otherwise a copy of this macaroon is also persisted on + disk by the daemon, together with other macaroon files. + */ + bytes admin_macaroon = 901; } message ChangePasswordRequest { @@ -189,6 +317,30 @@ message ChangePasswordRequest { daemon. When using REST, this field must be encoded as base64. */ bytes new_password = 2; + + /* + stateless_init is an optional argument instructing the daemon NOT to create + any *.macaroon files in its filesystem. If this parameter is set, then the + admin macaroon returned in the response MUST be stored by the caller of the + RPC as otherwise all access to the daemon will be lost! + */ + bool stateless_init = 3; + + /* + new_macaroon_root_key is an optional argument instructing the daemon to + rotate the macaroon root key when set to true. This will invalidate all + previously generated macaroons. + */ + bool new_macaroon_root_key = 4; } message ChangePasswordResponse { + /* + The binary serialized admin macaroon that can be used to access the daemon + after rotating the macaroon root key. If both the stateless_init and + new_macaroon_root_key parameter were set to true, this is the ONLY copy of + the macaroon that was created from the new root key and MUST be stored + safely by the caller. Otherwise a copy of this macaroon is also persisted on + disk by the daemon, together with other macaroon files. + */ + bytes admin_macaroon = 1; } diff --git a/app/middleware/ln/walletunlocker_grpc_pb.js b/app/middleware/ln/walletunlocker_grpc_pb.js index c13b474edc..24b2f69bcc 100644 --- a/app/middleware/ln/walletunlocker_grpc_pb.js +++ b/app/middleware/ln/walletunlocker_grpc_pb.js @@ -2,7 +2,7 @@ 'use strict'; var walletunlocker_pb = require('./walletunlocker_pb.js').lnrpc; -var rpc_pb = require('./rpc_pb.js').lnrpc; +var lightning_pb = require('./lightning_pb.js').lnrpc; function serialize_lnrpc_ChangePasswordRequest(arg) { if (!(arg instanceof walletunlocker_pb.ChangePasswordRequest)) { diff --git a/app/middleware/ln/walletunlocker_pb.js b/app/middleware/ln/walletunlocker_pb.js index 3c90210f05..2fde3e28e8 100644 --- a/app/middleware/ln/walletunlocker_pb.js +++ b/app/middleware/ln/walletunlocker_pb.js @@ -15,8 +15,8 @@ var jspb = require('google-protobuf'); var goog = jspb; var proto = {}; -var rpc_pb = require('./rpc_pb.js'); -goog.object.extend(proto, rpc_pb); +var lightning_pb = require('./lightning_pb.js'); +goog.object.extend(proto, lightning_pb); goog.exportSymbol('lnrpc.ChangePasswordRequest', null, proto); goog.exportSymbol('lnrpc.ChangePasswordResponse', null, proto); goog.exportSymbol('lnrpc.GenSeedRequest', null, proto); @@ -25,6 +25,8 @@ goog.exportSymbol('lnrpc.InitWalletRequest', null, proto); goog.exportSymbol('lnrpc.InitWalletResponse', null, proto); goog.exportSymbol('lnrpc.UnlockWalletRequest', null, proto); goog.exportSymbol('lnrpc.UnlockWalletResponse', null, proto); +goog.exportSymbol('lnrpc.WatchOnly', null, proto); +goog.exportSymbol('lnrpc.WatchOnlyAccount', null, proto); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -109,6 +111,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.lnrpc.InitWalletResponse.displayName = 'proto.lnrpc.InitWalletResponse'; } +/** + * 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.WatchOnly = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.WatchOnly.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.WatchOnly, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.WatchOnly.displayName = 'proto.lnrpc.WatchOnly'; +} +/** + * 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.WatchOnlyAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.WatchOnlyAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.lnrpc.WatchOnlyAccount.displayName = 'proto.lnrpc.WatchOnlyAccount'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -141,7 +185,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.lnrpc.UnlockWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, 500, null, null); }; goog.inherits(proto.lnrpc.UnlockWalletResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -654,7 +698,11 @@ proto.lnrpc.InitWalletRequest.toObject = function(includeInstance, msg) { cipherSeedMnemonicList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, aezeedPassphrase: msg.getAezeedPassphrase_asB64(), recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0), - channelBackups: (f = msg.getChannelBackups()) && rpc_pb.ChanBackupSnapshot.toObject(includeInstance, f) + channelBackups: (f = msg.getChannelBackups()) && lightning_pb.ChanBackupSnapshot.toObject(includeInstance, f), + statelessInit: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + extendedMasterKey: jspb.Message.getFieldWithDefault(msg, 7, ""), + extendedMasterKeyBirthdayTimestamp: jspb.Message.getFieldWithDefault(msg, 8, 0), + watchOnly: (f = msg.getWatchOnly()) && proto.lnrpc.WatchOnly.toObject(includeInstance, f) }; if (includeInstance) { @@ -708,10 +756,27 @@ proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader msg.setRecoveryWindow(value); break; case 5: - var value = new rpc_pb.ChanBackupSnapshot; - reader.readMessage(value,rpc_pb.ChanBackupSnapshot.deserializeBinaryFromReader); + var value = new lightning_pb.ChanBackupSnapshot; + reader.readMessage(value,lightning_pb.ChanBackupSnapshot.deserializeBinaryFromReader); msg.setChannelBackups(value); break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStatelessInit(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setExtendedMasterKey(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExtendedMasterKeyBirthdayTimestamp(value); + break; + case 9: + var value = new proto.lnrpc.WatchOnly; + reader.readMessage(value,proto.lnrpc.WatchOnly.deserializeBinaryFromReader); + msg.setWatchOnly(value); + break; default: reader.skipField(); break; @@ -774,7 +839,36 @@ proto.lnrpc.InitWalletRequest.serializeBinaryToWriter = function(message, writer writer.writeMessage( 5, f, - rpc_pb.ChanBackupSnapshot.serializeBinaryToWriter + lightning_pb.ChanBackupSnapshot.serializeBinaryToWriter + ); + } + f = message.getStatelessInit(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getExtendedMasterKey(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getExtendedMasterKeyBirthdayTimestamp(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getWatchOnly(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.lnrpc.WatchOnly.serializeBinaryToWriter ); } }; @@ -925,7 +1019,7 @@ proto.lnrpc.InitWalletRequest.prototype.setRecoveryWindow = function(value) { */ proto.lnrpc.InitWalletRequest.prototype.getChannelBackups = function() { return /** @type{?proto.lnrpc.ChanBackupSnapshot} */ ( - jspb.Message.getWrapperField(this, rpc_pb.ChanBackupSnapshot, 5)); + jspb.Message.getWrapperField(this, lightning_pb.ChanBackupSnapshot, 5)); }; @@ -956,6 +1050,97 @@ proto.lnrpc.InitWalletRequest.prototype.hasChannelBackups = function() { }; +/** + * optional bool stateless_init = 6; + * @return {boolean} + */ +proto.lnrpc.InitWalletRequest.prototype.getStatelessInit = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.InitWalletRequest} returns this + */ +proto.lnrpc.InitWalletRequest.prototype.setStatelessInit = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string extended_master_key = 7; + * @return {string} + */ +proto.lnrpc.InitWalletRequest.prototype.getExtendedMasterKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.InitWalletRequest} returns this + */ +proto.lnrpc.InitWalletRequest.prototype.setExtendedMasterKey = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional uint64 extended_master_key_birthday_timestamp = 8; + * @return {number} + */ +proto.lnrpc.InitWalletRequest.prototype.getExtendedMasterKeyBirthdayTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.InitWalletRequest} returns this + */ +proto.lnrpc.InitWalletRequest.prototype.setExtendedMasterKeyBirthdayTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional WatchOnly watch_only = 9; + * @return {?proto.lnrpc.WatchOnly} + */ +proto.lnrpc.InitWalletRequest.prototype.getWatchOnly = function() { + return /** @type{?proto.lnrpc.WatchOnly} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.WatchOnly, 9)); +}; + + +/** + * @param {?proto.lnrpc.WatchOnly|undefined} value + * @return {!proto.lnrpc.InitWalletRequest} returns this +*/ +proto.lnrpc.InitWalletRequest.prototype.setWatchOnly = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.lnrpc.InitWalletRequest} returns this + */ +proto.lnrpc.InitWalletRequest.prototype.clearWatchOnly = function() { + return this.setWatchOnly(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.InitWalletRequest.prototype.hasWatchOnly = function() { + return jspb.Message.getField(this, 9) != null; +}; + + @@ -988,7 +1173,7 @@ proto.lnrpc.InitWalletResponse.prototype.toObject = function(opt_includeInstance */ proto.lnrpc.InitWalletResponse.toObject = function(includeInstance, msg) { var f, obj = { - + adminMacaroon: msg.getAdminMacaroon_asB64() }; if (includeInstance) { @@ -1025,6 +1210,10 @@ proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader = function(msg, reade } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAdminMacaroon(value); + break; default: reader.skipField(); break; @@ -1054,10 +1243,66 @@ proto.lnrpc.InitWalletResponse.prototype.serializeBinary = function() { */ proto.lnrpc.InitWalletResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAdminMacaroon_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes admin_macaroon = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.InitWalletResponse.prototype.getAdminMacaroon = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes admin_macaroon = 1; + * This is a type-conversion wrapper around `getAdminMacaroon()` + * @return {string} + */ +proto.lnrpc.InitWalletResponse.prototype.getAdminMacaroon_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAdminMacaroon())); +}; + + +/** + * optional bytes admin_macaroon = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAdminMacaroon()` + * @return {!Uint8Array} + */ +proto.lnrpc.InitWalletResponse.prototype.getAdminMacaroon_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAdminMacaroon())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.InitWalletResponse} returns this + */ +proto.lnrpc.InitWalletResponse.prototype.setAdminMacaroon = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.WatchOnly.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1073,8 +1318,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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.WatchOnly.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WatchOnly.toObject(opt_includeInstance, this); }; @@ -1083,16 +1328,16 @@ proto.lnrpc.UnlockWalletRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. 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.WatchOnly} 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.WatchOnly.toObject = function(includeInstance, msg) { var f, obj = { - walletPassword: msg.getWalletPassword_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0), - channelBackups: (f = msg.getChannelBackups()) && rpc_pb.ChanBackupSnapshot.toObject(includeInstance, f), - dcrwClientKeyCert: msg.getDcrwClientKeyCert_asB64() + masterKeyBirthdayTimestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + masterKeyFingerprint: msg.getMasterKeyFingerprint_asB64(), + accountsList: jspb.Message.toObjectList(msg.getAccountsList(), + proto.lnrpc.WatchOnlyAccount.toObject, includeInstance) }; if (includeInstance) { @@ -1106,23 +1351,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.WatchOnly} */ -proto.lnrpc.UnlockWalletRequest.deserializeBinary = function(bytes) { +proto.lnrpc.WatchOnly.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.WatchOnly; + return proto.lnrpc.WatchOnly.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.WatchOnly} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.UnlockWalletRequest} + * @return {!proto.lnrpc.WatchOnly} */ -proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.WatchOnly.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1130,21 +1375,17 @@ proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWalletPassword(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setMasterKeyBirthdayTimestamp(value); break; case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecoveryWindow(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMasterKeyFingerprint(value); break; case 3: - var value = new rpc_pb.ChanBackupSnapshot; - reader.readMessage(value,rpc_pb.ChanBackupSnapshot.deserializeBinaryFromReader); - msg.setChannelBackups(value); - break; - case 901: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDcrwClientKeyCert(value); + var value = new proto.lnrpc.WatchOnlyAccount; + reader.readMessage(value,proto.lnrpc.WatchOnlyAccount.deserializeBinaryFromReader); + msg.addAccounts(value); break; default: reader.skipField(); @@ -1159,9 +1400,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.WatchOnly.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.WatchOnly.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1169,111 +1410,584 @@ 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.WatchOnly} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.WatchOnly.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getWalletPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getMasterKeyBirthdayTimestamp(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getRecoveryWindow(); - if (f !== 0) { - writer.writeInt32( + f = message.getMasterKeyFingerprint_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); } - f = message.getChannelBackups(); - if (f != null) { - writer.writeMessage( + f = message.getAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, f, - rpc_pb.ChanBackupSnapshot.serializeBinaryToWriter - ); - } - f = message.getDcrwClientKeyCert_asU8(); - if (f.length > 0) { - writer.writeBytes( - 901, - f + proto.lnrpc.WatchOnlyAccount.serializeBinaryToWriter ); } }; /** - * optional bytes wallet_password = 1; + * optional uint64 master_key_birthday_timestamp = 1; + * @return {number} + */ +proto.lnrpc.WatchOnly.prototype.getMasterKeyBirthdayTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.WatchOnly} returns this + */ +proto.lnrpc.WatchOnly.prototype.setMasterKeyBirthdayTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes master_key_fingerprint = 2; * @return {!(string|Uint8Array)} */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.WatchOnly.prototype.getMasterKeyFingerprint = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes wallet_password = 1; - * This is a type-conversion wrapper around `getWalletPassword()` + * optional bytes master_key_fingerprint = 2; + * This is a type-conversion wrapper around `getMasterKeyFingerprint()` * @return {string} */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asB64 = function() { +proto.lnrpc.WatchOnly.prototype.getMasterKeyFingerprint_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWalletPassword())); + this.getMasterKeyFingerprint())); }; /** - * optional bytes wallet_password = 1; + * optional bytes master_key_fingerprint = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWalletPassword()` + * This is a type-conversion wrapper around `getMasterKeyFingerprint()` * @return {!Uint8Array} */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asU8 = function() { +proto.lnrpc.WatchOnly.prototype.getMasterKeyFingerprint_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWalletPassword())); + this.getMasterKeyFingerprint())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.lnrpc.UnlockWalletRequest} returns this + * @return {!proto.lnrpc.WatchOnly} returns this */ -proto.lnrpc.UnlockWalletRequest.prototype.setWalletPassword = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.WatchOnly.prototype.setMasterKeyFingerprint = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional int32 recovery_window = 2; - * @return {number} + * repeated WatchOnlyAccount accounts = 3; + * @return {!Array} */ -proto.lnrpc.UnlockWalletRequest.prototype.getRecoveryWindow = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.WatchOnly.prototype.getAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.WatchOnlyAccount, 3)); }; /** - * @param {number} value - * @return {!proto.lnrpc.UnlockWalletRequest} returns this - */ -proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + * @param {!Array} value + * @return {!proto.lnrpc.WatchOnly} returns this +*/ +proto.lnrpc.WatchOnly.prototype.setAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * optional ChanBackupSnapshot channel_backups = 3; - * @return {?proto.lnrpc.ChanBackupSnapshot} + * @param {!proto.lnrpc.WatchOnlyAccount=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.WatchOnlyAccount} */ -proto.lnrpc.UnlockWalletRequest.prototype.getChannelBackups = function() { +proto.lnrpc.WatchOnly.prototype.addAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.WatchOnlyAccount, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.WatchOnly} returns this + */ +proto.lnrpc.WatchOnly.prototype.clearAccountsList = function() { + return this.setAccountsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.WatchOnlyAccount.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WatchOnlyAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.WatchOnlyAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.WatchOnlyAccount.toObject = function(includeInstance, msg) { + var f, obj = { + purpose: jspb.Message.getFieldWithDefault(msg, 1, 0), + coinType: jspb.Message.getFieldWithDefault(msg, 2, 0), + account: jspb.Message.getFieldWithDefault(msg, 3, 0), + xpub: 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.lnrpc.WatchOnlyAccount} + */ +proto.lnrpc.WatchOnlyAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.WatchOnlyAccount; + return proto.lnrpc.WatchOnlyAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.WatchOnlyAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.WatchOnlyAccount} + */ +proto.lnrpc.WatchOnlyAccount.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.setPurpose(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoinType(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setAccount(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setXpub(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.WatchOnlyAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.WatchOnlyAccount.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.WatchOnlyAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.WatchOnlyAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPurpose(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getCoinType(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getAccount(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getXpub(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 purpose = 1; + * @return {number} + */ +proto.lnrpc.WatchOnlyAccount.prototype.getPurpose = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.WatchOnlyAccount} returns this + */ +proto.lnrpc.WatchOnlyAccount.prototype.setPurpose = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 coin_type = 2; + * @return {number} + */ +proto.lnrpc.WatchOnlyAccount.prototype.getCoinType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.WatchOnlyAccount} returns this + */ +proto.lnrpc.WatchOnlyAccount.prototype.setCoinType = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 account = 3; + * @return {number} + */ +proto.lnrpc.WatchOnlyAccount.prototype.getAccount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.WatchOnlyAccount} returns this + */ +proto.lnrpc.WatchOnlyAccount.prototype.setAccount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string xpub = 4; + * @return {string} + */ +proto.lnrpc.WatchOnlyAccount.prototype.getXpub = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.WatchOnlyAccount} returns this + */ +proto.lnrpc.WatchOnlyAccount.prototype.setXpub = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. 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 Deprecated. 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()) && lightning_pb.ChanBackupSnapshot.toObject(includeInstance, f), + dcrwClientKeyCert: msg.getDcrwClientKeyCert_asB64(), + statelessInit: jspb.Message.getBooleanFieldWithDefault(msg, 4, 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.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 lightning_pb.ChanBackupSnapshot; + reader.readMessage(value,lightning_pb.ChanBackupSnapshot.deserializeBinaryFromReader); + msg.setChannelBackups(value); + break; + case 901: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDcrwClientKeyCert(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStatelessInit(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, + lightning_pb.ChanBackupSnapshot.serializeBinaryToWriter + ); + } + f = message.getDcrwClientKeyCert_asU8(); + if (f.length > 0) { + writer.writeBytes( + 901, + f + ); + } + f = message.getStatelessInit(); + if (f) { + writer.writeBool( + 4, + 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} + */ +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 + * @return {!proto.lnrpc.UnlockWalletRequest} returns this + */ +proto.lnrpc.UnlockWalletRequest.prototype.setWalletPassword = function(value) { + return 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 + * @return {!proto.lnrpc.UnlockWalletRequest} returns this + */ +proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) { + return 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, rpc_pb.ChanBackupSnapshot, 3)); + jspb.Message.getWrapperField(this, lightning_pb.ChanBackupSnapshot, 3)); }; @@ -1346,6 +2060,24 @@ proto.lnrpc.UnlockWalletRequest.prototype.setDcrwClientKeyCert = function(value) }; +/** + * optional bool stateless_init = 4; + * @return {boolean} + */ +proto.lnrpc.UnlockWalletRequest.prototype.getStatelessInit = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.UnlockWalletRequest} returns this + */ +proto.lnrpc.UnlockWalletRequest.prototype.setStatelessInit = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + @@ -1378,7 +2110,7 @@ proto.lnrpc.UnlockWalletResponse.prototype.toObject = function(opt_includeInstan */ proto.lnrpc.UnlockWalletResponse.toObject = function(includeInstance, msg) { var f, obj = { - + adminMacaroon: msg.getAdminMacaroon_asB64() }; if (includeInstance) { @@ -1415,6 +2147,10 @@ proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader = function(msg, rea } var field = reader.getFieldNumber(); switch (field) { + case 901: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAdminMacaroon(value); + break; default: reader.skipField(); break; @@ -1444,6 +2180,55 @@ proto.lnrpc.UnlockWalletResponse.prototype.serializeBinary = function() { */ proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAdminMacaroon_asU8(); + if (f.length > 0) { + writer.writeBytes( + 901, + f + ); + } +}; + + +/** + * optional bytes admin_macaroon = 901; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.UnlockWalletResponse.prototype.getAdminMacaroon = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 901, "")); +}; + + +/** + * optional bytes admin_macaroon = 901; + * This is a type-conversion wrapper around `getAdminMacaroon()` + * @return {string} + */ +proto.lnrpc.UnlockWalletResponse.prototype.getAdminMacaroon_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAdminMacaroon())); +}; + + +/** + * optional bytes admin_macaroon = 901; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAdminMacaroon()` + * @return {!Uint8Array} + */ +proto.lnrpc.UnlockWalletResponse.prototype.getAdminMacaroon_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAdminMacaroon())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.UnlockWalletResponse} returns this + */ +proto.lnrpc.UnlockWalletResponse.prototype.setAdminMacaroon = function(value) { + return jspb.Message.setProto3BytesField(this, 901, value); }; @@ -1480,7 +2265,9 @@ proto.lnrpc.ChangePasswordRequest.prototype.toObject = function(opt_includeInsta proto.lnrpc.ChangePasswordRequest.toObject = function(includeInstance, msg) { var f, obj = { currentPassword: msg.getCurrentPassword_asB64(), - newPassword: msg.getNewPassword_asB64() + newPassword: msg.getNewPassword_asB64(), + statelessInit: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + newMacaroonRootKey: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -1525,6 +2312,14 @@ proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader = function(msg, re var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setNewPassword(value); break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStatelessInit(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNewMacaroonRootKey(value); + break; default: reader.skipField(); break; @@ -1568,6 +2363,20 @@ proto.lnrpc.ChangePasswordRequest.serializeBinaryToWriter = function(message, wr f ); } + f = message.getStatelessInit(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getNewMacaroonRootKey(); + if (f) { + writer.writeBool( + 4, + f + ); + } }; @@ -1655,6 +2464,42 @@ proto.lnrpc.ChangePasswordRequest.prototype.setNewPassword = function(value) { }; +/** + * optional bool stateless_init = 3; + * @return {boolean} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getStatelessInit = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.ChangePasswordRequest} returns this + */ +proto.lnrpc.ChangePasswordRequest.prototype.setStatelessInit = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bool new_macaroon_root_key = 4; + * @return {boolean} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getNewMacaroonRootKey = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.ChangePasswordRequest} returns this + */ +proto.lnrpc.ChangePasswordRequest.prototype.setNewMacaroonRootKey = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + @@ -1687,7 +2532,7 @@ proto.lnrpc.ChangePasswordResponse.prototype.toObject = function(opt_includeInst */ proto.lnrpc.ChangePasswordResponse.toObject = function(includeInstance, msg) { var f, obj = { - + adminMacaroon: msg.getAdminMacaroon_asB64() }; if (includeInstance) { @@ -1724,6 +2569,10 @@ proto.lnrpc.ChangePasswordResponse.deserializeBinaryFromReader = function(msg, r } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAdminMacaroon(value); + break; default: reader.skipField(); break; @@ -1753,6 +2602,55 @@ proto.lnrpc.ChangePasswordResponse.prototype.serializeBinary = function() { */ proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAdminMacaroon_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes admin_macaroon = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChangePasswordResponse.prototype.getAdminMacaroon = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes admin_macaroon = 1; + * This is a type-conversion wrapper around `getAdminMacaroon()` + * @return {string} + */ +proto.lnrpc.ChangePasswordResponse.prototype.getAdminMacaroon_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAdminMacaroon())); +}; + + +/** + * optional bytes admin_macaroon = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAdminMacaroon()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChangePasswordResponse.prototype.getAdminMacaroon_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAdminMacaroon())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.lnrpc.ChangePasswordResponse} returns this + */ +proto.lnrpc.ChangePasswordResponse.prototype.setAdminMacaroon = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; diff --git a/app/middleware/ln/wtclient.proto b/app/middleware/ln/wtclient.proto index 591c0731b9..4dbb75d660 100644 --- a/app/middleware/ln/wtclient.proto +++ b/app/middleware/ln/wtclient.proto @@ -4,6 +4,38 @@ package wtclientrpc; option go_package = "github.com/decred/dcrlnd/lnrpc/wtclientrpc"; +// WatchtowerClient is a service that grants access to the watchtower client +// functionality of the daemon. +service WatchtowerClient { + /* + AddTower adds a new watchtower reachable at the given address and + considers it for new sessions. If the watchtower already exists, then + any new addresses included will be considered when dialing it for + session negotiations and backups. + */ + rpc AddTower (AddTowerRequest) returns (AddTowerResponse); + + /* + RemoveTower removes a watchtower from being considered for future session + negotiations and from being used for any subsequent backups until it's added + again. If an address is provided, then this RPC only serves as a way of + removing the address from the watchtower instead. + */ + rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse); + + // ListTowers returns the list of watchtowers registered with the client. + rpc ListTowers (ListTowersRequest) returns (ListTowersResponse); + + // GetTowerInfo retrieves information for a registered watchtower. + rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower); + + // Stats returns the in-memory statistics of the client since startup. + rpc Stats (StatsRequest) returns (StatsResponse); + + // Policy returns the active watchtower client policy configuration. + rpc Policy (PolicyRequest) returns (PolicyResponse); +} + message AddTowerRequest { // The identifying public key of the watchtower to add. bytes pubkey = 1; @@ -59,6 +91,9 @@ message TowerSession { the justice transaction in the event of a channel breach. */ uint32 sweep_atoms_per_byte = 4; + + // Upstream, this is used for the sweep_sats_per_vbyte field. + reserved 5; } message Tower { @@ -117,7 +152,19 @@ message StatsResponse { uint32 num_sessions_exhausted = 5; } +enum PolicyType { + // Selects the policy from the legacy tower client. + LEGACY = 0; + + // Selects the policy from the anchor tower client. + ANCHOR = 1; +} + message PolicyRequest { + /* + The client type from which to retrieve the active offering policy. + */ + PolicyType policy_type = 1; } message PolicyResponse { @@ -132,34 +179,7 @@ message PolicyResponse { justice transactions in response to channel breaches. */ uint32 sweep_atoms_per_byte = 2; -} - -service WatchtowerClient { - /* - AddTower adds a new watchtower reachable at the given address and - considers it for new sessions. If the watchtower already exists, then - any new addresses included will be considered when dialing it for - session negotiations and backups. - */ - rpc AddTower (AddTowerRequest) returns (AddTowerResponse); - - /* - RemoveTower removes a watchtower from being considered for future session - negotiations and from being used for any subsequent backups until it's added - again. If an address is provided, then this RPC only serves as a way of - removing the address from the watchtower instead. - */ - rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse); - - // ListTowers returns the list of watchtowers registered with the client. - rpc ListTowers (ListTowersRequest) returns (ListTowersResponse); - // GetTowerInfo retrieves information for a registered watchtower. - rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower); - - // Stats returns the in-memory statistics of the client since startup. - rpc Stats (StatsRequest) returns (StatsResponse); - - // Policy returns the active watchtower client policy configuration. - rpc Policy (PolicyRequest) returns (PolicyResponse); + // Upstream, this is used for the sweep_sats_per_vbyte field. + reserved 3; } diff --git a/app/middleware/ln/wtclient_grpc_pb.js b/app/middleware/ln/wtclient_grpc_pb.js index 34e5f164c3..2d3adcaf27 100644 --- a/app/middleware/ln/wtclient_grpc_pb.js +++ b/app/middleware/ln/wtclient_grpc_pb.js @@ -136,6 +136,8 @@ function deserialize_wtclientrpc_Tower(buffer_arg) { } +// WatchtowerClient is a service that grants access to the watchtower client +// functionality of the daemon. var WatchtowerClientService = exports['wtclientrpc.WatchtowerClient'] = { // // AddTower adds a new watchtower reachable at the given address and diff --git a/app/middleware/ln/wtclient_pb.js b/app/middleware/ln/wtclient_pb.js index e9b82c729c..f7c40c55f8 100644 --- a/app/middleware/ln/wtclient_pb.js +++ b/app/middleware/ln/wtclient_pb.js @@ -22,6 +22,7 @@ goog.exportSymbol('wtclientrpc.ListTowersRequest', null, proto); goog.exportSymbol('wtclientrpc.ListTowersResponse', null, proto); goog.exportSymbol('wtclientrpc.PolicyRequest', null, proto); goog.exportSymbol('wtclientrpc.PolicyResponse', null, proto); +goog.exportSymbol('wtclientrpc.PolicyType', null, proto); goog.exportSymbol('wtclientrpc.RemoveTowerRequest', null, proto); goog.exportSymbol('wtclientrpc.RemoveTowerResponse', null, proto); goog.exportSymbol('wtclientrpc.StatsRequest', null, proto); @@ -2271,7 +2272,7 @@ proto.wtclientrpc.PolicyRequest.prototype.toObject = function(opt_includeInstanc */ proto.wtclientrpc.PolicyRequest.toObject = function(includeInstance, msg) { var f, obj = { - + policyType: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -2308,6 +2309,10 @@ proto.wtclientrpc.PolicyRequest.deserializeBinaryFromReader = function(msg, read } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!proto.wtclientrpc.PolicyType} */ (reader.readEnum()); + msg.setPolicyType(value); + break; default: reader.skipField(); break; @@ -2337,6 +2342,31 @@ proto.wtclientrpc.PolicyRequest.prototype.serializeBinary = function() { */ proto.wtclientrpc.PolicyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPolicyType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional PolicyType policy_type = 1; + * @return {!proto.wtclientrpc.PolicyType} + */ +proto.wtclientrpc.PolicyRequest.prototype.getPolicyType = function() { + return /** @type {!proto.wtclientrpc.PolicyType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.wtclientrpc.PolicyType} value + * @return {!proto.wtclientrpc.PolicyRequest} returns this + */ +proto.wtclientrpc.PolicyRequest.prototype.setPolicyType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -2500,4 +2530,12 @@ proto.wtclientrpc.PolicyResponse.prototype.setSweepAtomsPerByte = function(value }; +/** + * @enum {number} + */ +proto.wtclientrpc.PolicyType = { + LEGACY: 0, + ANCHOR: 1 +}; + goog.object.extend(exports, proto); diff --git a/app/wallet/ln/index.js b/app/wallet/ln/index.js index db5097258d..6e8855216a 100644 --- a/app/wallet/ln/index.js +++ b/app/wallet/ln/index.js @@ -1,6 +1,6 @@ import * as client from "middleware/ln/client"; import fs from "fs"; -import { lnrpc as pb } from "middleware/ln/rpc_pb"; +import { lnrpc as pb } from "middleware/ln/lightning_pb"; import { lnrpc as wupb } from "middleware/ln/walletunlocker_pb"; import { invoicesrpc as inpb } from "middleware/ln/invoices_pb"; import { autopilotrpc as appb } from "middleware/ln/autopilot_pb"; diff --git a/babel.config.js b/babel.config.js index 87bf9e69bb..4b8606f4d4 100644 --- a/babel.config.js +++ b/babel.config.js @@ -40,8 +40,8 @@ module.exports = function (api) { "ignore": [ "app/middleware/walletrpc/*.js", "app/middleware/ln/google/api/*.js", - "app/middleware/ln/rpc_grpc_pb.js", - "app/middleware/ln/rpc_pb.js" + "app/middleware/ln/lightning_grpc_pb.js", + "app/middleware/ln/lightning_pb.js" ] }; }; diff --git a/package.json b/package.json index e3cdf5121c..083f59ac22 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "/node_modules/", "app/middleware/walletrpc/api_grpc_pb.js", "app/middleware/walletrpc/api_pb.js", - "app/middleware/ln/rpc_grpc_pb.js", - "app/middleware/ln/rpc_pb.js", + "app/middleware/ln/lightning_grpc_pb.js", + "app/middleware/ln/lightning_pb.js", "app/middleware/ln/wtclient_grpc_pb.js", "app/middleware/ln/wtclient_pb.js", "app/middleware/ln/invoices_grpc_pb.js", @@ -102,8 +102,8 @@ "/node_modules/", "/app/middleware/walletrpc/api_grpc_pb.js", "/app/middleware/walletrpc/api_pb.js", - "/app/middleware/ln/rpc_grpc_pb.js", - "/app/middleware/ln/rpc_pb.js", + "/app/middleware/ln/lightning_grpc_pb.js", + "/app/middleware/ln/lightning_pb.js", "/app/middleware/ln/invoices_grpc_pb.js", "/app/middleware/ln/invoices_pb.js", "/app/middleware/ln/autopilot_grpc_pb.js",