@arcblock/forge-proto
Advanced tools
Comparing version 0.3.4 to 0.4.0
1020
lib/abi_pb.js
@@ -49,3 +49,3 @@ /** | ||
*/ | ||
proto.forge_abi.Request.oneofGroups_ = [[1,2]]; | ||
proto.forge_abi.Request.oneofGroups_ = [[1, 2]]; | ||
@@ -58,3 +58,3 @@ /** | ||
VERIFY_TX: 1, | ||
UPDATE_STATE: 2 | ||
UPDATE_STATE: 2, | ||
}; | ||
@@ -66,46 +66,49 @@ | ||
proto.forge_abi.Request.prototype.getValueCase = function() { | ||
return /** @type {proto.forge_abi.Request.ValueCase} */(jspb.Message.computeOneofCase(this, proto.forge_abi.Request.oneofGroups_[0])); | ||
return /** @type {proto.forge_abi.Request.ValueCase} */ (jspb.Message.computeOneofCase( | ||
this, | ||
proto.forge_abi.Request.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.forge_abi.Request.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.Request.toObject(opt_includeInstance, this); | ||
}; | ||
/** | ||
* 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.forge_abi.Request.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.Request.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.forge_abi.Request} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Request.toObject = function(includeInstance, msg) { | ||
var f, | ||
obj = { | ||
verifyTx: | ||
(f = msg.getVerifyTx()) && proto.forge_abi.RequestVerifyTx.toObject(includeInstance, f), | ||
updateState: | ||
(f = msg.getUpdateState()) && | ||
proto.forge_abi.RequestUpdateState.toObject(includeInstance, f), | ||
}; | ||
/** | ||
* 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.forge_abi.Request} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Request.toObject = function(includeInstance, msg) { | ||
var f, obj = { | ||
verifyTx: (f = msg.getVerifyTx()) && proto.forge_abi.RequestVerifyTx.toObject(includeInstance, f), | ||
updateState: (f = msg.getUpdateState()) && proto.forge_abi.RequestUpdateState.toObject(includeInstance, f) | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
} | ||
/** | ||
@@ -118,7 +121,6 @@ * Deserializes binary data (in protobuf wire format). | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.Request; | ||
var msg = new proto.forge_abi.Request(); | ||
return proto.forge_abi.Request.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
@@ -138,15 +140,15 @@ * Deserializes binary data (in protobuf wire format) from the | ||
switch (field) { | ||
case 1: | ||
var value = new proto.forge_abi.RequestVerifyTx; | ||
reader.readMessage(value,proto.forge_abi.RequestVerifyTx.deserializeBinaryFromReader); | ||
msg.setVerifyTx(value); | ||
break; | ||
case 2: | ||
var value = new proto.forge_abi.RequestUpdateState; | ||
reader.readMessage(value,proto.forge_abi.RequestUpdateState.deserializeBinaryFromReader); | ||
msg.setUpdateState(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
case 1: | ||
var value = new proto.forge_abi.RequestVerifyTx(); | ||
reader.readMessage(value, proto.forge_abi.RequestVerifyTx.deserializeBinaryFromReader); | ||
msg.setVerifyTx(value); | ||
break; | ||
case 2: | ||
var value = new proto.forge_abi.RequestUpdateState(); | ||
reader.readMessage(value, proto.forge_abi.RequestUpdateState.deserializeBinaryFromReader); | ||
msg.setUpdateState(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
@@ -157,3 +159,2 @@ } | ||
/** | ||
@@ -169,3 +170,2 @@ * Serializes the message to binary data (in protobuf wire format). | ||
/** | ||
@@ -182,19 +182,10 @@ * Serializes the given message to binary data (in protobuf wire | ||
if (f != null) { | ||
writer.writeMessage( | ||
1, | ||
f, | ||
proto.forge_abi.RequestVerifyTx.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(1, f, proto.forge_abi.RequestVerifyTx.serializeBinaryToWriter); | ||
} | ||
f = message.getUpdateState(); | ||
if (f != null) { | ||
writer.writeMessage( | ||
2, | ||
f, | ||
proto.forge_abi.RequestUpdateState.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(2, f, proto.forge_abi.RequestUpdateState.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
@@ -205,7 +196,9 @@ * optional RequestVerifyTx verify_tx = 1; | ||
proto.forge_abi.Request.prototype.getVerifyTx = function() { | ||
return /** @type{?proto.forge_abi.RequestVerifyTx} */ ( | ||
jspb.Message.getWrapperField(this, proto.forge_abi.RequestVerifyTx, 1)); | ||
return /** @type{?proto.forge_abi.RequestVerifyTx} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestVerifyTx, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestVerifyTx|undefined} value */ | ||
@@ -216,3 +209,2 @@ proto.forge_abi.Request.prototype.setVerifyTx = function(value) { | ||
proto.forge_abi.Request.prototype.clearVerifyTx = function() { | ||
@@ -222,3 +214,2 @@ this.setVerifyTx(undefined); | ||
/** | ||
@@ -232,3 +223,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -239,7 +229,9 @@ * optional RequestUpdateState update_state = 2; | ||
proto.forge_abi.Request.prototype.getUpdateState = function() { | ||
return /** @type{?proto.forge_abi.RequestUpdateState} */ ( | ||
jspb.Message.getWrapperField(this, proto.forge_abi.RequestUpdateState, 2)); | ||
return /** @type{?proto.forge_abi.RequestUpdateState} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestUpdateState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestUpdateState|undefined} value */ | ||
@@ -250,3 +242,2 @@ proto.forge_abi.Request.prototype.setUpdateState = function(value) { | ||
proto.forge_abi.Request.prototype.clearUpdateState = function() { | ||
@@ -256,3 +247,2 @@ this.setUpdateState(undefined); | ||
/** | ||
@@ -266,4 +256,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -294,3 +282,3 @@ * Generated by JsPbCodeGenerator. | ||
*/ | ||
proto.forge_abi.Response.oneofGroups_ = [[1,2]]; | ||
proto.forge_abi.Response.oneofGroups_ = [[1, 2]]; | ||
@@ -303,3 +291,3 @@ /** | ||
VERIFY_TX: 1, | ||
UPDATE_STATE: 2 | ||
UPDATE_STATE: 2, | ||
}; | ||
@@ -311,46 +299,49 @@ | ||
proto.forge_abi.Response.prototype.getValueCase = function() { | ||
return /** @type {proto.forge_abi.Response.ValueCase} */(jspb.Message.computeOneofCase(this, proto.forge_abi.Response.oneofGroups_[0])); | ||
return /** @type {proto.forge_abi.Response.ValueCase} */ (jspb.Message.computeOneofCase( | ||
this, | ||
proto.forge_abi.Response.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.forge_abi.Response.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.Response.toObject(opt_includeInstance, this); | ||
}; | ||
/** | ||
* 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.forge_abi.Response.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.Response.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.forge_abi.Response} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Response.toObject = function(includeInstance, msg) { | ||
var f, | ||
obj = { | ||
verifyTx: | ||
(f = msg.getVerifyTx()) && proto.forge_abi.ResponseVerifyTx.toObject(includeInstance, f), | ||
updateState: | ||
(f = msg.getUpdateState()) && | ||
proto.forge_abi.ResponseUpdateState.toObject(includeInstance, f), | ||
}; | ||
/** | ||
* 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.forge_abi.Response} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Response.toObject = function(includeInstance, msg) { | ||
var f, obj = { | ||
verifyTx: (f = msg.getVerifyTx()) && proto.forge_abi.ResponseVerifyTx.toObject(includeInstance, f), | ||
updateState: (f = msg.getUpdateState()) && proto.forge_abi.ResponseUpdateState.toObject(includeInstance, f) | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
} | ||
/** | ||
@@ -363,7 +354,6 @@ * Deserializes binary data (in protobuf wire format). | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.Response; | ||
var msg = new proto.forge_abi.Response(); | ||
return proto.forge_abi.Response.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
@@ -383,15 +373,15 @@ * Deserializes binary data (in protobuf wire format) from the | ||
switch (field) { | ||
case 1: | ||
var value = new proto.forge_abi.ResponseVerifyTx; | ||
reader.readMessage(value,proto.forge_abi.ResponseVerifyTx.deserializeBinaryFromReader); | ||
msg.setVerifyTx(value); | ||
break; | ||
case 2: | ||
var value = new proto.forge_abi.ResponseUpdateState; | ||
reader.readMessage(value,proto.forge_abi.ResponseUpdateState.deserializeBinaryFromReader); | ||
msg.setUpdateState(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
case 1: | ||
var value = new proto.forge_abi.ResponseVerifyTx(); | ||
reader.readMessage(value, proto.forge_abi.ResponseVerifyTx.deserializeBinaryFromReader); | ||
msg.setVerifyTx(value); | ||
break; | ||
case 2: | ||
var value = new proto.forge_abi.ResponseUpdateState(); | ||
reader.readMessage(value, proto.forge_abi.ResponseUpdateState.deserializeBinaryFromReader); | ||
msg.setUpdateState(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
@@ -402,3 +392,2 @@ } | ||
/** | ||
@@ -414,3 +403,2 @@ * Serializes the message to binary data (in protobuf wire format). | ||
/** | ||
@@ -427,19 +415,10 @@ * Serializes the given message to binary data (in protobuf wire | ||
if (f != null) { | ||
writer.writeMessage( | ||
1, | ||
f, | ||
proto.forge_abi.ResponseVerifyTx.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(1, f, proto.forge_abi.ResponseVerifyTx.serializeBinaryToWriter); | ||
} | ||
f = message.getUpdateState(); | ||
if (f != null) { | ||
writer.writeMessage( | ||
2, | ||
f, | ||
proto.forge_abi.ResponseUpdateState.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(2, f, proto.forge_abi.ResponseUpdateState.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
@@ -450,7 +429,9 @@ * optional ResponseVerifyTx verify_tx = 1; | ||
proto.forge_abi.Response.prototype.getVerifyTx = function() { | ||
return /** @type{?proto.forge_abi.ResponseVerifyTx} */ ( | ||
jspb.Message.getWrapperField(this, proto.forge_abi.ResponseVerifyTx, 1)); | ||
return /** @type{?proto.forge_abi.ResponseVerifyTx} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseVerifyTx, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseVerifyTx|undefined} value */ | ||
@@ -461,3 +442,2 @@ proto.forge_abi.Response.prototype.setVerifyTx = function(value) { | ||
proto.forge_abi.Response.prototype.clearVerifyTx = function() { | ||
@@ -467,3 +447,2 @@ this.setVerifyTx(undefined); | ||
/** | ||
@@ -477,3 +456,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -484,7 +462,9 @@ * optional ResponseUpdateState update_state = 2; | ||
proto.forge_abi.Response.prototype.getUpdateState = function() { | ||
return /** @type{?proto.forge_abi.ResponseUpdateState} */ ( | ||
jspb.Message.getWrapperField(this, proto.forge_abi.ResponseUpdateState, 2)); | ||
return /** @type{?proto.forge_abi.ResponseUpdateState} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseUpdateState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseUpdateState|undefined} value */ | ||
@@ -495,3 +475,2 @@ proto.forge_abi.Response.prototype.setUpdateState = function(value) { | ||
proto.forge_abi.Response.prototype.clearUpdateState = function() { | ||
@@ -501,3 +480,2 @@ this.setUpdateState(undefined); | ||
/** | ||
@@ -511,4 +489,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -525,3 +501,10 @@ * Generated by JsPbCodeGenerator. | ||
proto.forge_abi.RequestVerifyTx = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, proto.forge_abi.RequestVerifyTx.repeatedFields_, null); | ||
jspb.Message.initialize( | ||
this, | ||
opt_data, | ||
0, | ||
-1, | ||
proto.forge_abi.RequestVerifyTx.repeatedFields_, | ||
null | ||
); | ||
}; | ||
@@ -539,45 +522,45 @@ goog.inherits(proto.forge_abi.RequestVerifyTx, jspb.Message); | ||
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.forge_abi.RequestVerifyTx.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.RequestVerifyTx.toObject(opt_includeInstance, this); | ||
}; | ||
/** | ||
* 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.forge_abi.RequestVerifyTx.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.RequestVerifyTx.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.forge_abi.RequestVerifyTx} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.RequestVerifyTx.toObject = function(includeInstance, msg) { | ||
var f, | ||
obj = { | ||
tx: (f = msg.getTx()) && type_pb.Transaction.toObject(includeInstance, f), | ||
sender: (f = msg.getSender()) && state_pb.AccountState.toObject(includeInstance, f), | ||
statesList: jspb.Message.toObjectList( | ||
msg.getStatesList(), | ||
state_pb.AccountState.toObject, | ||
includeInstance | ||
), | ||
}; | ||
/** | ||
* 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.forge_abi.RequestVerifyTx} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.RequestVerifyTx.toObject = function(includeInstance, msg) { | ||
var f, obj = { | ||
tx: (f = msg.getTx()) && type_pb.Transaction.toObject(includeInstance, f), | ||
sender: (f = msg.getSender()) && state_pb.AccountState.toObject(includeInstance, f), | ||
statesList: jspb.Message.toObjectList(msg.getStatesList(), | ||
state_pb.AccountState.toObject, includeInstance) | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
} | ||
/** | ||
@@ -590,7 +573,6 @@ * Deserializes binary data (in protobuf wire format). | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.RequestVerifyTx; | ||
var msg = new proto.forge_abi.RequestVerifyTx(); | ||
return proto.forge_abi.RequestVerifyTx.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
@@ -610,20 +592,20 @@ * Deserializes binary data (in protobuf wire format) from the | ||
switch (field) { | ||
case 1: | ||
var value = new type_pb.Transaction; | ||
reader.readMessage(value,type_pb.Transaction.deserializeBinaryFromReader); | ||
msg.setTx(value); | ||
break; | ||
case 2: | ||
var value = new state_pb.AccountState; | ||
reader.readMessage(value,state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.setSender(value); | ||
break; | ||
case 3: | ||
var value = new state_pb.AccountState; | ||
reader.readMessage(value,state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.addStates(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
case 1: | ||
var value = new type_pb.Transaction(); | ||
reader.readMessage(value, type_pb.Transaction.deserializeBinaryFromReader); | ||
msg.setTx(value); | ||
break; | ||
case 2: | ||
var value = new state_pb.AccountState(); | ||
reader.readMessage(value, state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.setSender(value); | ||
break; | ||
case 3: | ||
var value = new state_pb.AccountState(); | ||
reader.readMessage(value, state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.addStates(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
@@ -634,3 +616,2 @@ } | ||
/** | ||
@@ -646,3 +627,2 @@ * Serializes the message to binary data (in protobuf wire format). | ||
/** | ||
@@ -659,27 +639,14 @@ * Serializes the given message to binary data (in protobuf wire | ||
if (f != null) { | ||
writer.writeMessage( | ||
1, | ||
f, | ||
type_pb.Transaction.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(1, f, type_pb.Transaction.serializeBinaryToWriter); | ||
} | ||
f = message.getSender(); | ||
if (f != null) { | ||
writer.writeMessage( | ||
2, | ||
f, | ||
state_pb.AccountState.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(2, f, state_pb.AccountState.serializeBinaryToWriter); | ||
} | ||
f = message.getStatesList(); | ||
if (f.length > 0) { | ||
writer.writeRepeatedMessage( | ||
3, | ||
f, | ||
state_pb.AccountState.serializeBinaryToWriter | ||
); | ||
writer.writeRepeatedMessage(3, f, state_pb.AccountState.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
@@ -690,7 +657,9 @@ * optional Transaction tx = 1; | ||
proto.forge_abi.RequestVerifyTx.prototype.getTx = function() { | ||
return /** @type{?proto.forge_abi.Transaction} */ ( | ||
jspb.Message.getWrapperField(this, type_pb.Transaction, 1)); | ||
return /** @type{?proto.forge_abi.Transaction} */ (jspb.Message.getWrapperField( | ||
this, | ||
type_pb.Transaction, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.Transaction|undefined} value */ | ||
@@ -701,3 +670,2 @@ proto.forge_abi.RequestVerifyTx.prototype.setTx = function(value) { | ||
proto.forge_abi.RequestVerifyTx.prototype.clearTx = function() { | ||
@@ -707,3 +675,2 @@ this.setTx(undefined); | ||
/** | ||
@@ -717,3 +684,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -724,7 +690,9 @@ * optional AccountState sender = 2; | ||
proto.forge_abi.RequestVerifyTx.prototype.getSender = function() { | ||
return /** @type{?proto.forge_abi.AccountState} */ ( | ||
jspb.Message.getWrapperField(this, state_pb.AccountState, 2)); | ||
return /** @type{?proto.forge_abi.AccountState} */ (jspb.Message.getWrapperField( | ||
this, | ||
state_pb.AccountState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.AccountState|undefined} value */ | ||
@@ -735,3 +703,2 @@ proto.forge_abi.RequestVerifyTx.prototype.setSender = function(value) { | ||
proto.forge_abi.RequestVerifyTx.prototype.clearSender = function() { | ||
@@ -741,3 +708,2 @@ this.setSender(undefined); | ||
/** | ||
@@ -751,3 +717,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -758,7 +723,9 @@ * repeated AccountState states = 3; | ||
proto.forge_abi.RequestVerifyTx.prototype.getStatesList = function() { | ||
return /** @type{!Array.<!proto.forge_abi.AccountState>} */ ( | ||
jspb.Message.getRepeatedWrapperField(this, state_pb.AccountState, 3)); | ||
return /** @type{!Array.<!proto.forge_abi.AccountState>} */ (jspb.Message.getRepeatedWrapperField( | ||
this, | ||
state_pb.AccountState, | ||
3 | ||
)); | ||
}; | ||
/** @param {!Array.<!proto.forge_abi.AccountState>} value */ | ||
@@ -769,3 +736,2 @@ proto.forge_abi.RequestVerifyTx.prototype.setStatesList = function(value) { | ||
/** | ||
@@ -777,6 +743,11 @@ * @param {!proto.forge_abi.AccountState=} opt_value | ||
proto.forge_abi.RequestVerifyTx.prototype.addStates = function(opt_value, opt_index) { | ||
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.forge_abi.AccountState, opt_index); | ||
return jspb.Message.addToRepeatedWrapperField( | ||
this, | ||
3, | ||
opt_value, | ||
proto.forge_abi.AccountState, | ||
opt_index | ||
); | ||
}; | ||
proto.forge_abi.RequestVerifyTx.prototype.clearStatesList = function() { | ||
@@ -786,4 +757,2 @@ this.setStatesList([]); | ||
/** | ||
@@ -807,41 +776,39 @@ * Generated by JsPbCodeGenerator. | ||
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.forge_abi.ResponseVerifyTx.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.ResponseVerifyTx.toObject(opt_includeInstance, this); | ||
}; | ||
/** | ||
* 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.forge_abi.ResponseVerifyTx.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.ResponseVerifyTx.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.forge_abi.ResponseVerifyTx} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.ResponseVerifyTx.toObject = function(includeInstance, msg) { | ||
var f, | ||
obj = { | ||
code: jspb.Message.getFieldWithDefault(msg, 1, 0), | ||
}; | ||
/** | ||
* 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.forge_abi.ResponseVerifyTx} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.ResponseVerifyTx.toObject = function(includeInstance, msg) { | ||
var f, obj = { | ||
result: jspb.Message.getFieldWithDefault(msg, 1, 0) | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
} | ||
/** | ||
@@ -854,7 +821,6 @@ * Deserializes binary data (in protobuf wire format). | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.ResponseVerifyTx; | ||
var msg = new proto.forge_abi.ResponseVerifyTx(); | ||
return proto.forge_abi.ResponseVerifyTx.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
@@ -874,9 +840,9 @@ * Deserializes binary data (in protobuf wire format) from the | ||
switch (field) { | ||
case 1: | ||
var value = /** @type {!proto.forge_abi.StatusCode} */ (reader.readEnum()); | ||
msg.setResult(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
case 1: | ||
var value = /** @type {!proto.forge_abi.StatusCode} */ (reader.readEnum()); | ||
msg.setCode(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
@@ -887,3 +853,2 @@ } | ||
/** | ||
@@ -899,3 +864,2 @@ * Serializes the message to binary data (in protobuf wire format). | ||
/** | ||
@@ -910,28 +874,21 @@ * Serializes the given message to binary data (in protobuf wire | ||
var f = undefined; | ||
f = message.getResult(); | ||
f = message.getCode(); | ||
if (f !== 0.0) { | ||
writer.writeEnum( | ||
1, | ||
f | ||
); | ||
writer.writeEnum(1, f); | ||
} | ||
}; | ||
/** | ||
* optional StatusCode result = 1; | ||
* optional StatusCode code = 1; | ||
* @return {!proto.forge_abi.StatusCode} | ||
*/ | ||
proto.forge_abi.ResponseVerifyTx.prototype.getResult = function() { | ||
proto.forge_abi.ResponseVerifyTx.prototype.getCode = function() { | ||
return /** @type {!proto.forge_abi.StatusCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); | ||
}; | ||
/** @param {!proto.forge_abi.StatusCode} value */ | ||
proto.forge_abi.ResponseVerifyTx.prototype.setResult = function(value) { | ||
proto.forge_abi.ResponseVerifyTx.prototype.setCode = function(value) { | ||
jspb.Message.setField(this, 1, value); | ||
}; | ||
/** | ||
@@ -948,3 +905,10 @@ * Generated by JsPbCodeGenerator. | ||
proto.forge_abi.RequestUpdateState = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, proto.forge_abi.RequestUpdateState.repeatedFields_, null); | ||
jspb.Message.initialize( | ||
this, | ||
opt_data, | ||
0, | ||
-1, | ||
proto.forge_abi.RequestUpdateState.repeatedFields_, | ||
null | ||
); | ||
}; | ||
@@ -962,45 +926,45 @@ goog.inherits(proto.forge_abi.RequestUpdateState, jspb.Message); | ||
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.forge_abi.RequestUpdateState.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.RequestUpdateState.toObject(opt_includeInstance, this); | ||
}; | ||
/** | ||
* 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.forge_abi.RequestUpdateState.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.RequestUpdateState.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.forge_abi.RequestUpdateState} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.RequestUpdateState.toObject = function(includeInstance, msg) { | ||
var f, | ||
obj = { | ||
tx: (f = msg.getTx()) && type_pb.Transaction.toObject(includeInstance, f), | ||
sender: (f = msg.getSender()) && state_pb.AccountState.toObject(includeInstance, f), | ||
statesList: jspb.Message.toObjectList( | ||
msg.getStatesList(), | ||
state_pb.AccountState.toObject, | ||
includeInstance | ||
), | ||
}; | ||
/** | ||
* 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.forge_abi.RequestUpdateState} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.RequestUpdateState.toObject = function(includeInstance, msg) { | ||
var f, obj = { | ||
tx: (f = msg.getTx()) && type_pb.Transaction.toObject(includeInstance, f), | ||
sender: (f = msg.getSender()) && state_pb.AccountState.toObject(includeInstance, f), | ||
statesList: jspb.Message.toObjectList(msg.getStatesList(), | ||
state_pb.AccountState.toObject, includeInstance) | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
} | ||
/** | ||
@@ -1013,7 +977,6 @@ * Deserializes binary data (in protobuf wire format). | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.RequestUpdateState; | ||
var msg = new proto.forge_abi.RequestUpdateState(); | ||
return proto.forge_abi.RequestUpdateState.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
@@ -1033,20 +996,20 @@ * Deserializes binary data (in protobuf wire format) from the | ||
switch (field) { | ||
case 1: | ||
var value = new type_pb.Transaction; | ||
reader.readMessage(value,type_pb.Transaction.deserializeBinaryFromReader); | ||
msg.setTx(value); | ||
break; | ||
case 2: | ||
var value = new state_pb.AccountState; | ||
reader.readMessage(value,state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.setSender(value); | ||
break; | ||
case 3: | ||
var value = new state_pb.AccountState; | ||
reader.readMessage(value,state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.addStates(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
case 1: | ||
var value = new type_pb.Transaction(); | ||
reader.readMessage(value, type_pb.Transaction.deserializeBinaryFromReader); | ||
msg.setTx(value); | ||
break; | ||
case 2: | ||
var value = new state_pb.AccountState(); | ||
reader.readMessage(value, state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.setSender(value); | ||
break; | ||
case 3: | ||
var value = new state_pb.AccountState(); | ||
reader.readMessage(value, state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.addStates(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
@@ -1057,3 +1020,2 @@ } | ||
/** | ||
@@ -1069,3 +1031,2 @@ * Serializes the message to binary data (in protobuf wire format). | ||
/** | ||
@@ -1082,27 +1043,14 @@ * Serializes the given message to binary data (in protobuf wire | ||
if (f != null) { | ||
writer.writeMessage( | ||
1, | ||
f, | ||
type_pb.Transaction.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(1, f, type_pb.Transaction.serializeBinaryToWriter); | ||
} | ||
f = message.getSender(); | ||
if (f != null) { | ||
writer.writeMessage( | ||
2, | ||
f, | ||
state_pb.AccountState.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(2, f, state_pb.AccountState.serializeBinaryToWriter); | ||
} | ||
f = message.getStatesList(); | ||
if (f.length > 0) { | ||
writer.writeRepeatedMessage( | ||
3, | ||
f, | ||
state_pb.AccountState.serializeBinaryToWriter | ||
); | ||
writer.writeRepeatedMessage(3, f, state_pb.AccountState.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
@@ -1113,7 +1061,9 @@ * optional Transaction tx = 1; | ||
proto.forge_abi.RequestUpdateState.prototype.getTx = function() { | ||
return /** @type{?proto.forge_abi.Transaction} */ ( | ||
jspb.Message.getWrapperField(this, type_pb.Transaction, 1)); | ||
return /** @type{?proto.forge_abi.Transaction} */ (jspb.Message.getWrapperField( | ||
this, | ||
type_pb.Transaction, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.Transaction|undefined} value */ | ||
@@ -1124,3 +1074,2 @@ proto.forge_abi.RequestUpdateState.prototype.setTx = function(value) { | ||
proto.forge_abi.RequestUpdateState.prototype.clearTx = function() { | ||
@@ -1130,3 +1079,2 @@ this.setTx(undefined); | ||
/** | ||
@@ -1140,3 +1088,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -1147,7 +1094,9 @@ * optional AccountState sender = 2; | ||
proto.forge_abi.RequestUpdateState.prototype.getSender = function() { | ||
return /** @type{?proto.forge_abi.AccountState} */ ( | ||
jspb.Message.getWrapperField(this, state_pb.AccountState, 2)); | ||
return /** @type{?proto.forge_abi.AccountState} */ (jspb.Message.getWrapperField( | ||
this, | ||
state_pb.AccountState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.AccountState|undefined} value */ | ||
@@ -1158,3 +1107,2 @@ proto.forge_abi.RequestUpdateState.prototype.setSender = function(value) { | ||
proto.forge_abi.RequestUpdateState.prototype.clearSender = function() { | ||
@@ -1164,3 +1112,2 @@ this.setSender(undefined); | ||
/** | ||
@@ -1174,3 +1121,2 @@ * Returns whether this field is set. | ||
/** | ||
@@ -1181,7 +1127,9 @@ * repeated AccountState states = 3; | ||
proto.forge_abi.RequestUpdateState.prototype.getStatesList = function() { | ||
return /** @type{!Array.<!proto.forge_abi.AccountState>} */ ( | ||
jspb.Message.getRepeatedWrapperField(this, state_pb.AccountState, 3)); | ||
return /** @type{!Array.<!proto.forge_abi.AccountState>} */ (jspb.Message.getRepeatedWrapperField( | ||
this, | ||
state_pb.AccountState, | ||
3 | ||
)); | ||
}; | ||
/** @param {!Array.<!proto.forge_abi.AccountState>} value */ | ||
@@ -1192,3 +1140,2 @@ proto.forge_abi.RequestUpdateState.prototype.setStatesList = function(value) { | ||
/** | ||
@@ -1200,6 +1147,11 @@ * @param {!proto.forge_abi.AccountState=} opt_value | ||
proto.forge_abi.RequestUpdateState.prototype.addStates = function(opt_value, opt_index) { | ||
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.forge_abi.AccountState, opt_index); | ||
return jspb.Message.addToRepeatedWrapperField( | ||
this, | ||
3, | ||
opt_value, | ||
proto.forge_abi.AccountState, | ||
opt_index | ||
); | ||
}; | ||
proto.forge_abi.RequestUpdateState.prototype.clearStatesList = function() { | ||
@@ -1209,4 +1161,2 @@ this.setStatesList([]); | ||
/** | ||
@@ -1223,3 +1173,10 @@ * Generated by JsPbCodeGenerator. | ||
proto.forge_abi.ResponseUpdateState = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, proto.forge_abi.ResponseUpdateState.repeatedFields_, null); | ||
jspb.Message.initialize( | ||
this, | ||
opt_data, | ||
0, | ||
-1, | ||
proto.forge_abi.ResponseUpdateState.repeatedFields_, | ||
null | ||
); | ||
}; | ||
@@ -1235,51 +1192,57 @@ goog.inherits(proto.forge_abi.ResponseUpdateState, jspb.Message); | ||
*/ | ||
proto.forge_abi.ResponseUpdateState.repeatedFields_ = [2,3,4]; | ||
proto.forge_abi.ResponseUpdateState.repeatedFields_ = [2, 3, 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.forge_abi.ResponseUpdateState.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.ResponseUpdateState.toObject(opt_includeInstance, this); | ||
}; | ||
/** | ||
* 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.forge_abi.ResponseUpdateState.prototype.toObject = function(opt_includeInstance) { | ||
return proto.forge_abi.ResponseUpdateState.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.forge_abi.ResponseUpdateState} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.ResponseUpdateState.toObject = function(includeInstance, msg) { | ||
var f, | ||
obj = { | ||
code: jspb.Message.getFieldWithDefault(msg, 1, 0), | ||
statesList: jspb.Message.toObjectList( | ||
msg.getStatesList(), | ||
state_pb.AccountState.toObject, | ||
includeInstance | ||
), | ||
channelsList: jspb.Message.toObjectList( | ||
msg.getChannelsList(), | ||
state_pb.ChannelState.toObject, | ||
includeInstance | ||
), | ||
assetsList: jspb.Message.toObjectList( | ||
msg.getAssetsList(), | ||
state_pb.AssetState.toObject, | ||
includeInstance | ||
), | ||
appState: (f = msg.getAppState()) && state_pb.ForgeState.toObject(includeInstance, f), | ||
}; | ||
/** | ||
* 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.forge_abi.ResponseUpdateState} msg The msg instance to transform. | ||
* @return {!Object} | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.ResponseUpdateState.toObject = function(includeInstance, msg) { | ||
var f, obj = { | ||
code: jspb.Message.getFieldWithDefault(msg, 1, 0), | ||
statesList: jspb.Message.toObjectList(msg.getStatesList(), | ||
state_pb.AccountState.toObject, includeInstance), | ||
channelsList: jspb.Message.toObjectList(msg.getChannelsList(), | ||
state_pb.ChannelState.toObject, includeInstance), | ||
assetsList: jspb.Message.toObjectList(msg.getAssetsList(), | ||
state_pb.AssetState.toObject, includeInstance), | ||
appState: (f = msg.getAppState()) && state_pb.ForgeState.toObject(includeInstance, f) | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
if (includeInstance) { | ||
obj.$jspbMessageInstance = msg; | ||
} | ||
return obj; | ||
}; | ||
} | ||
/** | ||
@@ -1292,7 +1255,6 @@ * Deserializes binary data (in protobuf wire format). | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.ResponseUpdateState; | ||
var msg = new proto.forge_abi.ResponseUpdateState(); | ||
return proto.forge_abi.ResponseUpdateState.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
@@ -1312,29 +1274,29 @@ * Deserializes binary data (in protobuf wire format) from the | ||
switch (field) { | ||
case 1: | ||
var value = /** @type {!proto.forge_abi.StatusCode} */ (reader.readEnum()); | ||
msg.setCode(value); | ||
break; | ||
case 2: | ||
var value = new state_pb.AccountState; | ||
reader.readMessage(value,state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.addStates(value); | ||
break; | ||
case 3: | ||
var value = new state_pb.ChannelState; | ||
reader.readMessage(value,state_pb.ChannelState.deserializeBinaryFromReader); | ||
msg.addChannels(value); | ||
break; | ||
case 4: | ||
var value = new state_pb.AssetState; | ||
reader.readMessage(value,state_pb.AssetState.deserializeBinaryFromReader); | ||
msg.addAssets(value); | ||
break; | ||
case 5: | ||
var value = new state_pb.ForgeState; | ||
reader.readMessage(value,state_pb.ForgeState.deserializeBinaryFromReader); | ||
msg.setAppState(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
case 1: | ||
var value = /** @type {!proto.forge_abi.StatusCode} */ (reader.readEnum()); | ||
msg.setCode(value); | ||
break; | ||
case 2: | ||
var value = new state_pb.AccountState(); | ||
reader.readMessage(value, state_pb.AccountState.deserializeBinaryFromReader); | ||
msg.addStates(value); | ||
break; | ||
case 3: | ||
var value = new state_pb.ChannelState(); | ||
reader.readMessage(value, state_pb.ChannelState.deserializeBinaryFromReader); | ||
msg.addChannels(value); | ||
break; | ||
case 4: | ||
var value = new state_pb.AssetState(); | ||
reader.readMessage(value, state_pb.AssetState.deserializeBinaryFromReader); | ||
msg.addAssets(value); | ||
break; | ||
case 5: | ||
var value = new state_pb.ForgeState(); | ||
reader.readMessage(value, state_pb.ForgeState.deserializeBinaryFromReader); | ||
msg.setAppState(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
@@ -1345,3 +1307,2 @@ } | ||
/** | ||
@@ -1357,3 +1318,2 @@ * Serializes the message to binary data (in protobuf wire format). | ||
/** | ||
@@ -1370,42 +1330,22 @@ * Serializes the given message to binary data (in protobuf wire | ||
if (f !== 0.0) { | ||
writer.writeEnum( | ||
1, | ||
f | ||
); | ||
writer.writeEnum(1, f); | ||
} | ||
f = message.getStatesList(); | ||
if (f.length > 0) { | ||
writer.writeRepeatedMessage( | ||
2, | ||
f, | ||
state_pb.AccountState.serializeBinaryToWriter | ||
); | ||
writer.writeRepeatedMessage(2, f, state_pb.AccountState.serializeBinaryToWriter); | ||
} | ||
f = message.getChannelsList(); | ||
if (f.length > 0) { | ||
writer.writeRepeatedMessage( | ||
3, | ||
f, | ||
state_pb.ChannelState.serializeBinaryToWriter | ||
); | ||
writer.writeRepeatedMessage(3, f, state_pb.ChannelState.serializeBinaryToWriter); | ||
} | ||
f = message.getAssetsList(); | ||
if (f.length > 0) { | ||
writer.writeRepeatedMessage( | ||
4, | ||
f, | ||
state_pb.AssetState.serializeBinaryToWriter | ||
); | ||
writer.writeRepeatedMessage(4, f, state_pb.AssetState.serializeBinaryToWriter); | ||
} | ||
f = message.getAppState(); | ||
if (f != null) { | ||
writer.writeMessage( | ||
5, | ||
f, | ||
state_pb.ForgeState.serializeBinaryToWriter | ||
); | ||
writer.writeMessage(5, f, state_pb.ForgeState.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
@@ -1419,3 +1359,2 @@ * optional StatusCode code = 1; | ||
/** @param {!proto.forge_abi.StatusCode} value */ | ||
@@ -1426,3 +1365,2 @@ proto.forge_abi.ResponseUpdateState.prototype.setCode = function(value) { | ||
/** | ||
@@ -1433,7 +1371,9 @@ * repeated AccountState states = 2; | ||
proto.forge_abi.ResponseUpdateState.prototype.getStatesList = function() { | ||
return /** @type{!Array.<!proto.forge_abi.AccountState>} */ ( | ||
jspb.Message.getRepeatedWrapperField(this, state_pb.AccountState, 2)); | ||
return /** @type{!Array.<!proto.forge_abi.AccountState>} */ (jspb.Message.getRepeatedWrapperField( | ||
this, | ||
state_pb.AccountState, | ||
2 | ||
)); | ||
}; | ||
/** @param {!Array.<!proto.forge_abi.AccountState>} value */ | ||
@@ -1444,3 +1384,2 @@ proto.forge_abi.ResponseUpdateState.prototype.setStatesList = function(value) { | ||
/** | ||
@@ -1452,6 +1391,11 @@ * @param {!proto.forge_abi.AccountState=} opt_value | ||
proto.forge_abi.ResponseUpdateState.prototype.addStates = function(opt_value, opt_index) { | ||
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.forge_abi.AccountState, opt_index); | ||
return jspb.Message.addToRepeatedWrapperField( | ||
this, | ||
2, | ||
opt_value, | ||
proto.forge_abi.AccountState, | ||
opt_index | ||
); | ||
}; | ||
proto.forge_abi.ResponseUpdateState.prototype.clearStatesList = function() { | ||
@@ -1461,3 +1405,2 @@ this.setStatesList([]); | ||
/** | ||
@@ -1468,7 +1411,9 @@ * repeated ChannelState channels = 3; | ||
proto.forge_abi.ResponseUpdateState.prototype.getChannelsList = function() { | ||
return /** @type{!Array.<!proto.forge_abi.ChannelState>} */ ( | ||
jspb.Message.getRepeatedWrapperField(this, state_pb.ChannelState, 3)); | ||
return /** @type{!Array.<!proto.forge_abi.ChannelState>} */ (jspb.Message.getRepeatedWrapperField( | ||
this, | ||
state_pb.ChannelState, | ||
3 | ||
)); | ||
}; | ||
/** @param {!Array.<!proto.forge_abi.ChannelState>} value */ | ||
@@ -1479,3 +1424,2 @@ proto.forge_abi.ResponseUpdateState.prototype.setChannelsList = function(value) { | ||
/** | ||
@@ -1487,6 +1431,11 @@ * @param {!proto.forge_abi.ChannelState=} opt_value | ||
proto.forge_abi.ResponseUpdateState.prototype.addChannels = function(opt_value, opt_index) { | ||
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.forge_abi.ChannelState, opt_index); | ||
return jspb.Message.addToRepeatedWrapperField( | ||
this, | ||
3, | ||
opt_value, | ||
proto.forge_abi.ChannelState, | ||
opt_index | ||
); | ||
}; | ||
proto.forge_abi.ResponseUpdateState.prototype.clearChannelsList = function() { | ||
@@ -1496,3 +1445,2 @@ this.setChannelsList([]); | ||
/** | ||
@@ -1503,7 +1451,9 @@ * repeated AssetState assets = 4; | ||
proto.forge_abi.ResponseUpdateState.prototype.getAssetsList = function() { | ||
return /** @type{!Array.<!proto.forge_abi.AssetState>} */ ( | ||
jspb.Message.getRepeatedWrapperField(this, state_pb.AssetState, 4)); | ||
return /** @type{!Array.<!proto.forge_abi.AssetState>} */ (jspb.Message.getRepeatedWrapperField( | ||
this, | ||
state_pb.AssetState, | ||
4 | ||
)); | ||
}; | ||
/** @param {!Array.<!proto.forge_abi.AssetState>} value */ | ||
@@ -1514,3 +1464,2 @@ proto.forge_abi.ResponseUpdateState.prototype.setAssetsList = function(value) { | ||
/** | ||
@@ -1522,6 +1471,11 @@ * @param {!proto.forge_abi.AssetState=} opt_value | ||
proto.forge_abi.ResponseUpdateState.prototype.addAssets = function(opt_value, opt_index) { | ||
return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.forge_abi.AssetState, opt_index); | ||
return jspb.Message.addToRepeatedWrapperField( | ||
this, | ||
4, | ||
opt_value, | ||
proto.forge_abi.AssetState, | ||
opt_index | ||
); | ||
}; | ||
proto.forge_abi.ResponseUpdateState.prototype.clearAssetsList = function() { | ||
@@ -1531,3 +1485,2 @@ this.setAssetsList([]); | ||
/** | ||
@@ -1538,7 +1491,9 @@ * optional ForgeState app_state = 5; | ||
proto.forge_abi.ResponseUpdateState.prototype.getAppState = function() { | ||
return /** @type{?proto.forge_abi.ForgeState} */ ( | ||
jspb.Message.getWrapperField(this, state_pb.ForgeState, 5)); | ||
return /** @type{?proto.forge_abi.ForgeState} */ (jspb.Message.getWrapperField( | ||
this, | ||
state_pb.ForgeState, | ||
5 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ForgeState|undefined} value */ | ||
@@ -1549,3 +1504,2 @@ proto.forge_abi.ResponseUpdateState.prototype.setAppState = function(value) { | ||
proto.forge_abi.ResponseUpdateState.prototype.clearAppState = function() { | ||
@@ -1555,3 +1509,2 @@ this.setAppState(undefined); | ||
/** | ||
@@ -1565,5 +1518,4 @@ * Returns whether this field is set. | ||
goog.object.extend(exports, proto.forge_abi); | ||
module.exports = proto.forge_abi; |
@@ -42,2 +42,3 @@ /** | ||
CHANNEL_IS_FULL: 28, | ||
REVOKED_TX: 29, | ||
INTERNAL: 500, | ||
@@ -44,0 +45,0 @@ }; |
@@ -58,3 +58,3 @@ { | ||
"fields": { | ||
"result": { | ||
"code": { | ||
"type": "StatusCode", | ||
@@ -148,2 +148,3 @@ "id": 1 | ||
"channel_is_full": 28, | ||
"revoked_tx": 29, | ||
"internal": 500 | ||
@@ -579,2 +580,6 @@ } | ||
}, | ||
"numAssets": { | ||
"type": "uint64", | ||
"id": 16 | ||
}, | ||
"data": { | ||
@@ -581,0 +586,0 @@ "type": "google.protobuf.Any", |
@@ -100,2 +100,3 @@ /** | ||
power: jspb.Message.getFieldWithDefault(msg, 15, 0), | ||
numAssets: jspb.Message.getFieldWithDefault(msg, 16, 0), | ||
data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), | ||
@@ -206,2 +207,6 @@ }; | ||
break; | ||
case 16: | ||
var value = /** @type {number} */ (reader.readUint64()); | ||
msg.setNumAssets(value); | ||
break; | ||
case 50: | ||
@@ -299,2 +304,6 @@ var value = new google_protobuf_any_pb.Any(); | ||
} | ||
f = message.getNumAssets(); | ||
if (f !== 0) { | ||
writer.writeUint64(16, f); | ||
} | ||
f = message.getData(); | ||
@@ -598,2 +607,15 @@ if (f != null) { | ||
/** | ||
* optional uint64 num_assets = 16; | ||
* @return {number} | ||
*/ | ||
proto.forge_abi.AccountState.prototype.getNumAssets = function() { | ||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); | ||
}; | ||
/** @param {number} value */ | ||
proto.forge_abi.AccountState.prototype.setNumAssets = function(value) { | ||
jspb.Message.setField(this, 16, value); | ||
}; | ||
/** | ||
* optional google.protobuf.Any data = 50; | ||
@@ -600,0 +622,0 @@ * @return {?proto.google.protobuf.Any} |
{ | ||
"name": "@arcblock/forge-proto", | ||
"description": "Static modules generated from forge-sdk protobuf files", | ||
"version": "0.3.4", | ||
"version": "0.4.0", | ||
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)", | ||
@@ -45,3 +45,3 @@ "bugs": { | ||
"test": "npm run lint && node tools/jest.js", | ||
"coverage": "npm run lint && npm run test -- --coverage" | ||
"coverage": "npm run lint && npm run test -- --coverage --collectCoverageFrom=index.js --collectCoverageFrom=!lib/*.js" | ||
}, | ||
@@ -51,3 +51,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "35c0d3a39cb63081ac89fd6ff32a3632a6332b24" | ||
"gitHead": "e27d2c72ba377a550d551f1678cf276d3c2c7450" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
944863
27114