UNPKG

xud

Version:
1,332 lines (1,138 loc) 41.8 kB
/** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var annotations_pb = require('./annotations_pb.js'); goog.object.extend(proto, annotations_pb); var lndrpc_pb = require('./lndrpc_pb.js'); goog.object.extend(proto, lndrpc_pb); goog.exportSymbol('proto.invoicesrpc.AddHoldInvoiceRequest', null, global); goog.exportSymbol('proto.invoicesrpc.AddHoldInvoiceResp', null, global); goog.exportSymbol('proto.invoicesrpc.CancelInvoiceMsg', null, global); goog.exportSymbol('proto.invoicesrpc.CancelInvoiceResp', null, global); goog.exportSymbol('proto.invoicesrpc.SettleInvoiceMsg', null, global); goog.exportSymbol('proto.invoicesrpc.SettleInvoiceResp', null, global); goog.exportSymbol('proto.invoicesrpc.SubscribeSingleInvoiceRequest', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.invoicesrpc.CancelInvoiceMsg = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.invoicesrpc.CancelInvoiceMsg, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.CancelInvoiceMsg.displayName = 'proto.invoicesrpc.CancelInvoiceMsg'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.CancelInvoiceMsg.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.CancelInvoiceMsg.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.CancelInvoiceMsg} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.CancelInvoiceMsg.toObject = function(includeInstance, msg) { var f, obj = { paymentHash: msg.getPaymentHash_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.CancelInvoiceMsg} */ proto.invoicesrpc.CancelInvoiceMsg.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.CancelInvoiceMsg; return proto.invoicesrpc.CancelInvoiceMsg.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.CancelInvoiceMsg} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.CancelInvoiceMsg} */ proto.invoicesrpc.CancelInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPaymentHash(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.CancelInvoiceMsg.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.CancelInvoiceMsg.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.invoicesrpc.CancelInvoiceMsg} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.CancelInvoiceMsg.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPaymentHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } }; /** * optional bytes payment_hash = 1; * @return {!(string|Uint8Array)} */ proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes payment_hash = 1; * This is a type-conversion wrapper around `getPaymentHash()` * @return {string} */ proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPaymentHash())); }; /** * optional bytes payment_hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getPaymentHash()` * @return {!Uint8Array} */ proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPaymentHash())); }; /** @param {!(string|Uint8Array)} value */ proto.invoicesrpc.CancelInvoiceMsg.prototype.setPaymentHash = function(value) { jspb.Message.setProto3BytesField(this, 1, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.invoicesrpc.CancelInvoiceResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.invoicesrpc.CancelInvoiceResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.CancelInvoiceResp.displayName = 'proto.invoicesrpc.CancelInvoiceResp'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.CancelInvoiceResp.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.CancelInvoiceResp.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.CancelInvoiceResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.CancelInvoiceResp.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.CancelInvoiceResp} */ proto.invoicesrpc.CancelInvoiceResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.CancelInvoiceResp; return proto.invoicesrpc.CancelInvoiceResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.CancelInvoiceResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.CancelInvoiceResp} */ proto.invoicesrpc.CancelInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.CancelInvoiceResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.CancelInvoiceResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.invoicesrpc.CancelInvoiceResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.CancelInvoiceResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.invoicesrpc.AddHoldInvoiceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.invoicesrpc.AddHoldInvoiceRequest.repeatedFields_, null); }; goog.inherits(proto.invoicesrpc.AddHoldInvoiceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.AddHoldInvoiceRequest.displayName = 'proto.invoicesrpc.AddHoldInvoiceRequest'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.invoicesrpc.AddHoldInvoiceRequest.repeatedFields_ = [8]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.AddHoldInvoiceRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.AddHoldInvoiceRequest.toObject = function(includeInstance, msg) { var f, obj = { memo: jspb.Message.getFieldWithDefault(msg, 1, ""), hash: msg.getHash_asB64(), value: jspb.Message.getFieldWithDefault(msg, 3, 0), descriptionHash: msg.getDescriptionHash_asB64(), expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), fallbackAddr: jspb.Message.getFieldWithDefault(msg, 6, ""), cltvExpiry: jspb.Message.getFieldWithDefault(msg, 7, 0), routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), lndrpc_pb.RouteHint.toObject, includeInstance), pb_private: jspb.Message.getFieldWithDefault(msg, 9, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} */ proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.AddHoldInvoiceRequest; return proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} */ proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setMemo(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setHash(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setValue(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setDescriptionHash(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiry(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setFallbackAddr(value); break; case 7: var value = /** @type {number} */ (reader.readUint64()); msg.setCltvExpiry(value); break; case 8: var value = new lndrpc_pb.RouteHint; reader.readMessage(value,lndrpc_pb.RouteHint.deserializeBinaryFromReader); msg.addRouteHints(value); break; case 9: var value = /** @type {boolean} */ (reader.readBool()); msg.setPrivate(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMemo(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getHash_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getValue(); if (f !== 0) { writer.writeInt64( 3, f ); } f = message.getDescriptionHash_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } f = message.getExpiry(); if (f !== 0) { writer.writeInt64( 5, f ); } f = message.getFallbackAddr(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getCltvExpiry(); if (f !== 0) { writer.writeUint64( 7, f ); } f = message.getRouteHintsList(); if (f.length > 0) { writer.writeRepeatedMessage( 8, f, lndrpc_pb.RouteHint.serializeBinaryToWriter ); } f = message.getPrivate(); if (f) { writer.writeBool( 9, f ); } }; /** * optional string memo = 1; * @return {string} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getMemo = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setMemo = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes hash = 2; * @return {!(string|Uint8Array)} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes hash = 2; * This is a type-conversion wrapper around `getHash()` * @return {string} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getHash())); }; /** * optional bytes hash = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getHash()` * @return {!Uint8Array} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getHash())); }; /** @param {!(string|Uint8Array)} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setHash = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional int64 value = 3; * @return {number} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getValue = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setValue = function(value) { jspb.Message.setProto3IntField(this, 3, value); }; /** * optional bytes description_hash = 4; * @return {!(string|Uint8Array)} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * optional bytes description_hash = 4; * This is a type-conversion wrapper around `getDescriptionHash()` * @return {string} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getDescriptionHash())); }; /** * optional bytes description_hash = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getDescriptionHash()` * @return {!Uint8Array} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getDescriptionHash())); }; /** @param {!(string|Uint8Array)} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setDescriptionHash = function(value) { jspb.Message.setProto3BytesField(this, 4, value); }; /** * optional int64 expiry = 5; * @return {number} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getExpiry = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setExpiry = function(value) { jspb.Message.setProto3IntField(this, 5, value); }; /** * optional string fallback_addr = 6; * @return {string} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getFallbackAddr = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** @param {string} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setFallbackAddr = function(value) { jspb.Message.setProto3StringField(this, 6, value); }; /** * optional uint64 cltv_expiry = 7; * @return {number} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getCltvExpiry = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setCltvExpiry = function(value) { jspb.Message.setProto3IntField(this, 7, value); }; /** * repeated lnrpc.RouteHint route_hints = 8; * @return {!Array<!proto.lnrpc.RouteHint>} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getRouteHintsList = function() { return /** @type{!Array<!proto.lnrpc.RouteHint>} */ ( jspb.Message.getRepeatedWrapperField(this, lndrpc_pb.RouteHint, 8)); }; /** @param {!Array<!proto.lnrpc.RouteHint>} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setRouteHintsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 8, value); }; /** * @param {!proto.lnrpc.RouteHint=} opt_value * @param {number=} opt_index * @return {!proto.lnrpc.RouteHint} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.addRouteHints = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.RouteHint, opt_index); }; proto.invoicesrpc.AddHoldInvoiceRequest.prototype.clearRouteHintsList = function() { this.setRouteHintsList([]); }; /** * optional bool private = 9; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getPrivate = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); }; /** @param {boolean} value */ proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setPrivate = function(value) { jspb.Message.setProto3BooleanField(this, 9, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.invoicesrpc.AddHoldInvoiceResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.invoicesrpc.AddHoldInvoiceResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.AddHoldInvoiceResp.displayName = 'proto.invoicesrpc.AddHoldInvoiceResp'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.AddHoldInvoiceResp.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.AddHoldInvoiceResp.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.AddHoldInvoiceResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.AddHoldInvoiceResp.toObject = function(includeInstance, msg) { var f, obj = { paymentRequest: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.AddHoldInvoiceResp} */ proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.AddHoldInvoiceResp; return proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.AddHoldInvoiceResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.AddHoldInvoiceResp} */ proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setPaymentRequest(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.AddHoldInvoiceResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.invoicesrpc.AddHoldInvoiceResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPaymentRequest(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string payment_request = 1; * @return {string} */ proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentRequest = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.invoicesrpc.AddHoldInvoiceResp.prototype.setPaymentRequest = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.invoicesrpc.SettleInvoiceMsg = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.invoicesrpc.SettleInvoiceMsg, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.SettleInvoiceMsg.displayName = 'proto.invoicesrpc.SettleInvoiceMsg'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.SettleInvoiceMsg.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.SettleInvoiceMsg.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.SettleInvoiceMsg} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.SettleInvoiceMsg.toObject = function(includeInstance, msg) { var f, obj = { preimage: msg.getPreimage_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.SettleInvoiceMsg} */ proto.invoicesrpc.SettleInvoiceMsg.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.SettleInvoiceMsg; return proto.invoicesrpc.SettleInvoiceMsg.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.SettleInvoiceMsg} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.SettleInvoiceMsg} */ proto.invoicesrpc.SettleInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPreimage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.SettleInvoiceMsg.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.SettleInvoiceMsg.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.invoicesrpc.SettleInvoiceMsg} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.SettleInvoiceMsg.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPreimage_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } }; /** * optional bytes preimage = 1; * @return {!(string|Uint8Array)} */ proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes preimage = 1; * This is a type-conversion wrapper around `getPreimage()` * @return {string} */ proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPreimage())); }; /** * optional bytes preimage = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getPreimage()` * @return {!Uint8Array} */ proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPreimage())); }; /** @param {!(string|Uint8Array)} value */ proto.invoicesrpc.SettleInvoiceMsg.prototype.setPreimage = function(value) { jspb.Message.setProto3BytesField(this, 1, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.invoicesrpc.SettleInvoiceResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.invoicesrpc.SettleInvoiceResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.SettleInvoiceResp.displayName = 'proto.invoicesrpc.SettleInvoiceResp'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.SettleInvoiceResp.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.SettleInvoiceResp.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.SettleInvoiceResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.SettleInvoiceResp.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.SettleInvoiceResp} */ proto.invoicesrpc.SettleInvoiceResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.SettleInvoiceResp; return proto.invoicesrpc.SettleInvoiceResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.SettleInvoiceResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.SettleInvoiceResp} */ proto.invoicesrpc.SettleInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.SettleInvoiceResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.SettleInvoiceResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.invoicesrpc.SettleInvoiceResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.SettleInvoiceResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * 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.SubscribeSingleInvoiceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.invoicesrpc.SubscribeSingleInvoiceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.invoicesrpc.SubscribeSingleInvoiceRequest.displayName = 'proto.invoicesrpc.SubscribeSingleInvoiceRequest'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.toObject = function(opt_includeInstance) { return proto.invoicesrpc.SubscribeSingleInvoiceRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.toObject = function(includeInstance, msg) { var f, obj = { rHash: msg.getRHash_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.invoicesrpc.SubscribeSingleInvoiceRequest; return proto.invoicesrpc.SubscribeSingleInvoiceRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.invoicesrpc.SubscribeSingleInvoiceRequest} */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.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.setRHash(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.invoicesrpc.SubscribeSingleInvoiceRequest.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.SubscribeSingleInvoiceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRHash_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional bytes r_hash = 2; * @return {!(string|Uint8Array)} */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.getRHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes r_hash = 2; * This is a type-conversion wrapper around `getRHash()` * @return {string} */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.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.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.getRHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getRHash())); }; /** @param {!(string|Uint8Array)} value */ proto.invoicesrpc.SubscribeSingleInvoiceRequest.prototype.setRHash = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; goog.object.extend(exports, proto.invoicesrpc);