update protobuf definitions (#2)

This commit is contained in:
woodser 2021-05-09 08:14:25 -04:00 committed by GitHub
parent 4dd6fab818
commit b73b84f864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 333 additions and 1 deletions

View File

@ -586,6 +586,7 @@ message BalancesInfo {
// balancesInfo.getBtcBalanceInfo().getAvailableBalance().
BsqBalanceInfo bsq = 1;
BtcBalanceInfo btc = 2;
XmrBalanceInfo xmr = 3;
}
message BsqBalanceInfo {
@ -604,6 +605,14 @@ message BtcBalanceInfo {
uint64 lockedBalance = 4;
}
message XmrBalanceInfo {
uint64 balance = 1;
uint64 availableBalance = 2;
uint64 lockedBalance = 3;
uint64 reservedBalance = 4;
uint64 totalBalance = 5; // balance + reserved
}
message AddressBalanceInfo {
string address = 1;
int64 balance = 2;

View File

@ -106,6 +106,7 @@ goog.exportSymbol('proto.io.bisq.protobuffer.VerifyBsqSentToAddressReply', null,
goog.exportSymbol('proto.io.bisq.protobuffer.VerifyBsqSentToAddressRequest', null, global);
goog.exportSymbol('proto.io.bisq.protobuffer.WithdrawFundsReply', null, global);
goog.exportSymbol('proto.io.bisq.protobuffer.WithdrawFundsRequest', null, global);
goog.exportSymbol('proto.io.bisq.protobuffer.XmrBalanceInfo', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -1912,6 +1913,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.io.bisq.protobuffer.BtcBalanceInfo.displayName = 'proto.io.bisq.protobuffer.BtcBalanceInfo';
}
/**
* 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.io.bisq.protobuffer.XmrBalanceInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.io.bisq.protobuffer.XmrBalanceInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.displayName = 'proto.io.bisq.protobuffer.XmrBalanceInfo';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -15759,7 +15781,8 @@ proto.io.bisq.protobuffer.BalancesInfo.prototype.toObject = function(opt_include
proto.io.bisq.protobuffer.BalancesInfo.toObject = function(includeInstance, msg) {
var f, obj = {
bsq: (f = msg.getBsq()) && proto.io.bisq.protobuffer.BsqBalanceInfo.toObject(includeInstance, f),
btc: (f = msg.getBtc()) && proto.io.bisq.protobuffer.BtcBalanceInfo.toObject(includeInstance, f)
btc: (f = msg.getBtc()) && proto.io.bisq.protobuffer.BtcBalanceInfo.toObject(includeInstance, f),
xmr: (f = msg.getXmr()) && proto.io.bisq.protobuffer.XmrBalanceInfo.toObject(includeInstance, f)
};
if (includeInstance) {
@ -15806,6 +15829,11 @@ proto.io.bisq.protobuffer.BalancesInfo.deserializeBinaryFromReader = function(ms
reader.readMessage(value,proto.io.bisq.protobuffer.BtcBalanceInfo.deserializeBinaryFromReader);
msg.setBtc(value);
break;
case 3:
var value = new proto.io.bisq.protobuffer.XmrBalanceInfo;
reader.readMessage(value,proto.io.bisq.protobuffer.XmrBalanceInfo.deserializeBinaryFromReader);
msg.setXmr(value);
break;
default:
reader.skipField();
break;
@ -15851,6 +15879,14 @@ proto.io.bisq.protobuffer.BalancesInfo.serializeBinaryToWriter = function(messag
proto.io.bisq.protobuffer.BtcBalanceInfo.serializeBinaryToWriter
);
}
f = message.getXmr();
if (f != null) {
writer.writeMessage(
3,
f,
proto.io.bisq.protobuffer.XmrBalanceInfo.serializeBinaryToWriter
);
}
};
@ -15928,6 +15964,43 @@ proto.io.bisq.protobuffer.BalancesInfo.prototype.hasBtc = function() {
};
/**
* optional XmrBalanceInfo xmr = 3;
* @return {?proto.io.bisq.protobuffer.XmrBalanceInfo}
*/
proto.io.bisq.protobuffer.BalancesInfo.prototype.getXmr = function() {
return /** @type{?proto.io.bisq.protobuffer.XmrBalanceInfo} */ (
jspb.Message.getWrapperField(this, proto.io.bisq.protobuffer.XmrBalanceInfo, 3));
};
/**
* @param {?proto.io.bisq.protobuffer.XmrBalanceInfo|undefined} value
* @return {!proto.io.bisq.protobuffer.BalancesInfo} returns this
*/
proto.io.bisq.protobuffer.BalancesInfo.prototype.setXmr = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.io.bisq.protobuffer.BalancesInfo} returns this
*/
proto.io.bisq.protobuffer.BalancesInfo.prototype.clearXmr = function() {
return this.setXmr(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.io.bisq.protobuffer.BalancesInfo.prototype.hasXmr = function() {
return jspb.Message.getField(this, 3) != null;
};
@ -16431,6 +16504,256 @@ proto.io.bisq.protobuffer.BtcBalanceInfo.prototype.setLockedbalance = function(v
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.toObject = function(opt_includeInstance) {
return proto.io.bisq.protobuffer.XmrBalanceInfo.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.io.bisq.protobuffer.XmrBalanceInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.toObject = function(includeInstance, msg) {
var f, obj = {
balance: jspb.Message.getFieldWithDefault(msg, 1, 0),
availablebalance: jspb.Message.getFieldWithDefault(msg, 2, 0),
lockedbalance: jspb.Message.getFieldWithDefault(msg, 3, 0),
reservedbalance: jspb.Message.getFieldWithDefault(msg, 4, 0),
totalbalance: jspb.Message.getFieldWithDefault(msg, 5, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.io.bisq.protobuffer.XmrBalanceInfo;
return proto.io.bisq.protobuffer.XmrBalanceInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.io.bisq.protobuffer.XmrBalanceInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.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.setBalance(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setAvailablebalance(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setLockedbalance(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setReservedbalance(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64());
msg.setTotalbalance(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.io.bisq.protobuffer.XmrBalanceInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.io.bisq.protobuffer.XmrBalanceInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getBalance();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getAvailablebalance();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getLockedbalance();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getReservedbalance();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
f = message.getTotalbalance();
if (f !== 0) {
writer.writeUint64(
5,
f
);
}
};
/**
* optional uint64 balance = 1;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getBalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setBalance = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint64 availableBalance = 2;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getAvailablebalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setAvailablebalance = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 lockedBalance = 3;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getLockedbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setLockedbalance = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional uint64 reservedBalance = 4;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getReservedbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setReservedbalance = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional uint64 totalBalance = 5;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getTotalbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setTotalbalance = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.