@injectivelabs/exchange-api
Version:
Injective Exchange API client with generated gRPC bindings.
2,717 lines • 80.7 kB
JavaScript
// source: injective_exchange_rpc.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
goog.exportSymbol('proto.injective_exchange_rpc.BroadcastTxRequest', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.BroadcastTxResponse', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.CosmosCoin', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.CosmosPubKey', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.CosmosTxFee', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.GetTxRequest', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.GetTxResponse', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.PrepareTxRequest', null, global);
goog.exportSymbol('proto.injective_exchange_rpc.PrepareTxResponse', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.injective_exchange_rpc.GetTxRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.injective_exchange_rpc.GetTxRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.GetTxRequest.displayName = 'proto.injective_exchange_rpc.GetTxRequest';
}
/**
* 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.injective_exchange_rpc.GetTxResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.injective_exchange_rpc.GetTxResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.GetTxResponse.displayName = 'proto.injective_exchange_rpc.GetTxResponse';
}
/**
* 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.injective_exchange_rpc.PrepareTxRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.injective_exchange_rpc.PrepareTxRequest.repeatedFields_, null);
};
goog.inherits(proto.injective_exchange_rpc.PrepareTxRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.PrepareTxRequest.displayName = 'proto.injective_exchange_rpc.PrepareTxRequest';
}
/**
* 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.injective_exchange_rpc.CosmosTxFee = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.injective_exchange_rpc.CosmosTxFee.repeatedFields_, null);
};
goog.inherits(proto.injective_exchange_rpc.CosmosTxFee, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.CosmosTxFee.displayName = 'proto.injective_exchange_rpc.CosmosTxFee';
}
/**
* 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.injective_exchange_rpc.CosmosCoin = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.injective_exchange_rpc.CosmosCoin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.CosmosCoin.displayName = 'proto.injective_exchange_rpc.CosmosCoin';
}
/**
* 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.injective_exchange_rpc.PrepareTxResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.injective_exchange_rpc.PrepareTxResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.PrepareTxResponse.displayName = 'proto.injective_exchange_rpc.PrepareTxResponse';
}
/**
* 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.injective_exchange_rpc.BroadcastTxRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.injective_exchange_rpc.BroadcastTxRequest.repeatedFields_, null);
};
goog.inherits(proto.injective_exchange_rpc.BroadcastTxRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.BroadcastTxRequest.displayName = 'proto.injective_exchange_rpc.BroadcastTxRequest';
}
/**
* 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.injective_exchange_rpc.CosmosPubKey = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.injective_exchange_rpc.CosmosPubKey, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.CosmosPubKey.displayName = 'proto.injective_exchange_rpc.CosmosPubKey';
}
/**
* 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.injective_exchange_rpc.BroadcastTxResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.injective_exchange_rpc.BroadcastTxResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.injective_exchange_rpc.BroadcastTxResponse.displayName = 'proto.injective_exchange_rpc.BroadcastTxResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.GetTxRequest.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.GetTxRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.GetTxRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.GetTxRequest.toObject = function(includeInstance, msg) {
var f, obj = {
hash: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.GetTxRequest}
*/
proto.injective_exchange_rpc.GetTxRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.GetTxRequest;
return proto.injective_exchange_rpc.GetTxRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.GetTxRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.GetTxRequest}
*/
proto.injective_exchange_rpc.GetTxRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setHash(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.GetTxRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.GetTxRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.GetTxRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.GetTxRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHash();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string hash = 1;
* @return {string}
*/
proto.injective_exchange_rpc.GetTxRequest.prototype.getHash = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.GetTxRequest} returns this
*/
proto.injective_exchange_rpc.GetTxRequest.prototype.setHash = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.GetTxResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.GetTxResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.GetTxResponse.toObject = function(includeInstance, msg) {
var f, obj = {
txHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
height: jspb.Message.getFieldWithDefault(msg, 2, 0),
index: jspb.Message.getFieldWithDefault(msg, 3, 0),
codespace: jspb.Message.getFieldWithDefault(msg, 4, ""),
code: jspb.Message.getFieldWithDefault(msg, 5, 0),
data: msg.getData_asB64(),
rawLog: jspb.Message.getFieldWithDefault(msg, 7, ""),
timestamp: jspb.Message.getFieldWithDefault(msg, 8, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.GetTxResponse}
*/
proto.injective_exchange_rpc.GetTxResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.GetTxResponse;
return proto.injective_exchange_rpc.GetTxResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.GetTxResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.GetTxResponse}
*/
proto.injective_exchange_rpc.GetTxResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setTxHash(value);
break;
case 2:
var value = /** @type {number} */ (reader.readSint64());
msg.setHeight(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint32());
msg.setIndex(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setCodespace(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint32());
msg.setCode(value);
break;
case 6:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setRawLog(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.GetTxResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.GetTxResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.GetTxResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTxHash();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getHeight();
if (f !== 0) {
writer.writeSint64(
2,
f
);
}
f = message.getIndex();
if (f !== 0) {
writer.writeUint32(
3,
f
);
}
f = message.getCodespace();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getCode();
if (f !== 0) {
writer.writeUint32(
5,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
6,
f
);
}
f = message.getRawLog();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getTimestamp();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
};
/**
* optional string tx_hash = 1;
* @return {string}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getTxHash = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setTxHash = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional sint64 height = 2;
* @return {number}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getHeight = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setHeight = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint32 index = 3;
* @return {number}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getIndex = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setIndex = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional string codespace = 4;
* @return {string}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getCodespace = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setCodespace = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional uint32 code = 5;
* @return {number}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getCode = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setCode = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional bytes data = 6;
* @return {!(string|Uint8Array)}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* optional bytes data = 6;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 6;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setData = function(value) {
return jspb.Message.setProto3BytesField(this, 6, value);
};
/**
* optional string raw_log = 7;
* @return {string}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getRawLog = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setRawLog = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string timestamp = 8;
* @return {string}
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.getTimestamp = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.GetTxResponse} returns this
*/
proto.injective_exchange_rpc.GetTxResponse.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.injective_exchange_rpc.PrepareTxRequest.repeatedFields_ = [7];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.PrepareTxRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.PrepareTxRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.PrepareTxRequest.toObject = function(includeInstance, msg) {
var f, obj = {
chainId: jspb.Message.getFieldWithDefault(msg, 1, 0),
signerAddress: jspb.Message.getFieldWithDefault(msg, 2, ""),
sequence: jspb.Message.getFieldWithDefault(msg, 3, 0),
memo: jspb.Message.getFieldWithDefault(msg, 4, ""),
timeoutHeight: jspb.Message.getFieldWithDefault(msg, 5, 0),
fee: (f = msg.getFee()) && proto.injective_exchange_rpc.CosmosTxFee.toObject(includeInstance, f),
msgsList: msg.getMsgsList_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.PrepareTxRequest}
*/
proto.injective_exchange_rpc.PrepareTxRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.PrepareTxRequest;
return proto.injective_exchange_rpc.PrepareTxRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.PrepareTxRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.PrepareTxRequest}
*/
proto.injective_exchange_rpc.PrepareTxRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setChainId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSignerAddress(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setSequence(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setMemo(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimeoutHeight(value);
break;
case 6:
var value = new proto.injective_exchange_rpc.CosmosTxFee;
reader.readMessage(value,proto.injective_exchange_rpc.CosmosTxFee.deserializeBinaryFromReader);
msg.setFee(value);
break;
case 7:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.addMsgs(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.PrepareTxRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.PrepareTxRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.PrepareTxRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getChainId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getSignerAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getMemo();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getTimeoutHeight();
if (f !== 0) {
writer.writeUint64(
5,
f
);
}
f = message.getFee();
if (f != null) {
writer.writeMessage(
6,
f,
proto.injective_exchange_rpc.CosmosTxFee.serializeBinaryToWriter
);
}
f = message.getMsgsList_asU8();
if (f.length > 0) {
writer.writeRepeatedBytes(
7,
f
);
}
};
/**
* optional uint64 chain_id = 1;
* @return {number}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getChainId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setChainId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string signer_address = 2;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getSignerAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setSignerAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 sequence = 3;
* @return {number}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional string memo = 4;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getMemo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setMemo = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional uint64 timeout_height = 5;
* @return {number}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getTimeoutHeight = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setTimeoutHeight = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional CosmosTxFee fee = 6;
* @return {?proto.injective_exchange_rpc.CosmosTxFee}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getFee = function() {
return /** @type{?proto.injective_exchange_rpc.CosmosTxFee} */ (
jspb.Message.getWrapperField(this, proto.injective_exchange_rpc.CosmosTxFee, 6));
};
/**
* @param {?proto.injective_exchange_rpc.CosmosTxFee|undefined} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setFee = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.clearFee = function() {
return this.setFee(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.hasFee = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* repeated bytes msgs = 7;
* @return {!(Array<!Uint8Array>|Array<string>)}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getMsgsList = function() {
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 7));
};
/**
* repeated bytes msgs = 7;
* This is a type-conversion wrapper around `getMsgsList()`
* @return {!Array<string>}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getMsgsList_asB64 = function() {
return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(
this.getMsgsList()));
};
/**
* repeated bytes msgs = 7;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getMsgsList()`
* @return {!Array<!Uint8Array>}
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.getMsgsList_asU8 = function() {
return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
this.getMsgsList()));
};
/**
* @param {!(Array<!Uint8Array>|Array<string>)} value
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.setMsgsList = function(value) {
return jspb.Message.setField(this, 7, value || []);
};
/**
* @param {!(string|Uint8Array)} value
* @param {number=} opt_index
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.addMsgs = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 7, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.injective_exchange_rpc.PrepareTxRequest} returns this
*/
proto.injective_exchange_rpc.PrepareTxRequest.prototype.clearMsgsList = function() {
return this.setMsgsList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.injective_exchange_rpc.CosmosTxFee.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.CosmosTxFee.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.CosmosTxFee} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.CosmosTxFee.toObject = function(includeInstance, msg) {
var f, obj = {
priceList: jspb.Message.toObjectList(msg.getPriceList(),
proto.injective_exchange_rpc.CosmosCoin.toObject, includeInstance),
gas: jspb.Message.getFieldWithDefault(msg, 2, 0),
delegateFee: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.CosmosTxFee}
*/
proto.injective_exchange_rpc.CosmosTxFee.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.CosmosTxFee;
return proto.injective_exchange_rpc.CosmosTxFee.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.CosmosTxFee} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.CosmosTxFee}
*/
proto.injective_exchange_rpc.CosmosTxFee.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.injective_exchange_rpc.CosmosCoin;
reader.readMessage(value,proto.injective_exchange_rpc.CosmosCoin.deserializeBinaryFromReader);
msg.addPrice(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setGas(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDelegateFee(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.CosmosTxFee.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.CosmosTxFee} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.CosmosTxFee.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPriceList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.injective_exchange_rpc.CosmosCoin.serializeBinaryToWriter
);
}
f = message.getGas();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getDelegateFee();
if (f) {
writer.writeBool(
3,
f
);
}
};
/**
* repeated CosmosCoin price = 1;
* @return {!Array<!proto.injective_exchange_rpc.CosmosCoin>}
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.getPriceList = function() {
return /** @type{!Array<!proto.injective_exchange_rpc.CosmosCoin>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.injective_exchange_rpc.CosmosCoin, 1));
};
/**
* @param {!Array<!proto.injective_exchange_rpc.CosmosCoin>} value
* @return {!proto.injective_exchange_rpc.CosmosTxFee} returns this
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.setPriceList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.injective_exchange_rpc.CosmosCoin=} opt_value
* @param {number=} opt_index
* @return {!proto.injective_exchange_rpc.CosmosCoin}
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.addPrice = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.injective_exchange_rpc.CosmosCoin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.injective_exchange_rpc.CosmosTxFee} returns this
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.clearPriceList = function() {
return this.setPriceList([]);
};
/**
* optional uint64 gas = 2;
* @return {number}
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.getGas = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.CosmosTxFee} returns this
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.setGas = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional bool delegate_fee = 3;
* @return {boolean}
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.getDelegateFee = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/**
* @param {boolean} value
* @return {!proto.injective_exchange_rpc.CosmosTxFee} returns this
*/
proto.injective_exchange_rpc.CosmosTxFee.prototype.setDelegateFee = function(value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.CosmosCoin.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.CosmosCoin.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.CosmosCoin} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.CosmosCoin.toObject = function(includeInstance, msg) {
var f, obj = {
denom: jspb.Message.getFieldWithDefault(msg, 1, ""),
amount: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.CosmosCoin}
*/
proto.injective_exchange_rpc.CosmosCoin.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.CosmosCoin;
return proto.injective_exchange_rpc.CosmosCoin.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.CosmosCoin} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.CosmosCoin}
*/
proto.injective_exchange_rpc.CosmosCoin.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setDenom(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAmount(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.CosmosCoin.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.CosmosCoin.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.CosmosCoin} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.CosmosCoin.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDenom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAmount();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string denom = 1;
* @return {string}
*/
proto.injective_exchange_rpc.CosmosCoin.prototype.getDenom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.CosmosCoin} returns this
*/
proto.injective_exchange_rpc.CosmosCoin.prototype.setDenom = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string amount = 2;
* @return {string}
*/
proto.injective_exchange_rpc.CosmosCoin.prototype.getAmount = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.CosmosCoin} returns this
*/
proto.injective_exchange_rpc.CosmosCoin.prototype.setAmount = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.PrepareTxResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.PrepareTxResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.PrepareTxResponse.toObject = function(includeInstance, msg) {
var f, obj = {
data: jspb.Message.getFieldWithDefault(msg, 1, ""),
sequence: jspb.Message.getFieldWithDefault(msg, 2, 0),
signMode: jspb.Message.getFieldWithDefault(msg, 3, ""),
pubKeyType: jspb.Message.getFieldWithDefault(msg, 4, ""),
feePayer: jspb.Message.getFieldWithDefault(msg, 5, ""),
feePayerSig: jspb.Message.getFieldWithDefault(msg, 6, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.PrepareTxResponse}
*/
proto.injective_exchange_rpc.PrepareTxResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.PrepareTxResponse;
return proto.injective_exchange_rpc.PrepareTxResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.PrepareTxResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.PrepareTxResponse}
*/
proto.injective_exchange_rpc.PrepareTxResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setData(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setSequence(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSignMode(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPubKeyType(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setFeePayer(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setFeePayerSig(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.PrepareTxResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.PrepareTxResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.PrepareTxResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getData();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getSignMode();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPubKeyType();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getFeePayer();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getFeePayerSig();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
};
/**
* optional string data = 1;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.getData = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxResponse} returns this
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.setData = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional uint64 sequence = 2;
* @return {number}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.PrepareTxResponse} returns this
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional string sign_mode = 3;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.getSignMode = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxResponse} returns this
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.setSignMode = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string pub_key_type = 4;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.getPubKeyType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxResponse} returns this
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.setPubKeyType = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string fee_payer = 5;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.getFeePayer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxResponse} returns this
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.setFeePayer = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string fee_payer_sig = 6;
* @return {string}
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.getFeePayerSig = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.PrepareTxResponse} returns this
*/
proto.injective_exchange_rpc.PrepareTxResponse.prototype.setFeePayerSig = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.injective_exchange_rpc.BroadcastTxRequest.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.BroadcastTxRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.BroadcastTxRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.BroadcastTxRequest.toObject = function(includeInstance, msg) {
var f, obj = {
chainId: jspb.Message.getFieldWithDefault(msg, 1, 0),
tx: msg.getTx_asB64(),
msgsList: msg.getMsgsList_asB64(),
pubKey: (f = msg.getPubKey()) && proto.injective_exchange_rpc.CosmosPubKey.toObject(includeInstance, f),
signature: jspb.Message.getFieldWithDefault(msg, 5, ""),
feePayer: jspb.Message.getFieldWithDefault(msg, 6, ""),
feePayerSig: jspb.Message.getFieldWithDefault(msg, 7, ""),
mode: jspb.Message.getFieldWithDefault(msg, 8, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.BroadcastTxRequest;
return proto.injective_exchange_rpc.BroadcastTxRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.BroadcastTxRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setChainId(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setTx(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.addMsgs(value);
break;
case 4:
var value = new proto.injective_exchange_rpc.CosmosPubKey;
reader.readMessage(value,proto.injective_exchange_rpc.CosmosPubKey.deserializeBinaryFromReader);
msg.setPubKey(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setSignature(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setFeePayer(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setFeePayerSig(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setMode(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.BroadcastTxRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.BroadcastTxRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.BroadcastTxRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getChainId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getTx_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getMsgsList_asU8();
if (f.length > 0) {
writer.writeRepeatedBytes(
3,
f
);
}
f = message.getPubKey();
if (f != null) {
writer.writeMessage(
4,
f,
proto.injective_exchange_rpc.CosmosPubKey.serializeBinaryToWriter
);
}
f = message.getSignature();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getFeePayer();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getFeePayerSig();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getMode();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
};
/**
* optional uint64 chain_id = 1;
* @return {number}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getChainId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setChainId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional bytes tx = 2;
* @return {!(string|Uint8Array)}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getTx = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes tx = 2;
* This is a type-conversion wrapper around `getTx()`
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getTx_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getTx()));
};
/**
* optional bytes tx = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getTx()`
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getTx_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getTx()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setTx = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* repeated bytes msgs = 3;
* @return {!(Array<!Uint8Array>|Array<string>)}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getMsgsList = function() {
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3));
};
/**
* repeated bytes msgs = 3;
* This is a type-conversion wrapper around `getMsgsList()`
* @return {!Array<string>}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getMsgsList_asB64 = function() {
return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(
this.getMsgsList()));
};
/**
* repeated bytes msgs = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getMsgsList()`
* @return {!Array<!Uint8Array>}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getMsgsList_asU8 = function() {
return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
this.getMsgsList()));
};
/**
* @param {!(Array<!Uint8Array>|Array<string>)} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setMsgsList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {!(string|Uint8Array)} value
* @param {number=} opt_index
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.addMsgs = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.clearMsgsList = function() {
return this.setMsgsList([]);
};
/**
* optional CosmosPubKey pub_key = 4;
* @return {?proto.injective_exchange_rpc.CosmosPubKey}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getPubKey = function() {
return /** @type{?proto.injective_exchange_rpc.CosmosPubKey} */ (
jspb.Message.getWrapperField(this, proto.injective_exchange_rpc.CosmosPubKey, 4));
};
/**
* @param {?proto.injective_exchange_rpc.CosmosPubKey|undefined} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setPubKey = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.clearPubKey = function() {
return this.setPubKey(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.hasPubKey = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional string signature = 5;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getSignature = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setSignature = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string fee_payer = 6;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getFeePayer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setFeePayer = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string fee_payer_sig = 7;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getFeePayerSig = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setFeePayerSig = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string mode = 8;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.getMode = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxRequest} returns this
*/
proto.injective_exchange_rpc.BroadcastTxRequest.prototype.setMode = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.CosmosPubKey.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.CosmosPubKey.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.CosmosPubKey} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.CosmosPubKey.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
key: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.CosmosPubKey}
*/
proto.injective_exchange_rpc.CosmosPubKey.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.CosmosPubKey;
return proto.injective_exchange_rpc.CosmosPubKey.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.CosmosPubKey} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.CosmosPubKey}
*/
proto.injective_exchange_rpc.CosmosPubKey.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.CosmosPubKey.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.CosmosPubKey.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.CosmosPubKey} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.CosmosPubKey.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getKey();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string type = 1;
* @return {string}
*/
proto.injective_exchange_rpc.CosmosPubKey.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.CosmosPubKey} returns this
*/
proto.injective_exchange_rpc.CosmosPubKey.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string key = 2;
* @return {string}
*/
proto.injective_exchange_rpc.CosmosPubKey.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.CosmosPubKey} returns this
*/
proto.injective_exchange_rpc.CosmosPubKey.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.toObject = function(opt_includeInstance) {
return proto.injective_exchange_rpc.BroadcastTxResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.injective_exchange_rpc.BroadcastTxResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.BroadcastTxResponse.toObject = function(includeInstance, msg) {
var f, obj = {
txHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
height: jspb.Message.getFieldWithDefault(msg, 2, 0),
index: jspb.Message.getFieldWithDefault(msg, 3, 0),
codespace: jspb.Message.getFieldWithDefault(msg, 4, ""),
code: jspb.Message.getFieldWithDefault(msg, 5, 0),
data: msg.getData_asB64(),
rawLog: jspb.Message.getFieldWithDefault(msg, 7, ""),
timestamp: jspb.Message.getFieldWithDefault(msg, 8, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.injective_exchange_rpc.BroadcastTxResponse;
return proto.injective_exchange_rpc.BroadcastTxResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.injective_exchange_rpc.BroadcastTxResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setTxHash(value);
break;
case 2:
var value = /** @type {number} */ (reader.readSint64());
msg.setHeight(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint32());
msg.setIndex(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setCodespace(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint32());
msg.setCode(value);
break;
case 6:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setRawLog(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.injective_exchange_rpc.BroadcastTxResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.injective_exchange_rpc.BroadcastTxResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.injective_exchange_rpc.BroadcastTxResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTxHash();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getHeight();
if (f !== 0) {
writer.writeSint64(
2,
f
);
}
f = message.getIndex();
if (f !== 0) {
writer.writeUint32(
3,
f
);
}
f = message.getCodespace();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getCode();
if (f !== 0) {
writer.writeUint32(
5,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
6,
f
);
}
f = message.getRawLog();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getTimestamp();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
};
/**
* optional string tx_hash = 1;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getTxHash = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setTxHash = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional sint64 height = 2;
* @return {number}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getHeight = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setHeight = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint32 index = 3;
* @return {number}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getIndex = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setIndex = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional string codespace = 4;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getCodespace = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setCodespace = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional uint32 code = 5;
* @return {number}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getCode = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setCode = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional bytes data = 6;
* @return {!(string|Uint8Array)}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* optional bytes data = 6;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 6;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setData = function(value) {
return jspb.Message.setProto3BytesField(this, 6, value);
};
/**
* optional string raw_log = 7;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getRawLog = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setRawLog = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string timestamp = 8;
* @return {string}
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.getTimestamp = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.injective_exchange_rpc.BroadcastTxResponse} returns this
*/
proto.injective_exchange_rpc.BroadcastTxResponse.prototype.setTimestamp = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
goog.object.extend(exports, proto.injective_exchange_rpc);