@arcblock/forge-proto
Advanced tools
Comparing version 0.6.7 to 0.6.9
@@ -10,2 +10,4 @@ const fs = require('fs'); | ||
const stakeTypePattern = /^StakeFor/i; | ||
const requestTypePattern = /^Request/i; | ||
const responseTypePattern = /^Response/i; | ||
const lowerUnder = x => decamelize(x).toLowerCase(); | ||
@@ -72,3 +74,5 @@ | ||
const transactions = Object.keys(types).filter(x => txTypePattern.test(x)); | ||
const transactions = Object.keys(types).filter( | ||
x => txTypePattern.test(x) && !requestTypePattern.test(x) && !responseTypePattern.test(x) | ||
); | ||
const stakes = Object.keys(types).filter(x => stakeTypePattern.test(x)); | ||
@@ -88,3 +92,3 @@ | ||
let typeUrl = type; | ||
if (!/^Request/.test(type) && !/^Response/.test(type)) { | ||
if (!requestTypePattern.test(type) && !responseTypePattern.test(type)) { | ||
if (txTypePattern.test(type)) { | ||
@@ -91,0 +95,0 @@ typeUrl = `fg:t:${lowerUnder(type.replace(txTypePattern, ''))}`; |
@@ -6,3 +6,3 @@ // GENERATED CODE -- DO NOT EDIT! | ||
var abi_pb = require('./abi_pb.js'); | ||
var code_pb = require('./code_pb.js'); | ||
var enum_pb = require('./enum_pb.js'); | ||
var type_pb = require('./type_pb.js'); | ||
@@ -33,4 +33,2 @@ var state_pb = require('./state_pb.js'); | ||
// ABI for forge application | ||
// | ||
var ForgeAppRpcService = (exports.ForgeAppRpcService = { | ||
@@ -37,0 +35,0 @@ process_one: { |
1030
lib/abi_pb.js
@@ -14,3 +14,3 @@ /** | ||
var code_pb = require('./code_pb.js'); | ||
var enum_pb = require('./enum_pb.js'); | ||
var type_pb = require('./type_pb.js'); | ||
@@ -37,516 +37,2 @@ var state_pb = require('./state_pb.js'); | ||
*/ | ||
proto.forge_abi.Request = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.forge_abi.Request.oneofGroups_); | ||
}; | ||
goog.inherits(proto.forge_abi.Request, jspb.Message); | ||
if (goog.DEBUG && !COMPILED) { | ||
proto.forge_abi.Request.displayName = 'proto.forge_abi.Request'; | ||
} | ||
/** | ||
* 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.forge_abi.Request.oneofGroups_ = [[1, 2, 3]]; | ||
/** | ||
* @enum {number} | ||
*/ | ||
proto.forge_abi.Request.ValueCase = { | ||
VALUE_NOT_SET: 0, | ||
VERIFY_TX: 1, | ||
UPDATE_STATE: 2, | ||
INFO: 3, | ||
}; | ||
/** | ||
* @return {proto.forge_abi.Request.ValueCase} | ||
*/ | ||
proto.forge_abi.Request.prototype.getValueCase = function() { | ||
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); | ||
}; | ||
/** | ||
* 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), | ||
info: (f = msg.getInfo()) && proto.forge_abi.RequestInfo.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.forge_abi.Request} | ||
*/ | ||
proto.forge_abi.Request.deserializeBinary = function(bytes) { | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.Request(); | ||
return proto.forge_abi.Request.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
* Deserializes binary data (in protobuf wire format) from the | ||
* given reader into the given message object. | ||
* @param {!proto.forge_abi.Request} msg The message object to deserialize into. | ||
* @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
* @return {!proto.forge_abi.Request} | ||
*/ | ||
proto.forge_abi.Request.deserializeBinaryFromReader = function(msg, reader) { | ||
while (reader.nextField()) { | ||
if (reader.isEndGroup()) { | ||
break; | ||
} | ||
var field = reader.getFieldNumber(); | ||
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; | ||
case 3: | ||
var value = new proto.forge_abi.RequestInfo(); | ||
reader.readMessage(value, proto.forge_abi.RequestInfo.deserializeBinaryFromReader); | ||
msg.setInfo(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
} | ||
return msg; | ||
}; | ||
/** | ||
* Serializes the message to binary data (in protobuf wire format). | ||
* @return {!Uint8Array} | ||
*/ | ||
proto.forge_abi.Request.prototype.serializeBinary = function() { | ||
var writer = new jspb.BinaryWriter(); | ||
proto.forge_abi.Request.serializeBinaryToWriter(this, writer); | ||
return writer.getResultBuffer(); | ||
}; | ||
/** | ||
* Serializes the given message to binary data (in protobuf wire | ||
* format), writing to the given BinaryWriter. | ||
* @param {!proto.forge_abi.Request} message | ||
* @param {!jspb.BinaryWriter} writer | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Request.serializeBinaryToWriter = function(message, writer) { | ||
var f = undefined; | ||
f = message.getVerifyTx(); | ||
if (f != null) { | ||
writer.writeMessage(1, f, proto.forge_abi.RequestVerifyTx.serializeBinaryToWriter); | ||
} | ||
f = message.getUpdateState(); | ||
if (f != null) { | ||
writer.writeMessage(2, f, proto.forge_abi.RequestUpdateState.serializeBinaryToWriter); | ||
} | ||
f = message.getInfo(); | ||
if (f != null) { | ||
writer.writeMessage(3, f, proto.forge_abi.RequestInfo.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
* optional RequestVerifyTx verify_tx = 1; | ||
* @return {?proto.forge_abi.RequestVerifyTx} | ||
*/ | ||
proto.forge_abi.Request.prototype.getVerifyTx = function() { | ||
return /** @type{?proto.forge_abi.RequestVerifyTx} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestVerifyTx, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestVerifyTx|undefined} value */ | ||
proto.forge_abi.Request.prototype.setVerifyTx = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 1, proto.forge_abi.Request.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Request.prototype.clearVerifyTx = function() { | ||
this.setVerifyTx(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Request.prototype.hasVerifyTx = function() { | ||
return jspb.Message.getField(this, 1) != null; | ||
}; | ||
/** | ||
* optional RequestUpdateState update_state = 2; | ||
* @return {?proto.forge_abi.RequestUpdateState} | ||
*/ | ||
proto.forge_abi.Request.prototype.getUpdateState = function() { | ||
return /** @type{?proto.forge_abi.RequestUpdateState} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestUpdateState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestUpdateState|undefined} value */ | ||
proto.forge_abi.Request.prototype.setUpdateState = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 2, proto.forge_abi.Request.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Request.prototype.clearUpdateState = function() { | ||
this.setUpdateState(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Request.prototype.hasUpdateState = function() { | ||
return jspb.Message.getField(this, 2) != null; | ||
}; | ||
/** | ||
* optional RequestInfo info = 3; | ||
* @return {?proto.forge_abi.RequestInfo} | ||
*/ | ||
proto.forge_abi.Request.prototype.getInfo = function() { | ||
return /** @type{?proto.forge_abi.RequestInfo} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestInfo, | ||
3 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestInfo|undefined} value */ | ||
proto.forge_abi.Request.prototype.setInfo = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 3, proto.forge_abi.Request.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Request.prototype.clearInfo = function() { | ||
this.setInfo(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Request.prototype.hasInfo = function() { | ||
return jspb.Message.getField(this, 3) != 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.forge_abi.Response = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.forge_abi.Response.oneofGroups_); | ||
}; | ||
goog.inherits(proto.forge_abi.Response, jspb.Message); | ||
if (goog.DEBUG && !COMPILED) { | ||
proto.forge_abi.Response.displayName = 'proto.forge_abi.Response'; | ||
} | ||
/** | ||
* 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.forge_abi.Response.oneofGroups_ = [[1, 2, 3]]; | ||
/** | ||
* @enum {number} | ||
*/ | ||
proto.forge_abi.Response.ValueCase = { | ||
VALUE_NOT_SET: 0, | ||
VERIFY_TX: 1, | ||
UPDATE_STATE: 2, | ||
INFO: 3, | ||
}; | ||
/** | ||
* @return {proto.forge_abi.Response.ValueCase} | ||
*/ | ||
proto.forge_abi.Response.prototype.getValueCase = function() { | ||
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); | ||
}; | ||
/** | ||
* 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), | ||
info: (f = msg.getInfo()) && proto.forge_abi.ResponseInfo.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.forge_abi.Response} | ||
*/ | ||
proto.forge_abi.Response.deserializeBinary = function(bytes) { | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.Response(); | ||
return proto.forge_abi.Response.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
* Deserializes binary data (in protobuf wire format) from the | ||
* given reader into the given message object. | ||
* @param {!proto.forge_abi.Response} msg The message object to deserialize into. | ||
* @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
* @return {!proto.forge_abi.Response} | ||
*/ | ||
proto.forge_abi.Response.deserializeBinaryFromReader = function(msg, reader) { | ||
while (reader.nextField()) { | ||
if (reader.isEndGroup()) { | ||
break; | ||
} | ||
var field = reader.getFieldNumber(); | ||
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; | ||
case 3: | ||
var value = new proto.forge_abi.ResponseInfo(); | ||
reader.readMessage(value, proto.forge_abi.ResponseInfo.deserializeBinaryFromReader); | ||
msg.setInfo(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
} | ||
return msg; | ||
}; | ||
/** | ||
* Serializes the message to binary data (in protobuf wire format). | ||
* @return {!Uint8Array} | ||
*/ | ||
proto.forge_abi.Response.prototype.serializeBinary = function() { | ||
var writer = new jspb.BinaryWriter(); | ||
proto.forge_abi.Response.serializeBinaryToWriter(this, writer); | ||
return writer.getResultBuffer(); | ||
}; | ||
/** | ||
* Serializes the given message to binary data (in protobuf wire | ||
* format), writing to the given BinaryWriter. | ||
* @param {!proto.forge_abi.Response} message | ||
* @param {!jspb.BinaryWriter} writer | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Response.serializeBinaryToWriter = function(message, writer) { | ||
var f = undefined; | ||
f = message.getVerifyTx(); | ||
if (f != null) { | ||
writer.writeMessage(1, f, proto.forge_abi.ResponseVerifyTx.serializeBinaryToWriter); | ||
} | ||
f = message.getUpdateState(); | ||
if (f != null) { | ||
writer.writeMessage(2, f, proto.forge_abi.ResponseUpdateState.serializeBinaryToWriter); | ||
} | ||
f = message.getInfo(); | ||
if (f != null) { | ||
writer.writeMessage(3, f, proto.forge_abi.ResponseInfo.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
* optional ResponseVerifyTx verify_tx = 1; | ||
* @return {?proto.forge_abi.ResponseVerifyTx} | ||
*/ | ||
proto.forge_abi.Response.prototype.getVerifyTx = function() { | ||
return /** @type{?proto.forge_abi.ResponseVerifyTx} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseVerifyTx, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseVerifyTx|undefined} value */ | ||
proto.forge_abi.Response.prototype.setVerifyTx = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 1, proto.forge_abi.Response.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Response.prototype.clearVerifyTx = function() { | ||
this.setVerifyTx(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Response.prototype.hasVerifyTx = function() { | ||
return jspb.Message.getField(this, 1) != null; | ||
}; | ||
/** | ||
* optional ResponseUpdateState update_state = 2; | ||
* @return {?proto.forge_abi.ResponseUpdateState} | ||
*/ | ||
proto.forge_abi.Response.prototype.getUpdateState = function() { | ||
return /** @type{?proto.forge_abi.ResponseUpdateState} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseUpdateState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseUpdateState|undefined} value */ | ||
proto.forge_abi.Response.prototype.setUpdateState = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 2, proto.forge_abi.Response.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Response.prototype.clearUpdateState = function() { | ||
this.setUpdateState(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Response.prototype.hasUpdateState = function() { | ||
return jspb.Message.getField(this, 2) != null; | ||
}; | ||
/** | ||
* optional ResponseInfo info = 3; | ||
* @return {?proto.forge_abi.ResponseInfo} | ||
*/ | ||
proto.forge_abi.Response.prototype.getInfo = function() { | ||
return /** @type{?proto.forge_abi.ResponseInfo} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseInfo, | ||
3 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseInfo|undefined} value */ | ||
proto.forge_abi.Response.prototype.setInfo = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 3, proto.forge_abi.Response.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Response.prototype.clearInfo = function() { | ||
this.setInfo(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Response.prototype.hasInfo = function() { | ||
return jspb.Message.getField(this, 3) != 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.forge_abi.RequestVerifyTx = function(opt_data) { | ||
@@ -1787,4 +1273,518 @@ jspb.Message.initialize( | ||
/** | ||
* 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.forge_abi.Request = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.forge_abi.Request.oneofGroups_); | ||
}; | ||
goog.inherits(proto.forge_abi.Request, jspb.Message); | ||
if (goog.DEBUG && !COMPILED) { | ||
proto.forge_abi.Request.displayName = 'proto.forge_abi.Request'; | ||
} | ||
/** | ||
* 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.forge_abi.Request.oneofGroups_ = [[1, 2, 3]]; | ||
/** | ||
* @enum {number} | ||
*/ | ||
proto.forge_abi.Request.ValueCase = { | ||
VALUE_NOT_SET: 0, | ||
VERIFY_TX: 1, | ||
UPDATE_STATE: 2, | ||
INFO: 3, | ||
}; | ||
/** | ||
* @return {proto.forge_abi.Request.ValueCase} | ||
*/ | ||
proto.forge_abi.Request.prototype.getValueCase = function() { | ||
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); | ||
}; | ||
/** | ||
* 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), | ||
info: (f = msg.getInfo()) && proto.forge_abi.RequestInfo.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.forge_abi.Request} | ||
*/ | ||
proto.forge_abi.Request.deserializeBinary = function(bytes) { | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.Request(); | ||
return proto.forge_abi.Request.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
* Deserializes binary data (in protobuf wire format) from the | ||
* given reader into the given message object. | ||
* @param {!proto.forge_abi.Request} msg The message object to deserialize into. | ||
* @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
* @return {!proto.forge_abi.Request} | ||
*/ | ||
proto.forge_abi.Request.deserializeBinaryFromReader = function(msg, reader) { | ||
while (reader.nextField()) { | ||
if (reader.isEndGroup()) { | ||
break; | ||
} | ||
var field = reader.getFieldNumber(); | ||
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; | ||
case 3: | ||
var value = new proto.forge_abi.RequestInfo(); | ||
reader.readMessage(value, proto.forge_abi.RequestInfo.deserializeBinaryFromReader); | ||
msg.setInfo(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
} | ||
return msg; | ||
}; | ||
/** | ||
* Serializes the message to binary data (in protobuf wire format). | ||
* @return {!Uint8Array} | ||
*/ | ||
proto.forge_abi.Request.prototype.serializeBinary = function() { | ||
var writer = new jspb.BinaryWriter(); | ||
proto.forge_abi.Request.serializeBinaryToWriter(this, writer); | ||
return writer.getResultBuffer(); | ||
}; | ||
/** | ||
* Serializes the given message to binary data (in protobuf wire | ||
* format), writing to the given BinaryWriter. | ||
* @param {!proto.forge_abi.Request} message | ||
* @param {!jspb.BinaryWriter} writer | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Request.serializeBinaryToWriter = function(message, writer) { | ||
var f = undefined; | ||
f = message.getVerifyTx(); | ||
if (f != null) { | ||
writer.writeMessage(1, f, proto.forge_abi.RequestVerifyTx.serializeBinaryToWriter); | ||
} | ||
f = message.getUpdateState(); | ||
if (f != null) { | ||
writer.writeMessage(2, f, proto.forge_abi.RequestUpdateState.serializeBinaryToWriter); | ||
} | ||
f = message.getInfo(); | ||
if (f != null) { | ||
writer.writeMessage(3, f, proto.forge_abi.RequestInfo.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
* optional RequestVerifyTx verify_tx = 1; | ||
* @return {?proto.forge_abi.RequestVerifyTx} | ||
*/ | ||
proto.forge_abi.Request.prototype.getVerifyTx = function() { | ||
return /** @type{?proto.forge_abi.RequestVerifyTx} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestVerifyTx, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestVerifyTx|undefined} value */ | ||
proto.forge_abi.Request.prototype.setVerifyTx = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 1, proto.forge_abi.Request.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Request.prototype.clearVerifyTx = function() { | ||
this.setVerifyTx(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Request.prototype.hasVerifyTx = function() { | ||
return jspb.Message.getField(this, 1) != null; | ||
}; | ||
/** | ||
* optional RequestUpdateState update_state = 2; | ||
* @return {?proto.forge_abi.RequestUpdateState} | ||
*/ | ||
proto.forge_abi.Request.prototype.getUpdateState = function() { | ||
return /** @type{?proto.forge_abi.RequestUpdateState} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestUpdateState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestUpdateState|undefined} value */ | ||
proto.forge_abi.Request.prototype.setUpdateState = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 2, proto.forge_abi.Request.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Request.prototype.clearUpdateState = function() { | ||
this.setUpdateState(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Request.prototype.hasUpdateState = function() { | ||
return jspb.Message.getField(this, 2) != null; | ||
}; | ||
/** | ||
* optional RequestInfo info = 3; | ||
* @return {?proto.forge_abi.RequestInfo} | ||
*/ | ||
proto.forge_abi.Request.prototype.getInfo = function() { | ||
return /** @type{?proto.forge_abi.RequestInfo} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.RequestInfo, | ||
3 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.RequestInfo|undefined} value */ | ||
proto.forge_abi.Request.prototype.setInfo = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 3, proto.forge_abi.Request.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Request.prototype.clearInfo = function() { | ||
this.setInfo(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Request.prototype.hasInfo = function() { | ||
return jspb.Message.getField(this, 3) != 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.forge_abi.Response = function(opt_data) { | ||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.forge_abi.Response.oneofGroups_); | ||
}; | ||
goog.inherits(proto.forge_abi.Response, jspb.Message); | ||
if (goog.DEBUG && !COMPILED) { | ||
proto.forge_abi.Response.displayName = 'proto.forge_abi.Response'; | ||
} | ||
/** | ||
* 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.forge_abi.Response.oneofGroups_ = [[1, 2, 3]]; | ||
/** | ||
* @enum {number} | ||
*/ | ||
proto.forge_abi.Response.ValueCase = { | ||
VALUE_NOT_SET: 0, | ||
VERIFY_TX: 1, | ||
UPDATE_STATE: 2, | ||
INFO: 3, | ||
}; | ||
/** | ||
* @return {proto.forge_abi.Response.ValueCase} | ||
*/ | ||
proto.forge_abi.Response.prototype.getValueCase = function() { | ||
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); | ||
}; | ||
/** | ||
* 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), | ||
info: (f = msg.getInfo()) && proto.forge_abi.ResponseInfo.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.forge_abi.Response} | ||
*/ | ||
proto.forge_abi.Response.deserializeBinary = function(bytes) { | ||
var reader = new jspb.BinaryReader(bytes); | ||
var msg = new proto.forge_abi.Response(); | ||
return proto.forge_abi.Response.deserializeBinaryFromReader(msg, reader); | ||
}; | ||
/** | ||
* Deserializes binary data (in protobuf wire format) from the | ||
* given reader into the given message object. | ||
* @param {!proto.forge_abi.Response} msg The message object to deserialize into. | ||
* @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
* @return {!proto.forge_abi.Response} | ||
*/ | ||
proto.forge_abi.Response.deserializeBinaryFromReader = function(msg, reader) { | ||
while (reader.nextField()) { | ||
if (reader.isEndGroup()) { | ||
break; | ||
} | ||
var field = reader.getFieldNumber(); | ||
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; | ||
case 3: | ||
var value = new proto.forge_abi.ResponseInfo(); | ||
reader.readMessage(value, proto.forge_abi.ResponseInfo.deserializeBinaryFromReader); | ||
msg.setInfo(value); | ||
break; | ||
default: | ||
reader.skipField(); | ||
break; | ||
} | ||
} | ||
return msg; | ||
}; | ||
/** | ||
* Serializes the message to binary data (in protobuf wire format). | ||
* @return {!Uint8Array} | ||
*/ | ||
proto.forge_abi.Response.prototype.serializeBinary = function() { | ||
var writer = new jspb.BinaryWriter(); | ||
proto.forge_abi.Response.serializeBinaryToWriter(this, writer); | ||
return writer.getResultBuffer(); | ||
}; | ||
/** | ||
* Serializes the given message to binary data (in protobuf wire | ||
* format), writing to the given BinaryWriter. | ||
* @param {!proto.forge_abi.Response} message | ||
* @param {!jspb.BinaryWriter} writer | ||
* @suppress {unusedLocalVariables} f is only used for nested messages | ||
*/ | ||
proto.forge_abi.Response.serializeBinaryToWriter = function(message, writer) { | ||
var f = undefined; | ||
f = message.getVerifyTx(); | ||
if (f != null) { | ||
writer.writeMessage(1, f, proto.forge_abi.ResponseVerifyTx.serializeBinaryToWriter); | ||
} | ||
f = message.getUpdateState(); | ||
if (f != null) { | ||
writer.writeMessage(2, f, proto.forge_abi.ResponseUpdateState.serializeBinaryToWriter); | ||
} | ||
f = message.getInfo(); | ||
if (f != null) { | ||
writer.writeMessage(3, f, proto.forge_abi.ResponseInfo.serializeBinaryToWriter); | ||
} | ||
}; | ||
/** | ||
* optional ResponseVerifyTx verify_tx = 1; | ||
* @return {?proto.forge_abi.ResponseVerifyTx} | ||
*/ | ||
proto.forge_abi.Response.prototype.getVerifyTx = function() { | ||
return /** @type{?proto.forge_abi.ResponseVerifyTx} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseVerifyTx, | ||
1 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseVerifyTx|undefined} value */ | ||
proto.forge_abi.Response.prototype.setVerifyTx = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 1, proto.forge_abi.Response.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Response.prototype.clearVerifyTx = function() { | ||
this.setVerifyTx(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Response.prototype.hasVerifyTx = function() { | ||
return jspb.Message.getField(this, 1) != null; | ||
}; | ||
/** | ||
* optional ResponseUpdateState update_state = 2; | ||
* @return {?proto.forge_abi.ResponseUpdateState} | ||
*/ | ||
proto.forge_abi.Response.prototype.getUpdateState = function() { | ||
return /** @type{?proto.forge_abi.ResponseUpdateState} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseUpdateState, | ||
2 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseUpdateState|undefined} value */ | ||
proto.forge_abi.Response.prototype.setUpdateState = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 2, proto.forge_abi.Response.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Response.prototype.clearUpdateState = function() { | ||
this.setUpdateState(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Response.prototype.hasUpdateState = function() { | ||
return jspb.Message.getField(this, 2) != null; | ||
}; | ||
/** | ||
* optional ResponseInfo info = 3; | ||
* @return {?proto.forge_abi.ResponseInfo} | ||
*/ | ||
proto.forge_abi.Response.prototype.getInfo = function() { | ||
return /** @type{?proto.forge_abi.ResponseInfo} */ (jspb.Message.getWrapperField( | ||
this, | ||
proto.forge_abi.ResponseInfo, | ||
3 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.ResponseInfo|undefined} value */ | ||
proto.forge_abi.Response.prototype.setInfo = function(value) { | ||
jspb.Message.setOneofWrapperField(this, 3, proto.forge_abi.Response.oneofGroups_[0], value); | ||
}; | ||
proto.forge_abi.Response.prototype.clearInfo = function() { | ||
this.setInfo(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.Response.prototype.hasInfo = function() { | ||
return jspb.Message.getField(this, 3) != null; | ||
}; | ||
goog.object.extend(exports, proto.forge_abi); | ||
module.exports = proto.forge_abi; |
{ | ||
"name": "@arcblock/forge-proto", | ||
"description": "Static modules generated from forge-sdk protobuf files", | ||
"version": "0.6.7", | ||
"version": "0.6.9", | ||
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=0.10.0", | ||
"forge": ">=0.11.1" | ||
}, | ||
@@ -54,3 +55,3 @@ "bugs": { | ||
}, | ||
"gitHead": "54a4c28e3c2c745d67d36bcd4c862e8e3fdeafc5" | ||
"gitHead": "1e81efe35c34e0eac03756620e19c92d7dfe6bc2" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1150874
32762
16