xud
Version:
Exchange Union Daemon
6,234 lines • 189 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 lndrpc_pb = require('./lndrpc_pb.js');
goog.object.extend(proto, lndrpc_pb);
goog.exportSymbol('proto.routerrpc.BuildRouteRequest', null, global);
goog.exportSymbol('proto.routerrpc.BuildRouteResponse', null, global);
goog.exportSymbol('proto.routerrpc.CircuitKey', null, global);
goog.exportSymbol('proto.routerrpc.FailureDetail', null, global);
goog.exportSymbol('proto.routerrpc.ForwardEvent', null, global);
goog.exportSymbol('proto.routerrpc.ForwardFailEvent', null, global);
goog.exportSymbol('proto.routerrpc.ForwardHtlcInterceptRequest', null, global);
goog.exportSymbol('proto.routerrpc.ForwardHtlcInterceptResponse', null, global);
goog.exportSymbol('proto.routerrpc.HtlcEvent', null, global);
goog.exportSymbol('proto.routerrpc.HtlcEvent.EventType', null, global);
goog.exportSymbol('proto.routerrpc.HtlcInfo', null, global);
goog.exportSymbol('proto.routerrpc.LinkFailEvent', null, global);
goog.exportSymbol('proto.routerrpc.PairData', null, global);
goog.exportSymbol('proto.routerrpc.PairHistory', null, global);
goog.exportSymbol('proto.routerrpc.PaymentState', null, global);
goog.exportSymbol('proto.routerrpc.PaymentStatus', null, global);
goog.exportSymbol('proto.routerrpc.QueryMissionControlRequest', null, global);
goog.exportSymbol('proto.routerrpc.QueryMissionControlResponse', null, global);
goog.exportSymbol('proto.routerrpc.QueryProbabilityRequest', null, global);
goog.exportSymbol('proto.routerrpc.QueryProbabilityResponse', null, global);
goog.exportSymbol('proto.routerrpc.ResetMissionControlRequest', null, global);
goog.exportSymbol('proto.routerrpc.ResetMissionControlResponse', null, global);
goog.exportSymbol('proto.routerrpc.ResolveHoldForwardAction', null, global);
goog.exportSymbol('proto.routerrpc.RouteFeeRequest', null, global);
goog.exportSymbol('proto.routerrpc.RouteFeeResponse', null, global);
goog.exportSymbol('proto.routerrpc.SendPaymentRequest', null, global);
goog.exportSymbol('proto.routerrpc.SendToRouteRequest', null, global);
goog.exportSymbol('proto.routerrpc.SendToRouteResponse', null, global);
goog.exportSymbol('proto.routerrpc.SettleEvent', null, global);
goog.exportSymbol('proto.routerrpc.SubscribeHtlcEventsRequest', null, global);
goog.exportSymbol('proto.routerrpc.TrackPaymentRequest', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.SendPaymentRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.SendPaymentRequest.repeatedFields_, null);
};
goog.inherits(proto.routerrpc.SendPaymentRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.SendPaymentRequest.displayName = 'proto.routerrpc.SendPaymentRequest';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.routerrpc.SendPaymentRequest.repeatedFields_ = [19,10,16];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.SendPaymentRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.SendPaymentRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.SendPaymentRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SendPaymentRequest.toObject = function(includeInstance, msg) {
var f, obj = {
dest: msg.getDest_asB64(),
amt: jspb.Message.getFieldWithDefault(msg, 2, 0),
amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0),
paymentHash: msg.getPaymentHash_asB64(),
finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0),
paymentRequest: jspb.Message.getFieldWithDefault(msg, 5, ""),
timeoutSeconds: jspb.Message.getFieldWithDefault(msg, 6, 0),
feeLimitSat: jspb.Message.getFieldWithDefault(msg, 7, 0),
feeLimitMsat: jspb.Message.getFieldWithDefault(msg, 13, 0),
outgoingChanId: jspb.Message.getFieldWithDefault(msg, 8, "0"),
outgoingChanIdsList: jspb.Message.getRepeatedField(msg, 19),
lastHopPubkey: msg.getLastHopPubkey_asB64(),
cltvLimit: jspb.Message.getFieldWithDefault(msg, 9, 0),
routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(),
lndrpc_pb.RouteHint.toObject, includeInstance),
destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [],
allowSelfPayment: jspb.Message.getFieldWithDefault(msg, 15, false),
destFeaturesList: jspb.Message.getRepeatedField(msg, 16),
maxParts: jspb.Message.getFieldWithDefault(msg, 17, 0),
noInflightUpdates: jspb.Message.getFieldWithDefault(msg, 18, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.SendPaymentRequest}
*/
proto.routerrpc.SendPaymentRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.SendPaymentRequest;
return proto.routerrpc.SendPaymentRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.SendPaymentRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.SendPaymentRequest}
*/
proto.routerrpc.SendPaymentRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setDest(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmt(value);
break;
case 12:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmtMsat(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPaymentHash(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setFinalCltvDelta(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setPaymentRequest(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt32());
msg.setTimeoutSeconds(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setFeeLimitSat(value);
break;
case 13:
var value = /** @type {number} */ (reader.readInt64());
msg.setFeeLimitMsat(value);
break;
case 8:
var value = /** @type {string} */ (reader.readUint64String());
msg.setOutgoingChanId(value);
break;
case 19:
var value = /** @type {!Array<number>} */ (reader.readPackedUint64());
msg.setOutgoingChanIdsList(value);
break;
case 14:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setLastHopPubkey(value);
break;
case 9:
var value = /** @type {number} */ (reader.readInt32());
msg.setCltvLimit(value);
break;
case 10:
var value = new lndrpc_pb.RouteHint;
reader.readMessage(value,lndrpc_pb.RouteHint.deserializeBinaryFromReader);
msg.addRouteHints(value);
break;
case 11:
var value = msg.getDestCustomRecordsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0);
});
break;
case 15:
var value = /** @type {boolean} */ (reader.readBool());
msg.setAllowSelfPayment(value);
break;
case 16:
var value = /** @type {!Array<!proto.lnrpc.FeatureBit>} */ (reader.readPackedEnum());
msg.setDestFeaturesList(value);
break;
case 17:
var value = /** @type {number} */ (reader.readUint32());
msg.setMaxParts(value);
break;
case 18:
var value = /** @type {boolean} */ (reader.readBool());
msg.setNoInflightUpdates(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.SendPaymentRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.SendPaymentRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.SendPaymentRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SendPaymentRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDest_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getAmt();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = message.getAmtMsat();
if (f !== 0) {
writer.writeInt64(
12,
f
);
}
f = message.getPaymentHash_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getFinalCltvDelta();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
f = message.getPaymentRequest();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getTimeoutSeconds();
if (f !== 0) {
writer.writeInt32(
6,
f
);
}
f = message.getFeeLimitSat();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = message.getFeeLimitMsat();
if (f !== 0) {
writer.writeInt64(
13,
f
);
}
f = message.getOutgoingChanId();
if (parseInt(f, 10) !== 0) {
writer.writeUint64String(
8,
f
);
}
f = message.getOutgoingChanIdsList();
if (f.length > 0) {
writer.writePackedUint64(
19,
f
);
}
f = message.getLastHopPubkey_asU8();
if (f.length > 0) {
writer.writeBytes(
14,
f
);
}
f = message.getCltvLimit();
if (f !== 0) {
writer.writeInt32(
9,
f
);
}
f = message.getRouteHintsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
10,
f,
lndrpc_pb.RouteHint.serializeBinaryToWriter
);
}
f = message.getDestCustomRecordsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes);
}
f = message.getAllowSelfPayment();
if (f) {
writer.writeBool(
15,
f
);
}
f = message.getDestFeaturesList();
if (f.length > 0) {
writer.writePackedEnum(
16,
f
);
}
f = message.getMaxParts();
if (f !== 0) {
writer.writeUint32(
17,
f
);
}
f = message.getNoInflightUpdates();
if (f) {
writer.writeBool(
18,
f
);
}
};
/**
* optional bytes dest = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.SendPaymentRequest.prototype.getDest = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes dest = 1;
* This is a type-conversion wrapper around `getDest()`
* @return {string}
*/
proto.routerrpc.SendPaymentRequest.prototype.getDest_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getDest()));
};
/**
* optional bytes dest = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getDest()`
* @return {!Uint8Array}
*/
proto.routerrpc.SendPaymentRequest.prototype.getDest_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getDest()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.SendPaymentRequest.prototype.setDest = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional int64 amt = 2;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getAmt = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setAmt = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional int64 amt_msat = 12;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 12, value);
};
/**
* optional bytes payment_hash = 3;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes payment_hash = 3;
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {string}
*/
proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPaymentHash()));
};
/**
* optional bytes payment_hash = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {!Uint8Array}
*/
proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPaymentHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.SendPaymentRequest.prototype.setPaymentHash = function(value) {
jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* optional int32 final_cltv_delta = 4;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getFinalCltvDelta = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setFinalCltvDelta = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string payment_request = 5;
* @return {string}
*/
proto.routerrpc.SendPaymentRequest.prototype.getPaymentRequest = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
proto.routerrpc.SendPaymentRequest.prototype.setPaymentRequest = function(value) {
jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional int32 timeout_seconds = 6;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getTimeoutSeconds = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setTimeoutSeconds = function(value) {
jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional int64 fee_limit_sat = 7;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getFeeLimitSat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setFeeLimitSat = function(value) {
jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional int64 fee_limit_msat = 13;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getFeeLimitMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setFeeLimitMsat = function(value) {
jspb.Message.setProto3IntField(this, 13, value);
};
/**
* optional uint64 outgoing_chan_id = 8;
* @return {string}
*/
proto.routerrpc.SendPaymentRequest.prototype.getOutgoingChanId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0"));
};
/** @param {string} value */
proto.routerrpc.SendPaymentRequest.prototype.setOutgoingChanId = function(value) {
jspb.Message.setProto3StringIntField(this, 8, value);
};
/**
* repeated uint64 outgoing_chan_ids = 19;
* @return {!Array<number>}
*/
proto.routerrpc.SendPaymentRequest.prototype.getOutgoingChanIdsList = function() {
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 19));
};
/** @param {!Array<number>} value */
proto.routerrpc.SendPaymentRequest.prototype.setOutgoingChanIdsList = function(value) {
jspb.Message.setField(this, 19, value || []);
};
/**
* @param {number} value
* @param {number=} opt_index
*/
proto.routerrpc.SendPaymentRequest.prototype.addOutgoingChanIds = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 19, value, opt_index);
};
proto.routerrpc.SendPaymentRequest.prototype.clearOutgoingChanIdsList = function() {
this.setOutgoingChanIdsList([]);
};
/**
* optional bytes last_hop_pubkey = 14;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
};
/**
* optional bytes last_hop_pubkey = 14;
* This is a type-conversion wrapper around `getLastHopPubkey()`
* @return {string}
*/
proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getLastHopPubkey()));
};
/**
* optional bytes last_hop_pubkey = 14;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getLastHopPubkey()`
* @return {!Uint8Array}
*/
proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getLastHopPubkey()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.SendPaymentRequest.prototype.setLastHopPubkey = function(value) {
jspb.Message.setProto3BytesField(this, 14, value);
};
/**
* optional int32 cltv_limit = 9;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getCltvLimit = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setCltvLimit = function(value) {
jspb.Message.setProto3IntField(this, 9, value);
};
/**
* repeated lnrpc.RouteHint route_hints = 10;
* @return {!Array<!proto.lnrpc.RouteHint>}
*/
proto.routerrpc.SendPaymentRequest.prototype.getRouteHintsList = function() {
return /** @type{!Array<!proto.lnrpc.RouteHint>} */ (
jspb.Message.getRepeatedWrapperField(this, lndrpc_pb.RouteHint, 10));
};
/** @param {!Array<!proto.lnrpc.RouteHint>} value */
proto.routerrpc.SendPaymentRequest.prototype.setRouteHintsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 10, value);
};
/**
* @param {!proto.lnrpc.RouteHint=} opt_value
* @param {number=} opt_index
* @return {!proto.lnrpc.RouteHint}
*/
proto.routerrpc.SendPaymentRequest.prototype.addRouteHints = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index);
};
proto.routerrpc.SendPaymentRequest.prototype.clearRouteHintsList = function() {
this.setRouteHintsList([]);
};
/**
* map<uint64, bytes> dest_custom_records = 11;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<number,!(string|Uint8Array)>}
*/
proto.routerrpc.SendPaymentRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<number,!(string|Uint8Array)>} */ (
jspb.Message.getMapField(this, 11, opt_noLazyCreate,
null));
};
proto.routerrpc.SendPaymentRequest.prototype.clearDestCustomRecordsMap = function() {
this.getDestCustomRecordsMap().clear();
};
/**
* optional bool allow_self_payment = 15;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.routerrpc.SendPaymentRequest.prototype.getAllowSelfPayment = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false));
};
/** @param {boolean} value */
proto.routerrpc.SendPaymentRequest.prototype.setAllowSelfPayment = function(value) {
jspb.Message.setProto3BooleanField(this, 15, value);
};
/**
* repeated lnrpc.FeatureBit dest_features = 16;
* @return {!Array<!proto.lnrpc.FeatureBit>}
*/
proto.routerrpc.SendPaymentRequest.prototype.getDestFeaturesList = function() {
return /** @type {!Array<!proto.lnrpc.FeatureBit>} */ (jspb.Message.getRepeatedField(this, 16));
};
/** @param {!Array<!proto.lnrpc.FeatureBit>} value */
proto.routerrpc.SendPaymentRequest.prototype.setDestFeaturesList = function(value) {
jspb.Message.setField(this, 16, value || []);
};
/**
* @param {!proto.lnrpc.FeatureBit} value
* @param {number=} opt_index
*/
proto.routerrpc.SendPaymentRequest.prototype.addDestFeatures = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 16, value, opt_index);
};
proto.routerrpc.SendPaymentRequest.prototype.clearDestFeaturesList = function() {
this.setDestFeaturesList([]);
};
/**
* optional uint32 max_parts = 17;
* @return {number}
*/
proto.routerrpc.SendPaymentRequest.prototype.getMaxParts = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
};
/** @param {number} value */
proto.routerrpc.SendPaymentRequest.prototype.setMaxParts = function(value) {
jspb.Message.setProto3IntField(this, 17, value);
};
/**
* optional bool no_inflight_updates = 18;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.routerrpc.SendPaymentRequest.prototype.getNoInflightUpdates = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false));
};
/** @param {boolean} value */
proto.routerrpc.SendPaymentRequest.prototype.setNoInflightUpdates = function(value) {
jspb.Message.setProto3BooleanField(this, 18, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.TrackPaymentRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.TrackPaymentRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.TrackPaymentRequest.displayName = 'proto.routerrpc.TrackPaymentRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.TrackPaymentRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.TrackPaymentRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.TrackPaymentRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.TrackPaymentRequest.toObject = function(includeInstance, msg) {
var f, obj = {
paymentHash: msg.getPaymentHash_asB64(),
noInflightUpdates: jspb.Message.getFieldWithDefault(msg, 2, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.TrackPaymentRequest}
*/
proto.routerrpc.TrackPaymentRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.TrackPaymentRequest;
return proto.routerrpc.TrackPaymentRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.TrackPaymentRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.TrackPaymentRequest}
*/
proto.routerrpc.TrackPaymentRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPaymentHash(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setNoInflightUpdates(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.TrackPaymentRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.TrackPaymentRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.TrackPaymentRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.TrackPaymentRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPaymentHash_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getNoInflightUpdates();
if (f) {
writer.writeBool(
2,
f
);
}
};
/**
* optional bytes payment_hash = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.TrackPaymentRequest.prototype.getPaymentHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes payment_hash = 1;
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {string}
*/
proto.routerrpc.TrackPaymentRequest.prototype.getPaymentHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPaymentHash()));
};
/**
* optional bytes payment_hash = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {!Uint8Array}
*/
proto.routerrpc.TrackPaymentRequest.prototype.getPaymentHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPaymentHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.TrackPaymentRequest.prototype.setPaymentHash = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bool no_inflight_updates = 2;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.routerrpc.TrackPaymentRequest.prototype.getNoInflightUpdates = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false));
};
/** @param {boolean} value */
proto.routerrpc.TrackPaymentRequest.prototype.setNoInflightUpdates = function(value) {
jspb.Message.setProto3BooleanField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.RouteFeeRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.RouteFeeRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.RouteFeeRequest.displayName = 'proto.routerrpc.RouteFeeRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.RouteFeeRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.RouteFeeRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.RouteFeeRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.RouteFeeRequest.toObject = function(includeInstance, msg) {
var f, obj = {
dest: msg.getDest_asB64(),
amtSat: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.RouteFeeRequest}
*/
proto.routerrpc.RouteFeeRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.RouteFeeRequest;
return proto.routerrpc.RouteFeeRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.RouteFeeRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.RouteFeeRequest}
*/
proto.routerrpc.RouteFeeRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setDest(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmtSat(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.RouteFeeRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.RouteFeeRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.RouteFeeRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.RouteFeeRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDest_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getAmtSat();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
};
/**
* optional bytes dest = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.RouteFeeRequest.prototype.getDest = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes dest = 1;
* This is a type-conversion wrapper around `getDest()`
* @return {string}
*/
proto.routerrpc.RouteFeeRequest.prototype.getDest_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getDest()));
};
/**
* optional bytes dest = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getDest()`
* @return {!Uint8Array}
*/
proto.routerrpc.RouteFeeRequest.prototype.getDest_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getDest()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.RouteFeeRequest.prototype.setDest = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional int64 amt_sat = 2;
* @return {number}
*/
proto.routerrpc.RouteFeeRequest.prototype.getAmtSat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.RouteFeeRequest.prototype.setAmtSat = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.RouteFeeResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.RouteFeeResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.RouteFeeResponse.displayName = 'proto.routerrpc.RouteFeeResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.RouteFeeResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.RouteFeeResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.RouteFeeResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.RouteFeeResponse.toObject = function(includeInstance, msg) {
var f, obj = {
routingFeeMsat: jspb.Message.getFieldWithDefault(msg, 1, 0),
timeLockDelay: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.RouteFeeResponse}
*/
proto.routerrpc.RouteFeeResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.RouteFeeResponse;
return proto.routerrpc.RouteFeeResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.RouteFeeResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.RouteFeeResponse}
*/
proto.routerrpc.RouteFeeResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt64());
msg.setRoutingFeeMsat(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setTimeLockDelay(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.RouteFeeResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.RouteFeeResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.RouteFeeResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.RouteFeeResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getRoutingFeeMsat();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getTimeLockDelay();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
};
/**
* optional int64 routing_fee_msat = 1;
* @return {number}
*/
proto.routerrpc.RouteFeeResponse.prototype.getRoutingFeeMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.routerrpc.RouteFeeResponse.prototype.setRoutingFeeMsat = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int64 time_lock_delay = 2;
* @return {number}
*/
proto.routerrpc.RouteFeeResponse.prototype.getTimeLockDelay = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.RouteFeeResponse.prototype.setTimeLockDelay = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.SendToRouteRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.SendToRouteRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.SendToRouteRequest.displayName = 'proto.routerrpc.SendToRouteRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.SendToRouteRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.SendToRouteRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SendToRouteRequest.toObject = function(includeInstance, msg) {
var f, obj = {
paymentHash: msg.getPaymentHash_asB64(),
route: (f = msg.getRoute()) && lndrpc_pb.Route.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.SendToRouteRequest}
*/
proto.routerrpc.SendToRouteRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.SendToRouteRequest;
return proto.routerrpc.SendToRouteRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.SendToRouteRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.SendToRouteRequest}
*/
proto.routerrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPaymentHash(value);
break;
case 2:
var value = new lndrpc_pb.Route;
reader.readMessage(value,lndrpc_pb.Route.deserializeBinaryFromReader);
msg.setRoute(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.SendToRouteRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.SendToRouteRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPaymentHash_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getRoute();
if (f != null) {
writer.writeMessage(
2,
f,
lndrpc_pb.Route.serializeBinaryToWriter
);
}
};
/**
* optional bytes payment_hash = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.SendToRouteRequest.prototype.getPaymentHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes payment_hash = 1;
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {string}
*/
proto.routerrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPaymentHash()));
};
/**
* optional bytes payment_hash = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {!Uint8Array}
*/
proto.routerrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPaymentHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional lnrpc.Route route = 2;
* @return {?proto.lnrpc.Route}
*/
proto.routerrpc.SendToRouteRequest.prototype.getRoute = function() {
return /** @type{?proto.lnrpc.Route} */ (
jspb.Message.getWrapperField(this, lndrpc_pb.Route, 2));
};
/** @param {?proto.lnrpc.Route|undefined} value */
proto.routerrpc.SendToRouteRequest.prototype.setRoute = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.routerrpc.SendToRouteRequest.prototype.clearRoute = function() {
this.setRoute(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.SendToRouteRequest.prototype.hasRoute = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.SendToRouteResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.SendToRouteResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.SendToRouteResponse.displayName = 'proto.routerrpc.SendToRouteResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.SendToRouteResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.SendToRouteResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.SendToRouteResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SendToRouteResponse.toObject = function(includeInstance, msg) {
var f, obj = {
preimage: msg.getPreimage_asB64(),
failure: (f = msg.getFailure()) && lndrpc_pb.Failure.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.SendToRouteResponse}
*/
proto.routerrpc.SendToRouteResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.SendToRouteResponse;
return proto.routerrpc.SendToRouteResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.SendToRouteResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.SendToRouteResponse}
*/
proto.routerrpc.SendToRouteResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPreimage(value);
break;
case 2:
var value = new lndrpc_pb.Failure;
reader.readMessage(value,lndrpc_pb.Failure.deserializeBinaryFromReader);
msg.setFailure(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.SendToRouteResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.SendToRouteResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.SendToRouteResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SendToRouteResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPreimage_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getFailure();
if (f != null) {
writer.writeMessage(
2,
f,
lndrpc_pb.Failure.serializeBinaryToWriter
);
}
};
/**
* optional bytes preimage = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.SendToRouteResponse.prototype.getPreimage = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes preimage = 1;
* This is a type-conversion wrapper around `getPreimage()`
* @return {string}
*/
proto.routerrpc.SendToRouteResponse.prototype.getPreimage_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPreimage()));
};
/**
* optional bytes preimage = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPreimage()`
* @return {!Uint8Array}
*/
proto.routerrpc.SendToRouteResponse.prototype.getPreimage_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPreimage()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.SendToRouteResponse.prototype.setPreimage = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional lnrpc.Failure failure = 2;
* @return {?proto.lnrpc.Failure}
*/
proto.routerrpc.SendToRouteResponse.prototype.getFailure = function() {
return /** @type{?proto.lnrpc.Failure} */ (
jspb.Message.getWrapperField(this, lndrpc_pb.Failure, 2));
};
/** @param {?proto.lnrpc.Failure|undefined} value */
proto.routerrpc.SendToRouteResponse.prototype.setFailure = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.routerrpc.SendToRouteResponse.prototype.clearFailure = function() {
this.setFailure(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.SendToRouteResponse.prototype.hasFailure = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.ResetMissionControlRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.ResetMissionControlRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.ResetMissionControlRequest.displayName = 'proto.routerrpc.ResetMissionControlRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.ResetMissionControlRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.ResetMissionControlRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.ResetMissionControlRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ResetMissionControlRequest.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.ResetMissionControlRequest}
*/
proto.routerrpc.ResetMissionControlRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.ResetMissionControlRequest;
return proto.routerrpc.ResetMissionControlRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.ResetMissionControlRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.ResetMissionControlRequest}
*/
proto.routerrpc.ResetMissionControlRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.ResetMissionControlRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.ResetMissionControlRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.ResetMissionControlRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ResetMissionControlRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.ResetMissionControlResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.ResetMissionControlResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.ResetMissionControlResponse.displayName = 'proto.routerrpc.ResetMissionControlResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.ResetMissionControlResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.ResetMissionControlResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.ResetMissionControlResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ResetMissionControlResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.ResetMissionControlResponse}
*/
proto.routerrpc.ResetMissionControlResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.ResetMissionControlResponse;
return proto.routerrpc.ResetMissionControlResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.ResetMissionControlResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.ResetMissionControlResponse}
*/
proto.routerrpc.ResetMissionControlResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.ResetMissionControlResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.ResetMissionControlResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.ResetMissionControlResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ResetMissionControlResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.QueryMissionControlRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.QueryMissionControlRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.QueryMissionControlRequest.displayName = 'proto.routerrpc.QueryMissionControlRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.QueryMissionControlRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.QueryMissionControlRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.QueryMissionControlRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryMissionControlRequest.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.QueryMissionControlRequest}
*/
proto.routerrpc.QueryMissionControlRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.QueryMissionControlRequest;
return proto.routerrpc.QueryMissionControlRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.QueryMissionControlRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.QueryMissionControlRequest}
*/
proto.routerrpc.QueryMissionControlRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.QueryMissionControlRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.QueryMissionControlRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.QueryMissionControlRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryMissionControlRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.QueryMissionControlResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.QueryMissionControlResponse.repeatedFields_, null);
};
goog.inherits(proto.routerrpc.QueryMissionControlResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.QueryMissionControlResponse.displayName = 'proto.routerrpc.QueryMissionControlResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.routerrpc.QueryMissionControlResponse.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.QueryMissionControlResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.QueryMissionControlResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.QueryMissionControlResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryMissionControlResponse.toObject = function(includeInstance, msg) {
var f, obj = {
pairsList: jspb.Message.toObjectList(msg.getPairsList(),
proto.routerrpc.PairHistory.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.QueryMissionControlResponse}
*/
proto.routerrpc.QueryMissionControlResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.QueryMissionControlResponse;
return proto.routerrpc.QueryMissionControlResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.QueryMissionControlResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.QueryMissionControlResponse}
*/
proto.routerrpc.QueryMissionControlResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new proto.routerrpc.PairHistory;
reader.readMessage(value,proto.routerrpc.PairHistory.deserializeBinaryFromReader);
msg.addPairs(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.QueryMissionControlResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.QueryMissionControlResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.QueryMissionControlResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryMissionControlResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPairsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.routerrpc.PairHistory.serializeBinaryToWriter
);
}
};
/**
* repeated PairHistory pairs = 2;
* @return {!Array<!proto.routerrpc.PairHistory>}
*/
proto.routerrpc.QueryMissionControlResponse.prototype.getPairsList = function() {
return /** @type{!Array<!proto.routerrpc.PairHistory>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.routerrpc.PairHistory, 2));
};
/** @param {!Array<!proto.routerrpc.PairHistory>} value */
proto.routerrpc.QueryMissionControlResponse.prototype.setPairsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.routerrpc.PairHistory=} opt_value
* @param {number=} opt_index
* @return {!proto.routerrpc.PairHistory}
*/
proto.routerrpc.QueryMissionControlResponse.prototype.addPairs = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.routerrpc.PairHistory, opt_index);
};
proto.routerrpc.QueryMissionControlResponse.prototype.clearPairsList = function() {
this.setPairsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.PairHistory = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.PairHistory, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.PairHistory.displayName = 'proto.routerrpc.PairHistory';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.PairHistory.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.PairHistory.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.PairHistory} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.PairHistory.toObject = function(includeInstance, msg) {
var f, obj = {
nodeFrom: msg.getNodeFrom_asB64(),
nodeTo: msg.getNodeTo_asB64(),
history: (f = msg.getHistory()) && proto.routerrpc.PairData.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.PairHistory}
*/
proto.routerrpc.PairHistory.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.PairHistory;
return proto.routerrpc.PairHistory.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.PairHistory} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.PairHistory}
*/
proto.routerrpc.PairHistory.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setNodeFrom(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setNodeTo(value);
break;
case 7:
var value = new proto.routerrpc.PairData;
reader.readMessage(value,proto.routerrpc.PairData.deserializeBinaryFromReader);
msg.setHistory(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.PairHistory.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.PairHistory.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.PairHistory} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.PairHistory.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getNodeFrom_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getNodeTo_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getHistory();
if (f != null) {
writer.writeMessage(
7,
f,
proto.routerrpc.PairData.serializeBinaryToWriter
);
}
};
/**
* optional bytes node_from = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.PairHistory.prototype.getNodeFrom = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes node_from = 1;
* This is a type-conversion wrapper around `getNodeFrom()`
* @return {string}
*/
proto.routerrpc.PairHistory.prototype.getNodeFrom_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getNodeFrom()));
};
/**
* optional bytes node_from = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getNodeFrom()`
* @return {!Uint8Array}
*/
proto.routerrpc.PairHistory.prototype.getNodeFrom_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getNodeFrom()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.PairHistory.prototype.setNodeFrom = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes node_to = 2;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.PairHistory.prototype.getNodeTo = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes node_to = 2;
* This is a type-conversion wrapper around `getNodeTo()`
* @return {string}
*/
proto.routerrpc.PairHistory.prototype.getNodeTo_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getNodeTo()));
};
/**
* optional bytes node_to = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getNodeTo()`
* @return {!Uint8Array}
*/
proto.routerrpc.PairHistory.prototype.getNodeTo_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getNodeTo()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.PairHistory.prototype.setNodeTo = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional PairData history = 7;
* @return {?proto.routerrpc.PairData}
*/
proto.routerrpc.PairHistory.prototype.getHistory = function() {
return /** @type{?proto.routerrpc.PairData} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.PairData, 7));
};
/** @param {?proto.routerrpc.PairData|undefined} value */
proto.routerrpc.PairHistory.prototype.setHistory = function(value) {
jspb.Message.setWrapperField(this, 7, value);
};
proto.routerrpc.PairHistory.prototype.clearHistory = function() {
this.setHistory(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.PairHistory.prototype.hasHistory = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.PairData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.PairData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.PairData.displayName = 'proto.routerrpc.PairData';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.PairData.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.PairData.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.PairData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.PairData.toObject = function(includeInstance, msg) {
var f, obj = {
failTime: jspb.Message.getFieldWithDefault(msg, 1, 0),
failAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0),
failAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0),
successTime: jspb.Message.getFieldWithDefault(msg, 5, 0),
successAmtSat: jspb.Message.getFieldWithDefault(msg, 6, 0),
successAmtMsat: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.PairData}
*/
proto.routerrpc.PairData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.PairData;
return proto.routerrpc.PairData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.PairData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.PairData}
*/
proto.routerrpc.PairData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt64());
msg.setFailTime(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setFailAmtSat(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setFailAmtMsat(value);
break;
case 5:
var value = /** @type {number} */ (reader.readInt64());
msg.setSuccessTime(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt64());
msg.setSuccessAmtSat(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setSuccessAmtMsat(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.PairData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.PairData.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.PairData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.PairData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFailTime();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getFailAmtSat();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = message.getFailAmtMsat();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getSuccessTime();
if (f !== 0) {
writer.writeInt64(
5,
f
);
}
f = message.getSuccessAmtSat();
if (f !== 0) {
writer.writeInt64(
6,
f
);
}
f = message.getSuccessAmtMsat();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
};
/**
* optional int64 fail_time = 1;
* @return {number}
*/
proto.routerrpc.PairData.prototype.getFailTime = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.routerrpc.PairData.prototype.setFailTime = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int64 fail_amt_sat = 2;
* @return {number}
*/
proto.routerrpc.PairData.prototype.getFailAmtSat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.PairData.prototype.setFailAmtSat = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional int64 fail_amt_msat = 4;
* @return {number}
*/
proto.routerrpc.PairData.prototype.getFailAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.routerrpc.PairData.prototype.setFailAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional int64 success_time = 5;
* @return {number}
*/
proto.routerrpc.PairData.prototype.getSuccessTime = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value */
proto.routerrpc.PairData.prototype.setSuccessTime = function(value) {
jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional int64 success_amt_sat = 6;
* @return {number}
*/
proto.routerrpc.PairData.prototype.getSuccessAmtSat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
proto.routerrpc.PairData.prototype.setSuccessAmtSat = function(value) {
jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional int64 success_amt_msat = 7;
* @return {number}
*/
proto.routerrpc.PairData.prototype.getSuccessAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {number} value */
proto.routerrpc.PairData.prototype.setSuccessAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 7, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.QueryProbabilityRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.QueryProbabilityRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.QueryProbabilityRequest.displayName = 'proto.routerrpc.QueryProbabilityRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.QueryProbabilityRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.QueryProbabilityRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.QueryProbabilityRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryProbabilityRequest.toObject = function(includeInstance, msg) {
var f, obj = {
fromNode: msg.getFromNode_asB64(),
toNode: msg.getToNode_asB64(),
amtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.QueryProbabilityRequest}
*/
proto.routerrpc.QueryProbabilityRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.QueryProbabilityRequest;
return proto.routerrpc.QueryProbabilityRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.QueryProbabilityRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.QueryProbabilityRequest}
*/
proto.routerrpc.QueryProbabilityRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setFromNode(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setToNode(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmtMsat(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.QueryProbabilityRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.QueryProbabilityRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryProbabilityRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFromNode_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getToNode_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getAmtMsat();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
};
/**
* optional bytes from_node = 1;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes from_node = 1;
* This is a type-conversion wrapper around `getFromNode()`
* @return {string}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getFromNode()));
};
/**
* optional bytes from_node = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getFromNode()`
* @return {!Uint8Array}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getFromNode()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.QueryProbabilityRequest.prototype.setFromNode = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes to_node = 2;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getToNode = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes to_node = 2;
* This is a type-conversion wrapper around `getToNode()`
* @return {string}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getToNode_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getToNode()));
};
/**
* optional bytes to_node = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getToNode()`
* @return {!Uint8Array}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getToNode_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getToNode()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.QueryProbabilityRequest.prototype.setToNode = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional int64 amt_msat = 3;
* @return {number}
*/
proto.routerrpc.QueryProbabilityRequest.prototype.getAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.routerrpc.QueryProbabilityRequest.prototype.setAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.QueryProbabilityResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.QueryProbabilityResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.QueryProbabilityResponse.displayName = 'proto.routerrpc.QueryProbabilityResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.QueryProbabilityResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.QueryProbabilityResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.QueryProbabilityResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryProbabilityResponse.toObject = function(includeInstance, msg) {
var f, obj = {
probability: +jspb.Message.getFieldWithDefault(msg, 1, 0.0),
history: (f = msg.getHistory()) && proto.routerrpc.PairData.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.QueryProbabilityResponse}
*/
proto.routerrpc.QueryProbabilityResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.QueryProbabilityResponse;
return proto.routerrpc.QueryProbabilityResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.QueryProbabilityResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.QueryProbabilityResponse}
*/
proto.routerrpc.QueryProbabilityResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readDouble());
msg.setProbability(value);
break;
case 2:
var value = new proto.routerrpc.PairData;
reader.readMessage(value,proto.routerrpc.PairData.deserializeBinaryFromReader);
msg.setHistory(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.QueryProbabilityResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.QueryProbabilityResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.QueryProbabilityResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.QueryProbabilityResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProbability();
if (f !== 0.0) {
writer.writeDouble(
1,
f
);
}
f = message.getHistory();
if (f != null) {
writer.writeMessage(
2,
f,
proto.routerrpc.PairData.serializeBinaryToWriter
);
}
};
/**
* optional double probability = 1;
* @return {number}
*/
proto.routerrpc.QueryProbabilityResponse.prototype.getProbability = function() {
return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 1, 0.0));
};
/** @param {number} value */
proto.routerrpc.QueryProbabilityResponse.prototype.setProbability = function(value) {
jspb.Message.setProto3FloatField(this, 1, value);
};
/**
* optional PairData history = 2;
* @return {?proto.routerrpc.PairData}
*/
proto.routerrpc.QueryProbabilityResponse.prototype.getHistory = function() {
return /** @type{?proto.routerrpc.PairData} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.PairData, 2));
};
/** @param {?proto.routerrpc.PairData|undefined} value */
proto.routerrpc.QueryProbabilityResponse.prototype.setHistory = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.routerrpc.QueryProbabilityResponse.prototype.clearHistory = function() {
this.setHistory(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.QueryProbabilityResponse.prototype.hasHistory = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.BuildRouteRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.BuildRouteRequest.repeatedFields_, null);
};
goog.inherits(proto.routerrpc.BuildRouteRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.BuildRouteRequest.displayName = 'proto.routerrpc.BuildRouteRequest';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.routerrpc.BuildRouteRequest.repeatedFields_ = [4];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.BuildRouteRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.BuildRouteRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.BuildRouteRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.BuildRouteRequest.toObject = function(includeInstance, msg) {
var f, obj = {
amtMsat: jspb.Message.getFieldWithDefault(msg, 1, 0),
finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 2, 0),
outgoingChanId: jspb.Message.getFieldWithDefault(msg, 3, "0"),
hopPubkeysList: msg.getHopPubkeysList_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.BuildRouteRequest}
*/
proto.routerrpc.BuildRouteRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.BuildRouteRequest;
return proto.routerrpc.BuildRouteRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.BuildRouteRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.BuildRouteRequest}
*/
proto.routerrpc.BuildRouteRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmtMsat(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setFinalCltvDelta(value);
break;
case 3:
var value = /** @type {string} */ (reader.readUint64String());
msg.setOutgoingChanId(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.addHopPubkeys(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.BuildRouteRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.BuildRouteRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.BuildRouteRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.BuildRouteRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAmtMsat();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getFinalCltvDelta();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
f = message.getOutgoingChanId();
if (parseInt(f, 10) !== 0) {
writer.writeUint64String(
3,
f
);
}
f = message.getHopPubkeysList_asU8();
if (f.length > 0) {
writer.writeRepeatedBytes(
4,
f
);
}
};
/**
* optional int64 amt_msat = 1;
* @return {number}
*/
proto.routerrpc.BuildRouteRequest.prototype.getAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.routerrpc.BuildRouteRequest.prototype.setAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int32 final_cltv_delta = 2;
* @return {number}
*/
proto.routerrpc.BuildRouteRequest.prototype.getFinalCltvDelta = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.BuildRouteRequest.prototype.setFinalCltvDelta = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 outgoing_chan_id = 3;
* @return {string}
*/
proto.routerrpc.BuildRouteRequest.prototype.getOutgoingChanId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0"));
};
/** @param {string} value */
proto.routerrpc.BuildRouteRequest.prototype.setOutgoingChanId = function(value) {
jspb.Message.setProto3StringIntField(this, 3, value);
};
/**
* repeated bytes hop_pubkeys = 4;
* @return {!(Array<!Uint8Array>|Array<string>)}
*/
proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList = function() {
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 4));
};
/**
* repeated bytes hop_pubkeys = 4;
* This is a type-conversion wrapper around `getHopPubkeysList()`
* @return {!Array<string>}
*/
proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList_asB64 = function() {
return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(
this.getHopPubkeysList()));
};
/**
* repeated bytes hop_pubkeys = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getHopPubkeysList()`
* @return {!Array<!Uint8Array>}
*/
proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList_asU8 = function() {
return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
this.getHopPubkeysList()));
};
/** @param {!(Array<!Uint8Array>|Array<string>)} value */
proto.routerrpc.BuildRouteRequest.prototype.setHopPubkeysList = function(value) {
jspb.Message.setField(this, 4, value || []);
};
/**
* @param {!(string|Uint8Array)} value
* @param {number=} opt_index
*/
proto.routerrpc.BuildRouteRequest.prototype.addHopPubkeys = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
proto.routerrpc.BuildRouteRequest.prototype.clearHopPubkeysList = function() {
this.setHopPubkeysList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.BuildRouteResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.BuildRouteResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.BuildRouteResponse.displayName = 'proto.routerrpc.BuildRouteResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.BuildRouteResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.BuildRouteResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.BuildRouteResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.BuildRouteResponse.toObject = function(includeInstance, msg) {
var f, obj = {
route: (f = msg.getRoute()) && lndrpc_pb.Route.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.BuildRouteResponse}
*/
proto.routerrpc.BuildRouteResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.BuildRouteResponse;
return proto.routerrpc.BuildRouteResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.BuildRouteResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.BuildRouteResponse}
*/
proto.routerrpc.BuildRouteResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new lndrpc_pb.Route;
reader.readMessage(value,lndrpc_pb.Route.deserializeBinaryFromReader);
msg.setRoute(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.BuildRouteResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.BuildRouteResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.BuildRouteResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.BuildRouteResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getRoute();
if (f != null) {
writer.writeMessage(
1,
f,
lndrpc_pb.Route.serializeBinaryToWriter
);
}
};
/**
* optional lnrpc.Route route = 1;
* @return {?proto.lnrpc.Route}
*/
proto.routerrpc.BuildRouteResponse.prototype.getRoute = function() {
return /** @type{?proto.lnrpc.Route} */ (
jspb.Message.getWrapperField(this, lndrpc_pb.Route, 1));
};
/** @param {?proto.lnrpc.Route|undefined} value */
proto.routerrpc.BuildRouteResponse.prototype.setRoute = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.routerrpc.BuildRouteResponse.prototype.clearRoute = function() {
this.setRoute(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.BuildRouteResponse.prototype.hasRoute = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.SubscribeHtlcEventsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.SubscribeHtlcEventsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.SubscribeHtlcEventsRequest.displayName = 'proto.routerrpc.SubscribeHtlcEventsRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.SubscribeHtlcEventsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.SubscribeHtlcEventsRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.SubscribeHtlcEventsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SubscribeHtlcEventsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.SubscribeHtlcEventsRequest}
*/
proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.SubscribeHtlcEventsRequest;
return proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.SubscribeHtlcEventsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.SubscribeHtlcEventsRequest}
*/
proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.SubscribeHtlcEventsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.SubscribeHtlcEventsRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.SubscribeHtlcEventsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SubscribeHtlcEventsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.HtlcEvent = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerrpc.HtlcEvent.oneofGroups_);
};
goog.inherits(proto.routerrpc.HtlcEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.HtlcEvent.displayName = 'proto.routerrpc.HtlcEvent';
}
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.routerrpc.HtlcEvent.oneofGroups_ = [[7,8,9,10]];
/**
* @enum {number}
*/
proto.routerrpc.HtlcEvent.EventCase = {
EVENT_NOT_SET: 0,
FORWARD_EVENT: 7,
FORWARD_FAIL_EVENT: 8,
SETTLE_EVENT: 9,
LINK_FAIL_EVENT: 10
};
/**
* @return {proto.routerrpc.HtlcEvent.EventCase}
*/
proto.routerrpc.HtlcEvent.prototype.getEventCase = function() {
return /** @type {proto.routerrpc.HtlcEvent.EventCase} */(jspb.Message.computeOneofCase(this, proto.routerrpc.HtlcEvent.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.HtlcEvent.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.HtlcEvent.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.HtlcEvent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.HtlcEvent.toObject = function(includeInstance, msg) {
var f, obj = {
incomingChannelId: jspb.Message.getFieldWithDefault(msg, 1, 0),
outgoingChannelId: jspb.Message.getFieldWithDefault(msg, 2, 0),
incomingHtlcId: jspb.Message.getFieldWithDefault(msg, 3, 0),
outgoingHtlcId: jspb.Message.getFieldWithDefault(msg, 4, 0),
timestampNs: jspb.Message.getFieldWithDefault(msg, 5, 0),
eventType: jspb.Message.getFieldWithDefault(msg, 6, 0),
forwardEvent: (f = msg.getForwardEvent()) && proto.routerrpc.ForwardEvent.toObject(includeInstance, f),
forwardFailEvent: (f = msg.getForwardFailEvent()) && proto.routerrpc.ForwardFailEvent.toObject(includeInstance, f),
settleEvent: (f = msg.getSettleEvent()) && proto.routerrpc.SettleEvent.toObject(includeInstance, f),
linkFailEvent: (f = msg.getLinkFailEvent()) && proto.routerrpc.LinkFailEvent.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.HtlcEvent}
*/
proto.routerrpc.HtlcEvent.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.HtlcEvent;
return proto.routerrpc.HtlcEvent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.HtlcEvent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.HtlcEvent}
*/
proto.routerrpc.HtlcEvent.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setIncomingChannelId(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setOutgoingChannelId(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setIncomingHtlcId(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setOutgoingHtlcId(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimestampNs(value);
break;
case 6:
var value = /** @type {!proto.routerrpc.HtlcEvent.EventType} */ (reader.readEnum());
msg.setEventType(value);
break;
case 7:
var value = new proto.routerrpc.ForwardEvent;
reader.readMessage(value,proto.routerrpc.ForwardEvent.deserializeBinaryFromReader);
msg.setForwardEvent(value);
break;
case 8:
var value = new proto.routerrpc.ForwardFailEvent;
reader.readMessage(value,proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader);
msg.setForwardFailEvent(value);
break;
case 9:
var value = new proto.routerrpc.SettleEvent;
reader.readMessage(value,proto.routerrpc.SettleEvent.deserializeBinaryFromReader);
msg.setSettleEvent(value);
break;
case 10:
var value = new proto.routerrpc.LinkFailEvent;
reader.readMessage(value,proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader);
msg.setLinkFailEvent(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.HtlcEvent.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.HtlcEvent.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.HtlcEvent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.HtlcEvent.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIncomingChannelId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getOutgoingChannelId();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getIncomingHtlcId();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getOutgoingHtlcId();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
f = message.getTimestampNs();
if (f !== 0) {
writer.writeUint64(
5,
f
);
}
f = message.getEventType();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
f = message.getForwardEvent();
if (f != null) {
writer.writeMessage(
7,
f,
proto.routerrpc.ForwardEvent.serializeBinaryToWriter
);
}
f = message.getForwardFailEvent();
if (f != null) {
writer.writeMessage(
8,
f,
proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter
);
}
f = message.getSettleEvent();
if (f != null) {
writer.writeMessage(
9,
f,
proto.routerrpc.SettleEvent.serializeBinaryToWriter
);
}
f = message.getLinkFailEvent();
if (f != null) {
writer.writeMessage(
10,
f,
proto.routerrpc.LinkFailEvent.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.routerrpc.HtlcEvent.EventType = {
UNKNOWN: 0,
SEND: 1,
RECEIVE: 2,
FORWARD: 3
};
/**
* optional uint64 incoming_channel_id = 1;
* @return {number}
*/
proto.routerrpc.HtlcEvent.prototype.getIncomingChannelId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcEvent.prototype.setIncomingChannelId = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint64 outgoing_channel_id = 2;
* @return {number}
*/
proto.routerrpc.HtlcEvent.prototype.getOutgoingChannelId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcEvent.prototype.setOutgoingChannelId = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 incoming_htlc_id = 3;
* @return {number}
*/
proto.routerrpc.HtlcEvent.prototype.getIncomingHtlcId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcEvent.prototype.setIncomingHtlcId = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional uint64 outgoing_htlc_id = 4;
* @return {number}
*/
proto.routerrpc.HtlcEvent.prototype.getOutgoingHtlcId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcEvent.prototype.setOutgoingHtlcId = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional uint64 timestamp_ns = 5;
* @return {number}
*/
proto.routerrpc.HtlcEvent.prototype.getTimestampNs = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcEvent.prototype.setTimestampNs = function(value) {
jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional EventType event_type = 6;
* @return {!proto.routerrpc.HtlcEvent.EventType}
*/
proto.routerrpc.HtlcEvent.prototype.getEventType = function() {
return /** @type {!proto.routerrpc.HtlcEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {!proto.routerrpc.HtlcEvent.EventType} value */
proto.routerrpc.HtlcEvent.prototype.setEventType = function(value) {
jspb.Message.setProto3EnumField(this, 6, value);
};
/**
* optional ForwardEvent forward_event = 7;
* @return {?proto.routerrpc.ForwardEvent}
*/
proto.routerrpc.HtlcEvent.prototype.getForwardEvent = function() {
return /** @type{?proto.routerrpc.ForwardEvent} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.ForwardEvent, 7));
};
/** @param {?proto.routerrpc.ForwardEvent|undefined} value */
proto.routerrpc.HtlcEvent.prototype.setForwardEvent = function(value) {
jspb.Message.setOneofWrapperField(this, 7, proto.routerrpc.HtlcEvent.oneofGroups_[0], value);
};
proto.routerrpc.HtlcEvent.prototype.clearForwardEvent = function() {
this.setForwardEvent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.HtlcEvent.prototype.hasForwardEvent = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional ForwardFailEvent forward_fail_event = 8;
* @return {?proto.routerrpc.ForwardFailEvent}
*/
proto.routerrpc.HtlcEvent.prototype.getForwardFailEvent = function() {
return /** @type{?proto.routerrpc.ForwardFailEvent} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.ForwardFailEvent, 8));
};
/** @param {?proto.routerrpc.ForwardFailEvent|undefined} value */
proto.routerrpc.HtlcEvent.prototype.setForwardFailEvent = function(value) {
jspb.Message.setOneofWrapperField(this, 8, proto.routerrpc.HtlcEvent.oneofGroups_[0], value);
};
proto.routerrpc.HtlcEvent.prototype.clearForwardFailEvent = function() {
this.setForwardFailEvent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.HtlcEvent.prototype.hasForwardFailEvent = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional SettleEvent settle_event = 9;
* @return {?proto.routerrpc.SettleEvent}
*/
proto.routerrpc.HtlcEvent.prototype.getSettleEvent = function() {
return /** @type{?proto.routerrpc.SettleEvent} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.SettleEvent, 9));
};
/** @param {?proto.routerrpc.SettleEvent|undefined} value */
proto.routerrpc.HtlcEvent.prototype.setSettleEvent = function(value) {
jspb.Message.setOneofWrapperField(this, 9, proto.routerrpc.HtlcEvent.oneofGroups_[0], value);
};
proto.routerrpc.HtlcEvent.prototype.clearSettleEvent = function() {
this.setSettleEvent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.HtlcEvent.prototype.hasSettleEvent = function() {
return jspb.Message.getField(this, 9) != null;
};
/**
* optional LinkFailEvent link_fail_event = 10;
* @return {?proto.routerrpc.LinkFailEvent}
*/
proto.routerrpc.HtlcEvent.prototype.getLinkFailEvent = function() {
return /** @type{?proto.routerrpc.LinkFailEvent} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.LinkFailEvent, 10));
};
/** @param {?proto.routerrpc.LinkFailEvent|undefined} value */
proto.routerrpc.HtlcEvent.prototype.setLinkFailEvent = function(value) {
jspb.Message.setOneofWrapperField(this, 10, proto.routerrpc.HtlcEvent.oneofGroups_[0], value);
};
proto.routerrpc.HtlcEvent.prototype.clearLinkFailEvent = function() {
this.setLinkFailEvent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.HtlcEvent.prototype.hasLinkFailEvent = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.HtlcInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.HtlcInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.HtlcInfo.displayName = 'proto.routerrpc.HtlcInfo';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.HtlcInfo.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.HtlcInfo.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.HtlcInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.HtlcInfo.toObject = function(includeInstance, msg) {
var f, obj = {
incomingTimelock: jspb.Message.getFieldWithDefault(msg, 1, 0),
outgoingTimelock: jspb.Message.getFieldWithDefault(msg, 2, 0),
incomingAmtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0),
outgoingAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.HtlcInfo}
*/
proto.routerrpc.HtlcInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.HtlcInfo;
return proto.routerrpc.HtlcInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.HtlcInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.HtlcInfo}
*/
proto.routerrpc.HtlcInfo.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint32());
msg.setIncomingTimelock(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint32());
msg.setOutgoingTimelock(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setIncomingAmtMsat(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setOutgoingAmtMsat(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.HtlcInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.HtlcInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.HtlcInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.HtlcInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIncomingTimelock();
if (f !== 0) {
writer.writeUint32(
1,
f
);
}
f = message.getOutgoingTimelock();
if (f !== 0) {
writer.writeUint32(
2,
f
);
}
f = message.getIncomingAmtMsat();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getOutgoingAmtMsat();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
};
/**
* optional uint32 incoming_timelock = 1;
* @return {number}
*/
proto.routerrpc.HtlcInfo.prototype.getIncomingTimelock = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcInfo.prototype.setIncomingTimelock = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint32 outgoing_timelock = 2;
* @return {number}
*/
proto.routerrpc.HtlcInfo.prototype.getOutgoingTimelock = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcInfo.prototype.setOutgoingTimelock = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 incoming_amt_msat = 3;
* @return {number}
*/
proto.routerrpc.HtlcInfo.prototype.getIncomingAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcInfo.prototype.setIncomingAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional uint64 outgoing_amt_msat = 4;
* @return {number}
*/
proto.routerrpc.HtlcInfo.prototype.getOutgoingAmtMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.routerrpc.HtlcInfo.prototype.setOutgoingAmtMsat = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.ForwardEvent = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.ForwardEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.ForwardEvent.displayName = 'proto.routerrpc.ForwardEvent';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.ForwardEvent.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.ForwardEvent.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.ForwardEvent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardEvent.toObject = function(includeInstance, msg) {
var f, obj = {
info: (f = msg.getInfo()) && proto.routerrpc.HtlcInfo.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.ForwardEvent}
*/
proto.routerrpc.ForwardEvent.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.ForwardEvent;
return proto.routerrpc.ForwardEvent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.ForwardEvent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.ForwardEvent}
*/
proto.routerrpc.ForwardEvent.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.routerrpc.HtlcInfo;
reader.readMessage(value,proto.routerrpc.HtlcInfo.deserializeBinaryFromReader);
msg.setInfo(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.ForwardEvent.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.ForwardEvent.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.ForwardEvent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardEvent.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getInfo();
if (f != null) {
writer.writeMessage(
1,
f,
proto.routerrpc.HtlcInfo.serializeBinaryToWriter
);
}
};
/**
* optional HtlcInfo info = 1;
* @return {?proto.routerrpc.HtlcInfo}
*/
proto.routerrpc.ForwardEvent.prototype.getInfo = function() {
return /** @type{?proto.routerrpc.HtlcInfo} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.HtlcInfo, 1));
};
/** @param {?proto.routerrpc.HtlcInfo|undefined} value */
proto.routerrpc.ForwardEvent.prototype.setInfo = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.routerrpc.ForwardEvent.prototype.clearInfo = function() {
this.setInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.ForwardEvent.prototype.hasInfo = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.ForwardFailEvent = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.ForwardFailEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.ForwardFailEvent.displayName = 'proto.routerrpc.ForwardFailEvent';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.ForwardFailEvent.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.ForwardFailEvent.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.ForwardFailEvent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardFailEvent.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.ForwardFailEvent}
*/
proto.routerrpc.ForwardFailEvent.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.ForwardFailEvent;
return proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.ForwardFailEvent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.ForwardFailEvent}
*/
proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.ForwardFailEvent.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.ForwardFailEvent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.SettleEvent = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.SettleEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.SettleEvent.displayName = 'proto.routerrpc.SettleEvent';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.SettleEvent.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.SettleEvent.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.SettleEvent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SettleEvent.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.SettleEvent}
*/
proto.routerrpc.SettleEvent.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.SettleEvent;
return proto.routerrpc.SettleEvent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.SettleEvent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.SettleEvent}
*/
proto.routerrpc.SettleEvent.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.SettleEvent.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.SettleEvent.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.SettleEvent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.SettleEvent.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.LinkFailEvent = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.LinkFailEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.LinkFailEvent.displayName = 'proto.routerrpc.LinkFailEvent';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.LinkFailEvent.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.LinkFailEvent.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.LinkFailEvent} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.LinkFailEvent.toObject = function(includeInstance, msg) {
var f, obj = {
info: (f = msg.getInfo()) && proto.routerrpc.HtlcInfo.toObject(includeInstance, f),
wireFailure: jspb.Message.getFieldWithDefault(msg, 2, 0),
failureDetail: jspb.Message.getFieldWithDefault(msg, 3, 0),
failureString: jspb.Message.getFieldWithDefault(msg, 4, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.LinkFailEvent}
*/
proto.routerrpc.LinkFailEvent.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.LinkFailEvent;
return proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.LinkFailEvent} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.LinkFailEvent}
*/
proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.routerrpc.HtlcInfo;
reader.readMessage(value,proto.routerrpc.HtlcInfo.deserializeBinaryFromReader);
msg.setInfo(value);
break;
case 2:
var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum());
msg.setWireFailure(value);
break;
case 3:
var value = /** @type {!proto.routerrpc.FailureDetail} */ (reader.readEnum());
msg.setFailureDetail(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setFailureString(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.LinkFailEvent.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.LinkFailEvent.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.LinkFailEvent} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.LinkFailEvent.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getInfo();
if (f != null) {
writer.writeMessage(
1,
f,
proto.routerrpc.HtlcInfo.serializeBinaryToWriter
);
}
f = message.getWireFailure();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getFailureDetail();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getFailureString();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* optional HtlcInfo info = 1;
* @return {?proto.routerrpc.HtlcInfo}
*/
proto.routerrpc.LinkFailEvent.prototype.getInfo = function() {
return /** @type{?proto.routerrpc.HtlcInfo} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.HtlcInfo, 1));
};
/** @param {?proto.routerrpc.HtlcInfo|undefined} value */
proto.routerrpc.LinkFailEvent.prototype.setInfo = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.routerrpc.LinkFailEvent.prototype.clearInfo = function() {
this.setInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.LinkFailEvent.prototype.hasInfo = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional lnrpc.Failure.FailureCode wire_failure = 2;
* @return {!proto.lnrpc.Failure.FailureCode}
*/
proto.routerrpc.LinkFailEvent.prototype.getWireFailure = function() {
return /** @type {!proto.lnrpc.Failure.FailureCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {!proto.lnrpc.Failure.FailureCode} value */
proto.routerrpc.LinkFailEvent.prototype.setWireFailure = function(value) {
jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional FailureDetail failure_detail = 3;
* @return {!proto.routerrpc.FailureDetail}
*/
proto.routerrpc.LinkFailEvent.prototype.getFailureDetail = function() {
return /** @type {!proto.routerrpc.FailureDetail} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {!proto.routerrpc.FailureDetail} value */
proto.routerrpc.LinkFailEvent.prototype.setFailureDetail = function(value) {
jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional string failure_string = 4;
* @return {string}
*/
proto.routerrpc.LinkFailEvent.prototype.getFailureString = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.routerrpc.LinkFailEvent.prototype.setFailureString = function(value) {
jspb.Message.setProto3StringField(this, 4, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.PaymentStatus = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.PaymentStatus.repeatedFields_, null);
};
goog.inherits(proto.routerrpc.PaymentStatus, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.PaymentStatus.displayName = 'proto.routerrpc.PaymentStatus';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.routerrpc.PaymentStatus.repeatedFields_ = [4];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.PaymentStatus.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.PaymentStatus.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.PaymentStatus} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.PaymentStatus.toObject = function(includeInstance, msg) {
var f, obj = {
state: jspb.Message.getFieldWithDefault(msg, 1, 0),
preimage: msg.getPreimage_asB64(),
htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(),
lndrpc_pb.HTLCAttempt.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.PaymentStatus}
*/
proto.routerrpc.PaymentStatus.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.PaymentStatus;
return proto.routerrpc.PaymentStatus.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.PaymentStatus} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.PaymentStatus}
*/
proto.routerrpc.PaymentStatus.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.routerrpc.PaymentState} */ (reader.readEnum());
msg.setState(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPreimage(value);
break;
case 4:
var value = new lndrpc_pb.HTLCAttempt;
reader.readMessage(value,lndrpc_pb.HTLCAttempt.deserializeBinaryFromReader);
msg.addHtlcs(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.PaymentStatus.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.PaymentStatus.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.PaymentStatus} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.PaymentStatus.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getState();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getPreimage_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getHtlcsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
4,
f,
lndrpc_pb.HTLCAttempt.serializeBinaryToWriter
);
}
};
/**
* optional PaymentState state = 1;
* @return {!proto.routerrpc.PaymentState}
*/
proto.routerrpc.PaymentStatus.prototype.getState = function() {
return /** @type {!proto.routerrpc.PaymentState} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.routerrpc.PaymentState} value */
proto.routerrpc.PaymentStatus.prototype.setState = function(value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional bytes preimage = 2;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.PaymentStatus.prototype.getPreimage = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes preimage = 2;
* This is a type-conversion wrapper around `getPreimage()`
* @return {string}
*/
proto.routerrpc.PaymentStatus.prototype.getPreimage_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPreimage()));
};
/**
* optional bytes preimage = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPreimage()`
* @return {!Uint8Array}
*/
proto.routerrpc.PaymentStatus.prototype.getPreimage_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPreimage()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.PaymentStatus.prototype.setPreimage = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* repeated lnrpc.HTLCAttempt htlcs = 4;
* @return {!Array<!proto.lnrpc.HTLCAttempt>}
*/
proto.routerrpc.PaymentStatus.prototype.getHtlcsList = function() {
return /** @type{!Array<!proto.lnrpc.HTLCAttempt>} */ (
jspb.Message.getRepeatedWrapperField(this, lndrpc_pb.HTLCAttempt, 4));
};
/** @param {!Array<!proto.lnrpc.HTLCAttempt>} value */
proto.routerrpc.PaymentStatus.prototype.setHtlcsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 4, value);
};
/**
* @param {!proto.lnrpc.HTLCAttempt=} opt_value
* @param {number=} opt_index
* @return {!proto.lnrpc.HTLCAttempt}
*/
proto.routerrpc.PaymentStatus.prototype.addHtlcs = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.HTLCAttempt, opt_index);
};
proto.routerrpc.PaymentStatus.prototype.clearHtlcsList = function() {
this.setHtlcsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.CircuitKey = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.CircuitKey, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.CircuitKey.displayName = 'proto.routerrpc.CircuitKey';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.CircuitKey.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.CircuitKey.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.CircuitKey} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.CircuitKey.toObject = function(includeInstance, msg) {
var f, obj = {
chanId: jspb.Message.getFieldWithDefault(msg, 1, 0),
htlcId: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.CircuitKey}
*/
proto.routerrpc.CircuitKey.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.CircuitKey;
return proto.routerrpc.CircuitKey.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.CircuitKey} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.CircuitKey}
*/
proto.routerrpc.CircuitKey.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setChanId(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setHtlcId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.CircuitKey.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.CircuitKey.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.CircuitKey} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.CircuitKey.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getChanId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getHtlcId();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
};
/**
* optional uint64 chan_id = 1;
* @return {number}
*/
proto.routerrpc.CircuitKey.prototype.getChanId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.routerrpc.CircuitKey.prototype.setChanId = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint64 htlc_id = 2;
* @return {number}
*/
proto.routerrpc.CircuitKey.prototype.getHtlcId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.routerrpc.CircuitKey.prototype.setHtlcId = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.ForwardHtlcInterceptRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.ForwardHtlcInterceptRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.ForwardHtlcInterceptRequest.displayName = 'proto.routerrpc.ForwardHtlcInterceptRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.ForwardHtlcInterceptRequest.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.ForwardHtlcInterceptRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.ForwardHtlcInterceptRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardHtlcInterceptRequest.toObject = function(includeInstance, msg) {
var f, obj = {
incomingCircuitKey: (f = msg.getIncomingCircuitKey()) && proto.routerrpc.CircuitKey.toObject(includeInstance, f),
incomingAmountMsat: jspb.Message.getFieldWithDefault(msg, 5, 0),
incomingExpiry: jspb.Message.getFieldWithDefault(msg, 6, 0),
paymentHash: msg.getPaymentHash_asB64(),
outgoingRequestedChanId: jspb.Message.getFieldWithDefault(msg, 7, 0),
outgoingAmountMsat: jspb.Message.getFieldWithDefault(msg, 3, 0),
outgoingExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0),
customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.ForwardHtlcInterceptRequest}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.ForwardHtlcInterceptRequest;
return proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.ForwardHtlcInterceptRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.ForwardHtlcInterceptRequest}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.routerrpc.CircuitKey;
reader.readMessage(value,proto.routerrpc.CircuitKey.deserializeBinaryFromReader);
msg.setIncomingCircuitKey(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64());
msg.setIncomingAmountMsat(value);
break;
case 6:
var value = /** @type {number} */ (reader.readUint32());
msg.setIncomingExpiry(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPaymentHash(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint64());
msg.setOutgoingRequestedChanId(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setOutgoingAmountMsat(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint32());
msg.setOutgoingExpiry(value);
break;
case 8:
var value = msg.getCustomRecordsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0);
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.ForwardHtlcInterceptRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.ForwardHtlcInterceptRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardHtlcInterceptRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIncomingCircuitKey();
if (f != null) {
writer.writeMessage(
1,
f,
proto.routerrpc.CircuitKey.serializeBinaryToWriter
);
}
f = message.getIncomingAmountMsat();
if (f !== 0) {
writer.writeUint64(
5,
f
);
}
f = message.getIncomingExpiry();
if (f !== 0) {
writer.writeUint32(
6,
f
);
}
f = message.getPaymentHash_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getOutgoingRequestedChanId();
if (f !== 0) {
writer.writeUint64(
7,
f
);
}
f = message.getOutgoingAmountMsat();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getOutgoingExpiry();
if (f !== 0) {
writer.writeUint32(
4,
f
);
}
f = message.getCustomRecordsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes);
}
};
/**
* optional CircuitKey incoming_circuit_key = 1;
* @return {?proto.routerrpc.CircuitKey}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingCircuitKey = function() {
return /** @type{?proto.routerrpc.CircuitKey} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.CircuitKey, 1));
};
/** @param {?proto.routerrpc.CircuitKey|undefined} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingCircuitKey = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.clearIncomingCircuitKey = function() {
this.setIncomingCircuitKey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.hasIncomingCircuitKey = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional uint64 incoming_amount_msat = 5;
* @return {number}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingAmountMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingAmountMsat = function(value) {
jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional uint32 incoming_expiry = 6;
* @return {number}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingExpiry = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingExpiry = function(value) {
jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional bytes payment_hash = 2;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes payment_hash = 2;
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {string}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPaymentHash()));
};
/**
* optional bytes payment_hash = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPaymentHash()`
* @return {!Uint8Array}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPaymentHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setPaymentHash = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional uint64 outgoing_requested_chan_id = 7;
* @return {number}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingRequestedChanId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {number} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingRequestedChanId = function(value) {
jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional uint64 outgoing_amount_msat = 3;
* @return {number}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingAmountMsat = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingAmountMsat = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional uint32 outgoing_expiry = 4;
* @return {number}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingExpiry = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingExpiry = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* map<uint64, bytes> custom_records = 8;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<number,!(string|Uint8Array)>}
*/
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getCustomRecordsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<number,!(string|Uint8Array)>} */ (
jspb.Message.getMapField(this, 8, opt_noLazyCreate,
null));
};
proto.routerrpc.ForwardHtlcInterceptRequest.prototype.clearCustomRecordsMap = function() {
this.getCustomRecordsMap().clear();
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.routerrpc.ForwardHtlcInterceptResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerrpc.ForwardHtlcInterceptResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.routerrpc.ForwardHtlcInterceptResponse.displayName = 'proto.routerrpc.ForwardHtlcInterceptResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<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.routerrpc.ForwardHtlcInterceptResponse.prototype.toObject = function(opt_includeInstance) {
return proto.routerrpc.ForwardHtlcInterceptResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.routerrpc.ForwardHtlcInterceptResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardHtlcInterceptResponse.toObject = function(includeInstance, msg) {
var f, obj = {
incomingCircuitKey: (f = msg.getIncomingCircuitKey()) && proto.routerrpc.CircuitKey.toObject(includeInstance, f),
action: jspb.Message.getFieldWithDefault(msg, 2, 0),
preimage: msg.getPreimage_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.routerrpc.ForwardHtlcInterceptResponse}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.routerrpc.ForwardHtlcInterceptResponse;
return proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.routerrpc.ForwardHtlcInterceptResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.routerrpc.ForwardHtlcInterceptResponse}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.routerrpc.CircuitKey;
reader.readMessage(value,proto.routerrpc.CircuitKey.deserializeBinaryFromReader);
msg.setIncomingCircuitKey(value);
break;
case 2:
var value = /** @type {!proto.routerrpc.ResolveHoldForwardAction} */ (reader.readEnum());
msg.setAction(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setPreimage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.routerrpc.ForwardHtlcInterceptResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.routerrpc.ForwardHtlcInterceptResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.routerrpc.ForwardHtlcInterceptResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIncomingCircuitKey();
if (f != null) {
writer.writeMessage(
1,
f,
proto.routerrpc.CircuitKey.serializeBinaryToWriter
);
}
f = message.getAction();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getPreimage_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
};
/**
* optional CircuitKey incoming_circuit_key = 1;
* @return {?proto.routerrpc.CircuitKey}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getIncomingCircuitKey = function() {
return /** @type{?proto.routerrpc.CircuitKey} */ (
jspb.Message.getWrapperField(this, proto.routerrpc.CircuitKey, 1));
};
/** @param {?proto.routerrpc.CircuitKey|undefined} value */
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setIncomingCircuitKey = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.clearIncomingCircuitKey = function() {
this.setIncomingCircuitKey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.hasIncomingCircuitKey = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional ResolveHoldForwardAction action = 2;
* @return {!proto.routerrpc.ResolveHoldForwardAction}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getAction = function() {
return /** @type {!proto.routerrpc.ResolveHoldForwardAction} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {!proto.routerrpc.ResolveHoldForwardAction} value */
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setAction = function(value) {
jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional bytes preimage = 3;
* @return {!(string|Uint8Array)}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes preimage = 3;
* This is a type-conversion wrapper around `getPreimage()`
* @return {string}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getPreimage()));
};
/**
* optional bytes preimage = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getPreimage()`
* @return {!Uint8Array}
*/
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getPreimage()));
};
/** @param {!(string|Uint8Array)} value */
proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setPreimage = function(value) {
jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* @enum {number}
*/
proto.routerrpc.FailureDetail = {
UNKNOWN: 0,
NO_DETAIL: 1,
ONION_DECODE: 2,
LINK_NOT_ELIGIBLE: 3,
ON_CHAIN_TIMEOUT: 4,
HTLC_EXCEEDS_MAX: 5,
INSUFFICIENT_BALANCE: 6,
INCOMPLETE_FORWARD: 7,
HTLC_ADD_FAILED: 8,
FORWARDS_DISABLED: 9,
INVOICE_CANCELED: 10,
INVOICE_UNDERPAID: 11,
INVOICE_EXPIRY_TOO_SOON: 12,
INVOICE_NOT_OPEN: 13,
MPP_INVOICE_TIMEOUT: 14,
ADDRESS_MISMATCH: 15,
SET_TOTAL_MISMATCH: 16,
SET_TOTAL_TOO_LOW: 17,
SET_OVERPAID: 18,
UNKNOWN_INVOICE: 19,
INVALID_KEYSEND: 20,
MPP_IN_PROGRESS: 21,
CIRCULAR_ROUTE: 22
};
/**
* @enum {number}
*/
proto.routerrpc.PaymentState = {
IN_FLIGHT: 0,
SUCCEEDED: 1,
FAILED_TIMEOUT: 2,
FAILED_NO_ROUTE: 3,
FAILED_ERROR: 4,
FAILED_INCORRECT_PAYMENT_DETAILS: 5,
FAILED_INSUFFICIENT_BALANCE: 6
};
/**
* @enum {number}
*/
proto.routerrpc.ResolveHoldForwardAction = {
SETTLE: 0,
FAIL: 1,
RESUME: 2
};
goog.object.extend(exports, proto.routerrpc);