@sangaman/xud
Version:
Exchange Union Daemon
1,555 lines (1,346 loc) • 662 kB
JavaScript
/**
* @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.exportSymbol('proto.lnrpc.AddInvoiceResponse', null, global);
goog.exportSymbol('proto.lnrpc.ChanInfoRequest', null, global);
goog.exportSymbol('proto.lnrpc.Channel', null, global);
goog.exportSymbol('proto.lnrpc.ChannelBalanceRequest', null, global);
goog.exportSymbol('proto.lnrpc.ChannelBalanceResponse', null, global);
goog.exportSymbol('proto.lnrpc.ChannelCloseUpdate', null, global);
goog.exportSymbol('proto.lnrpc.ChannelEdge', null, global);
goog.exportSymbol('proto.lnrpc.ChannelEdgeUpdate', null, global);
goog.exportSymbol('proto.lnrpc.ChannelFeeReport', null, global);
goog.exportSymbol('proto.lnrpc.ChannelGraph', null, global);
goog.exportSymbol('proto.lnrpc.ChannelGraphRequest', null, global);
goog.exportSymbol('proto.lnrpc.ChannelOpenUpdate', null, global);
goog.exportSymbol('proto.lnrpc.ChannelPoint', null, global);
goog.exportSymbol('proto.lnrpc.CloseChannelRequest', null, global);
goog.exportSymbol('proto.lnrpc.CloseStatusUpdate', null, global);
goog.exportSymbol('proto.lnrpc.ClosedChannelUpdate', null, global);
goog.exportSymbol('proto.lnrpc.ConfirmationUpdate', null, global);
goog.exportSymbol('proto.lnrpc.ConnectPeerRequest', null, global);
goog.exportSymbol('proto.lnrpc.ConnectPeerResponse', null, global);
goog.exportSymbol('proto.lnrpc.DebugLevelRequest', null, global);
goog.exportSymbol('proto.lnrpc.DebugLevelResponse', null, global);
goog.exportSymbol('proto.lnrpc.DeleteAllPaymentsRequest', null, global);
goog.exportSymbol('proto.lnrpc.DeleteAllPaymentsResponse', null, global);
goog.exportSymbol('proto.lnrpc.DisconnectPeerRequest', null, global);
goog.exportSymbol('proto.lnrpc.DisconnectPeerResponse', null, global);
goog.exportSymbol('proto.lnrpc.FeeReportRequest', null, global);
goog.exportSymbol('proto.lnrpc.FeeReportResponse', null, global);
goog.exportSymbol('proto.lnrpc.ForwardingEvent', null, global);
goog.exportSymbol('proto.lnrpc.ForwardingHistoryRequest', null, global);
goog.exportSymbol('proto.lnrpc.ForwardingHistoryResponse', null, global);
goog.exportSymbol('proto.lnrpc.GenSeedRequest', null, global);
goog.exportSymbol('proto.lnrpc.GenSeedResponse', null, global);
goog.exportSymbol('proto.lnrpc.GetInfoRequest', null, global);
goog.exportSymbol('proto.lnrpc.GetInfoResponse', null, global);
goog.exportSymbol('proto.lnrpc.GetTransactionsRequest', null, global);
goog.exportSymbol('proto.lnrpc.GraphTopologySubscription', null, global);
goog.exportSymbol('proto.lnrpc.GraphTopologyUpdate', null, global);
goog.exportSymbol('proto.lnrpc.HTLC', null, global);
goog.exportSymbol('proto.lnrpc.Hop', null, global);
goog.exportSymbol('proto.lnrpc.HopHint', null, global);
goog.exportSymbol('proto.lnrpc.InitWalletRequest', null, global);
goog.exportSymbol('proto.lnrpc.InitWalletResponse', null, global);
goog.exportSymbol('proto.lnrpc.Invoice', null, global);
goog.exportSymbol('proto.lnrpc.InvoiceSubscription', null, global);
goog.exportSymbol('proto.lnrpc.LightningAddress', null, global);
goog.exportSymbol('proto.lnrpc.LightningNode', null, global);
goog.exportSymbol('proto.lnrpc.ListChannelsRequest', null, global);
goog.exportSymbol('proto.lnrpc.ListChannelsResponse', null, global);
goog.exportSymbol('proto.lnrpc.ListInvoiceRequest', null, global);
goog.exportSymbol('proto.lnrpc.ListInvoiceResponse', null, global);
goog.exportSymbol('proto.lnrpc.ListPaymentsRequest', null, global);
goog.exportSymbol('proto.lnrpc.ListPaymentsResponse', null, global);
goog.exportSymbol('proto.lnrpc.ListPeersRequest', null, global);
goog.exportSymbol('proto.lnrpc.ListPeersResponse', null, global);
goog.exportSymbol('proto.lnrpc.NetworkInfo', null, global);
goog.exportSymbol('proto.lnrpc.NetworkInfoRequest', null, global);
goog.exportSymbol('proto.lnrpc.NewAddressRequest', null, global);
goog.exportSymbol('proto.lnrpc.NewAddressRequest.AddressType', null, global);
goog.exportSymbol('proto.lnrpc.NewAddressResponse', null, global);
goog.exportSymbol('proto.lnrpc.NewWitnessAddressRequest', null, global);
goog.exportSymbol('proto.lnrpc.NodeAddress', null, global);
goog.exportSymbol('proto.lnrpc.NodeInfo', null, global);
goog.exportSymbol('proto.lnrpc.NodeInfoRequest', null, global);
goog.exportSymbol('proto.lnrpc.NodeUpdate', null, global);
goog.exportSymbol('proto.lnrpc.OpenChannelRequest', null, global);
goog.exportSymbol('proto.lnrpc.OpenStatusUpdate', null, global);
goog.exportSymbol('proto.lnrpc.PayReq', null, global);
goog.exportSymbol('proto.lnrpc.PayReqString', null, global);
goog.exportSymbol('proto.lnrpc.Payment', null, global);
goog.exportSymbol('proto.lnrpc.PaymentHash', null, global);
goog.exportSymbol('proto.lnrpc.Peer', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsRequest', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsResponse', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ClosedChannel', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ForceClosedChannel', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.PendingChannel', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.PendingOpenChannel', null, global);
goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel', null, global);
goog.exportSymbol('proto.lnrpc.PendingHTLC', null, global);
goog.exportSymbol('proto.lnrpc.PendingUpdate', null, global);
goog.exportSymbol('proto.lnrpc.PolicyUpdateRequest', null, global);
goog.exportSymbol('proto.lnrpc.PolicyUpdateResponse', null, global);
goog.exportSymbol('proto.lnrpc.QueryRoutesRequest', null, global);
goog.exportSymbol('proto.lnrpc.QueryRoutesResponse', null, global);
goog.exportSymbol('proto.lnrpc.Route', null, global);
goog.exportSymbol('proto.lnrpc.RouteHint', null, global);
goog.exportSymbol('proto.lnrpc.RoutingPolicy', null, global);
goog.exportSymbol('proto.lnrpc.SendCoinsRequest', null, global);
goog.exportSymbol('proto.lnrpc.SendCoinsResponse', null, global);
goog.exportSymbol('proto.lnrpc.SendManyRequest', null, global);
goog.exportSymbol('proto.lnrpc.SendManyResponse', null, global);
goog.exportSymbol('proto.lnrpc.SendRequest', null, global);
goog.exportSymbol('proto.lnrpc.SendResponse', null, global);
goog.exportSymbol('proto.lnrpc.SignMessageRequest', null, global);
goog.exportSymbol('proto.lnrpc.SignMessageResponse', null, global);
goog.exportSymbol('proto.lnrpc.StopRequest', null, global);
goog.exportSymbol('proto.lnrpc.StopResponse', null, global);
goog.exportSymbol('proto.lnrpc.Transaction', null, global);
goog.exportSymbol('proto.lnrpc.TransactionDetails', null, global);
goog.exportSymbol('proto.lnrpc.UnlockWalletRequest', null, global);
goog.exportSymbol('proto.lnrpc.UnlockWalletResponse', null, global);
goog.exportSymbol('proto.lnrpc.VerifyMessageRequest', null, global);
goog.exportSymbol('proto.lnrpc.VerifyMessageResponse', null, global);
goog.exportSymbol('proto.lnrpc.WalletBalanceRequest', null, global);
goog.exportSymbol('proto.lnrpc.WalletBalanceResponse', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.GenSeedRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.lnrpc.GenSeedRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.GenSeedRequest.displayName = 'proto.lnrpc.GenSeedRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.lnrpc.GenSeedRequest.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.GenSeedRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.GenSeedRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.GenSeedRequest.toObject = function(includeInstance, msg) {
var f, obj = {
aezeedPassphrase: msg.getAezeedPassphrase_asB64(),
seedEntropy: msg.getSeedEntropy_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.lnrpc.GenSeedRequest}
*/
proto.lnrpc.GenSeedRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.lnrpc.GenSeedRequest;
return proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.lnrpc.GenSeedRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.lnrpc.GenSeedRequest}
*/
proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setAezeedPassphrase(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSeedEntropy(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.lnrpc.GenSeedRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.lnrpc.GenSeedRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.lnrpc.GenSeedRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.GenSeedRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAezeedPassphrase_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getSeedEntropy_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* optional bytes aezeed_passphrase = 1;
* @return {!(string|Uint8Array)}
*/
proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes aezeed_passphrase = 1;
* This is a type-conversion wrapper around `getAezeedPassphrase()`
* @return {string}
*/
proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getAezeedPassphrase()));
};
/**
* optional bytes aezeed_passphrase = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getAezeedPassphrase()`
* @return {!Uint8Array}
*/
proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getAezeedPassphrase()));
};
/** @param {!(string|Uint8Array)} value */
proto.lnrpc.GenSeedRequest.prototype.setAezeedPassphrase = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional bytes seed_entropy = 2;
* @return {!(string|Uint8Array)}
*/
proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes seed_entropy = 2;
* This is a type-conversion wrapper around `getSeedEntropy()`
* @return {string}
*/
proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSeedEntropy()));
};
/**
* optional bytes seed_entropy = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSeedEntropy()`
* @return {!Uint8Array}
*/
proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSeedEntropy()));
};
/** @param {!(string|Uint8Array)} value */
proto.lnrpc.GenSeedRequest.prototype.setSeedEntropy = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.GenSeedResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GenSeedResponse.repeatedFields_, null);
};
goog.inherits(proto.lnrpc.GenSeedResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.GenSeedResponse.displayName = 'proto.lnrpc.GenSeedResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.lnrpc.GenSeedResponse.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.lnrpc.GenSeedResponse.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.GenSeedResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.GenSeedResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.GenSeedResponse.toObject = function(includeInstance, msg) {
var f, obj = {
cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 1),
encipheredSeed: msg.getEncipheredSeed_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.lnrpc.GenSeedResponse}
*/
proto.lnrpc.GenSeedResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.lnrpc.GenSeedResponse;
return proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.lnrpc.GenSeedResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.lnrpc.GenSeedResponse}
*/
proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.addCipherSeedMnemonic(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setEncipheredSeed(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.lnrpc.GenSeedResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.lnrpc.GenSeedResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.lnrpc.GenSeedResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.GenSeedResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCipherSeedMnemonicList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
f = message.getEncipheredSeed_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* repeated string cipher_seed_mnemonic = 1;
* @return {!Array.<string>}
*/
proto.lnrpc.GenSeedResponse.prototype.getCipherSeedMnemonicList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/** @param {!Array.<string>} value */
proto.lnrpc.GenSeedResponse.prototype.setCipherSeedMnemonicList = function(value) {
jspb.Message.setField(this, 1, value || []);
};
/**
* @param {!string} value
* @param {number=} opt_index
*/
proto.lnrpc.GenSeedResponse.prototype.addCipherSeedMnemonic = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
proto.lnrpc.GenSeedResponse.prototype.clearCipherSeedMnemonicList = function() {
this.setCipherSeedMnemonicList([]);
};
/**
* optional bytes enciphered_seed = 2;
* @return {!(string|Uint8Array)}
*/
proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes enciphered_seed = 2;
* This is a type-conversion wrapper around `getEncipheredSeed()`
* @return {string}
*/
proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getEncipheredSeed()));
};
/**
* optional bytes enciphered_seed = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getEncipheredSeed()`
* @return {!Uint8Array}
*/
proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getEncipheredSeed()));
};
/** @param {!(string|Uint8Array)} value */
proto.lnrpc.GenSeedResponse.prototype.setEncipheredSeed = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.InitWalletRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.InitWalletRequest.repeatedFields_, null);
};
goog.inherits(proto.lnrpc.InitWalletRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.InitWalletRequest.displayName = 'proto.lnrpc.InitWalletRequest';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.lnrpc.InitWalletRequest.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.lnrpc.InitWalletRequest.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.InitWalletRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.InitWalletRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.InitWalletRequest.toObject = function(includeInstance, msg) {
var f, obj = {
walletPassword: msg.getWalletPassword_asB64(),
cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 2),
aezeedPassphrase: msg.getAezeedPassphrase_asB64(),
recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.lnrpc.InitWalletRequest}
*/
proto.lnrpc.InitWalletRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.lnrpc.InitWalletRequest;
return proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.lnrpc.InitWalletRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.lnrpc.InitWalletRequest}
*/
proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setWalletPassword(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addCipherSeedMnemonic(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setAezeedPassphrase(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setRecoveryWindow(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.lnrpc.InitWalletRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.lnrpc.InitWalletRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.lnrpc.InitWalletRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.InitWalletRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getWalletPassword_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getCipherSeedMnemonicList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = message.getAezeedPassphrase_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getRecoveryWindow();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
};
/**
* optional bytes wallet_password = 1;
* @return {!(string|Uint8Array)}
*/
proto.lnrpc.InitWalletRequest.prototype.getWalletPassword = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes wallet_password = 1;
* This is a type-conversion wrapper around `getWalletPassword()`
* @return {string}
*/
proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getWalletPassword()));
};
/**
* optional bytes wallet_password = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getWalletPassword()`
* @return {!Uint8Array}
*/
proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getWalletPassword()));
};
/** @param {!(string|Uint8Array)} value */
proto.lnrpc.InitWalletRequest.prototype.setWalletPassword = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated string cipher_seed_mnemonic = 2;
* @return {!Array.<string>}
*/
proto.lnrpc.InitWalletRequest.prototype.getCipherSeedMnemonicList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/** @param {!Array.<string>} value */
proto.lnrpc.InitWalletRequest.prototype.setCipherSeedMnemonicList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
/**
* @param {!string} value
* @param {number=} opt_index
*/
proto.lnrpc.InitWalletRequest.prototype.addCipherSeedMnemonic = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
proto.lnrpc.InitWalletRequest.prototype.clearCipherSeedMnemonicList = function() {
this.setCipherSeedMnemonicList([]);
};
/**
* optional bytes aezeed_passphrase = 3;
* @return {!(string|Uint8Array)}
*/
proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes aezeed_passphrase = 3;
* This is a type-conversion wrapper around `getAezeedPassphrase()`
* @return {string}
*/
proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getAezeedPassphrase()));
};
/**
* optional bytes aezeed_passphrase = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getAezeedPassphrase()`
* @return {!Uint8Array}
*/
proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getAezeedPassphrase()));
};
/** @param {!(string|Uint8Array)} value */
proto.lnrpc.InitWalletRequest.prototype.setAezeedPassphrase = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional int32 recovery_window = 4;
* @return {number}
*/
proto.lnrpc.InitWalletRequest.prototype.getRecoveryWindow = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.lnrpc.InitWalletRequest.prototype.setRecoveryWindow = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.InitWalletResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.lnrpc.InitWalletResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.InitWalletResponse.displayName = 'proto.lnrpc.InitWalletResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.lnrpc.InitWalletResponse.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.InitWalletResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.InitWalletResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.InitWalletResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.lnrpc.InitWalletResponse}
*/
proto.lnrpc.InitWalletResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.lnrpc.InitWalletResponse;
return proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.lnrpc.InitWalletResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.lnrpc.InitWalletResponse}
*/
proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.lnrpc.InitWalletResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.lnrpc.InitWalletResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.lnrpc.InitWalletResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.InitWalletResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.UnlockWalletRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.lnrpc.UnlockWalletRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.UnlockWalletRequest.displayName = 'proto.lnrpc.UnlockWalletRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.lnrpc.UnlockWalletRequest.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.UnlockWalletRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.UnlockWalletRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.UnlockWalletRequest.toObject = function(includeInstance, msg) {
var f, obj = {
walletPassword: msg.getWalletPassword_asB64(),
recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
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;
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
);
}
};
/**
* optional bytes wallet_password = 1;
* @return {!(string|Uint8Array)}
*/
proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes wallet_password = 1;
* This is a type-conversion wrapper around `getWalletPassword()`
* @return {string}
*/
proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getWalletPassword()));
};
/**
* optional bytes wallet_password = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getWalletPassword()`
* @return {!Uint8Array}
*/
proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getWalletPassword()));
};
/** @param {!(string|Uint8Array)} value */
proto.lnrpc.UnlockWalletRequest.prototype.setWalletPassword = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional int32 recovery_window = 2;
* @return {number}
*/
proto.lnrpc.UnlockWalletRequest.prototype.getRecoveryWindow = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.UnlockWalletResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.lnrpc.UnlockWalletResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.UnlockWalletResponse.displayName = 'proto.lnrpc.UnlockWalletResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.lnrpc.UnlockWalletResponse.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.UnlockWalletResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.UnlockWalletResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.UnlockWalletResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.lnrpc.UnlockWalletResponse}
*/
proto.lnrpc.UnlockWalletResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.lnrpc.UnlockWalletResponse;
return proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.lnrpc.UnlockWalletResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.lnrpc.UnlockWalletResponse}
*/
proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.lnrpc.UnlockWalletResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.lnrpc.UnlockWalletResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.lnrpc.Transaction = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Transaction.repeatedFields_, null);
};
goog.inherits(proto.lnrpc.Transaction, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.lnrpc.Transaction.displayName = 'proto.lnrpc.Transaction';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.lnrpc.Transaction.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.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) {
return proto.lnrpc.Transaction.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.lnrpc.Transaction} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.Transaction.toObject = function(includeInstance, msg) {
var f, obj = {
txHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
amount: jspb.Message.getFieldWithDefault(msg, 2, 0),
numConfirmations: jspb.Message.getFieldWithDefault(msg, 3, 0),
blockHash: jspb.Message.getFieldWithDefault(msg, 4, ""),
blockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0),
timeStamp: jspb.Message.getFieldWithDefault(msg, 6, 0),
totalFees: jspb.Message.getFieldWithDefault(msg, 7, 0),
destAddressesList: jspb.Message.getRepeatedField(msg, 8)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.lnrpc.Transaction}
*/
proto.lnrpc.Transaction.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
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.Transaction} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.lnrpc.Transaction}
*/
proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setTxHash(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmount(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setNumConfirmations(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setBlockHash(value);
break;
case 5:
var value = /** @type {number} */ (reader.readInt32());
msg.setBlockHeight(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt64());
msg.setTimeStamp(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setTotalFees(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.addDestAddresses(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.lnrpc.Transaction.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.lnrpc.Transaction.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.Transaction} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTxHash();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAmount();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = message.getNumConfirmations();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
f = message.getBlockHash();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getBlockHeight();
if (f !== 0) {
writer.writeInt32(
5,
f
);
}
f = message.getTimeStamp();
if (f !== 0) {
writer.writeInt64(
6,
f
);
}
f = message.getTotalFees();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = message.getDestAddressesList();
if (f.length > 0) {
writer.writeRepeatedString(
8,
f
);
}
};
/**
* optional string tx_hash = 1;
* @return {string}
*/
proto.lnrpc.Transaction.prototype.getTxHash = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.lnrpc.Transaction.prototype.setTxHash = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional int64 amount = 2;
* @return {number}
*/
proto.lnrpc.Transaction.prototype.getAmount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.lnrpc.Transaction.prototype.setAmount = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional int32 num_confirmations = 3;
* @return {number}
*/
proto.lnrpc.Transaction.prototype.getNumConfirmations = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional string block_hash = 4;
* @return {string}
*/
proto.lnrpc.Transaction.prototype.getBlockHash = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.lnrpc.Transaction.prototype.setBlockHash = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional int32 block_height = 5;
* @return {number}
*/
proto.lnrpc.Transaction.prototype.getBlockHeight = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value *