1106 lines
34 KiB
JavaScript
1106 lines
34 KiB
JavaScript
/**
|
|
* @fileoverview
|
|
* @enhanceable
|
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
* field starts with 'MSG_' and isn't a translatable message.
|
|
* @public
|
|
*/
|
|
// GENERATED CODE -- DO NOT EDIT!
|
|
|
|
var jspb = require('google-protobuf');
|
|
var goog = jspb;
|
|
var global = Function('return this')();
|
|
|
|
var compact_formats_pb = require('./compact_formats_pb.js');
|
|
goog.exportSymbol('proto.cash.z.wallet.sdk.rpc.BlockID', null, global);
|
|
goog.exportSymbol('proto.cash.z.wallet.sdk.rpc.BlockRange', null, global);
|
|
goog.exportSymbol('proto.cash.z.wallet.sdk.rpc.ChainSpec', null, global);
|
|
goog.exportSymbol('proto.cash.z.wallet.sdk.rpc.RawTransaction', null, global);
|
|
goog.exportSymbol('proto.cash.z.wallet.sdk.rpc.SendResponse', null, global);
|
|
goog.exportSymbol('proto.cash.z.wallet.sdk.rpc.TxFilter', 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.cash.z.wallet.sdk.rpc.BlockID = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cash.z.wallet.sdk.rpc.BlockID, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.displayName = 'proto.cash.z.wallet.sdk.rpc.BlockID';
|
|
}
|
|
|
|
|
|
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.cash.z.wallet.sdk.rpc.BlockID.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cash.z.wallet.sdk.rpc.BlockID.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.cash.z.wallet.sdk.rpc.BlockID} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
height: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
hash: msg.getHash_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.cash.z.wallet.sdk.rpc.BlockID}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cash.z.wallet.sdk.rpc.BlockID;
|
|
return proto.cash.z.wallet.sdk.rpc.BlockID.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.BlockID} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.BlockID}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.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.setHeight(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
msg.setHash(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.BlockID} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getHeight();
|
|
if (f !== 0) {
|
|
writer.writeUint64(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getHash_asU8();
|
|
if (f.length > 0) {
|
|
writer.writeBytes(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional uint64 height = 1;
|
|
* @return {number}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.getHeight = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
};
|
|
|
|
|
|
/** @param {number} value */
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.setHeight = function(value) {
|
|
jspb.Message.setProto3IntField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes hash = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.getHash = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes hash = 2;
|
|
* This is a type-conversion wrapper around `getHash()`
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.getHash_asB64 = function() {
|
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
this.getHash()));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes hash = 2;
|
|
* Note that Uint8Array is not supported on all browsers.
|
|
* @see http://caniuse.com/Uint8Array
|
|
* This is a type-conversion wrapper around `getHash()`
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.getHash_asU8 = function() {
|
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
this.getHash()));
|
|
};
|
|
|
|
|
|
/** @param {!(string|Uint8Array)} value */
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.prototype.setHash = function(value) {
|
|
jspb.Message.setProto3BytesField(this, 2, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cash.z.wallet.sdk.rpc.BlockRange, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.displayName = 'proto.cash.z.wallet.sdk.rpc.BlockRange';
|
|
}
|
|
|
|
|
|
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.cash.z.wallet.sdk.rpc.BlockRange.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cash.z.wallet.sdk.rpc.BlockRange.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.cash.z.wallet.sdk.rpc.BlockRange} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
start: (f = msg.getStart()) && proto.cash.z.wallet.sdk.rpc.BlockID.toObject(includeInstance, f),
|
|
end: (f = msg.getEnd()) && proto.cash.z.wallet.sdk.rpc.BlockID.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.cash.z.wallet.sdk.rpc.BlockRange}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cash.z.wallet.sdk.rpc.BlockRange;
|
|
return proto.cash.z.wallet.sdk.rpc.BlockRange.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.BlockRange} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.BlockRange}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = new proto.cash.z.wallet.sdk.rpc.BlockID;
|
|
reader.readMessage(value,proto.cash.z.wallet.sdk.rpc.BlockID.deserializeBinaryFromReader);
|
|
msg.setStart(value);
|
|
break;
|
|
case 2:
|
|
var value = new proto.cash.z.wallet.sdk.rpc.BlockID;
|
|
reader.readMessage(value,proto.cash.z.wallet.sdk.rpc.BlockID.deserializeBinaryFromReader);
|
|
msg.setEnd(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.BlockRange} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getStart();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
1,
|
|
f,
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getEnd();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional BlockID start = 1;
|
|
* @return {?proto.cash.z.wallet.sdk.rpc.BlockID}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.getStart = function() {
|
|
return /** @type{?proto.cash.z.wallet.sdk.rpc.BlockID} */ (
|
|
jspb.Message.getWrapperField(this, proto.cash.z.wallet.sdk.rpc.BlockID, 1));
|
|
};
|
|
|
|
|
|
/** @param {?proto.cash.z.wallet.sdk.rpc.BlockID|undefined} value */
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.setStart = function(value) {
|
|
jspb.Message.setWrapperField(this, 1, value);
|
|
};
|
|
|
|
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.clearStart = function() {
|
|
this.setStart(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.hasStart = function() {
|
|
return jspb.Message.getField(this, 1) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional BlockID end = 2;
|
|
* @return {?proto.cash.z.wallet.sdk.rpc.BlockID}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.getEnd = function() {
|
|
return /** @type{?proto.cash.z.wallet.sdk.rpc.BlockID} */ (
|
|
jspb.Message.getWrapperField(this, proto.cash.z.wallet.sdk.rpc.BlockID, 2));
|
|
};
|
|
|
|
|
|
/** @param {?proto.cash.z.wallet.sdk.rpc.BlockID|undefined} value */
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.setEnd = function(value) {
|
|
jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.clearEnd = function() {
|
|
this.setEnd(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.BlockRange.prototype.hasEnd = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cash.z.wallet.sdk.rpc.TxFilter, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.displayName = 'proto.cash.z.wallet.sdk.rpc.TxFilter';
|
|
}
|
|
|
|
|
|
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.cash.z.wallet.sdk.rpc.TxFilter.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cash.z.wallet.sdk.rpc.TxFilter.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.cash.z.wallet.sdk.rpc.TxFilter} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
block: (f = msg.getBlock()) && proto.cash.z.wallet.sdk.rpc.BlockID.toObject(includeInstance, f),
|
|
index: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
hash: msg.getHash_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.cash.z.wallet.sdk.rpc.TxFilter}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cash.z.wallet.sdk.rpc.TxFilter;
|
|
return proto.cash.z.wallet.sdk.rpc.TxFilter.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.TxFilter} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.TxFilter}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = new proto.cash.z.wallet.sdk.rpc.BlockID;
|
|
reader.readMessage(value,proto.cash.z.wallet.sdk.rpc.BlockID.deserializeBinaryFromReader);
|
|
msg.setBlock(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {number} */ (reader.readUint64());
|
|
msg.setIndex(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
msg.setHash(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.TxFilter} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getBlock();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
1,
|
|
f,
|
|
proto.cash.z.wallet.sdk.rpc.BlockID.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getIndex();
|
|
if (f !== 0) {
|
|
writer.writeUint64(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getHash_asU8();
|
|
if (f.length > 0) {
|
|
writer.writeBytes(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional BlockID block = 1;
|
|
* @return {?proto.cash.z.wallet.sdk.rpc.BlockID}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.getBlock = function() {
|
|
return /** @type{?proto.cash.z.wallet.sdk.rpc.BlockID} */ (
|
|
jspb.Message.getWrapperField(this, proto.cash.z.wallet.sdk.rpc.BlockID, 1));
|
|
};
|
|
|
|
|
|
/** @param {?proto.cash.z.wallet.sdk.rpc.BlockID|undefined} value */
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.setBlock = function(value) {
|
|
jspb.Message.setWrapperField(this, 1, value);
|
|
};
|
|
|
|
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.clearBlock = function() {
|
|
this.setBlock(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.hasBlock = function() {
|
|
return jspb.Message.getField(this, 1) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional uint64 index = 2;
|
|
* @return {number}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.getIndex = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
};
|
|
|
|
|
|
/** @param {number} value */
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.setIndex = function(value) {
|
|
jspb.Message.setProto3IntField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes hash = 3;
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.getHash = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes hash = 3;
|
|
* This is a type-conversion wrapper around `getHash()`
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.getHash_asB64 = function() {
|
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
this.getHash()));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes hash = 3;
|
|
* Note that Uint8Array is not supported on all browsers.
|
|
* @see http://caniuse.com/Uint8Array
|
|
* This is a type-conversion wrapper around `getHash()`
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.getHash_asU8 = function() {
|
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
this.getHash()));
|
|
};
|
|
|
|
|
|
/** @param {!(string|Uint8Array)} value */
|
|
proto.cash.z.wallet.sdk.rpc.TxFilter.prototype.setHash = function(value) {
|
|
jspb.Message.setProto3BytesField(this, 3, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cash.z.wallet.sdk.rpc.RawTransaction, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.displayName = 'proto.cash.z.wallet.sdk.rpc.RawTransaction';
|
|
}
|
|
|
|
|
|
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.cash.z.wallet.sdk.rpc.RawTransaction.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cash.z.wallet.sdk.rpc.RawTransaction.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.cash.z.wallet.sdk.rpc.RawTransaction} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
data: msg.getData_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.cash.z.wallet.sdk.rpc.RawTransaction}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cash.z.wallet.sdk.rpc.RawTransaction;
|
|
return proto.cash.z.wallet.sdk.rpc.RawTransaction.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.RawTransaction} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.RawTransaction}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
msg.setData(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.RawTransaction} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getData_asU8();
|
|
if (f.length > 0) {
|
|
writer.writeBytes(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes data = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.prototype.getData = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes data = 1;
|
|
* This is a type-conversion wrapper around `getData()`
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.prototype.getData_asB64 = function() {
|
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
this.getData()));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes data = 1;
|
|
* 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.cash.z.wallet.sdk.rpc.RawTransaction.prototype.getData_asU8 = function() {
|
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
this.getData()));
|
|
};
|
|
|
|
|
|
/** @param {!(string|Uint8Array)} value */
|
|
proto.cash.z.wallet.sdk.rpc.RawTransaction.prototype.setData = function(value) {
|
|
jspb.Message.setProto3BytesField(this, 1, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cash.z.wallet.sdk.rpc.SendResponse, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.displayName = 'proto.cash.z.wallet.sdk.rpc.SendResponse';
|
|
}
|
|
|
|
|
|
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.cash.z.wallet.sdk.rpc.SendResponse.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cash.z.wallet.sdk.rpc.SendResponse.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.cash.z.wallet.sdk.rpc.SendResponse} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
errorcode: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
errormessage: 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.cash.z.wallet.sdk.rpc.SendResponse}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cash.z.wallet.sdk.rpc.SendResponse;
|
|
return proto.cash.z.wallet.sdk.rpc.SendResponse.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.SendResponse} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.SendResponse}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {number} */ (reader.readInt32());
|
|
msg.setErrorcode(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setErrormessage(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.SendResponse} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getErrorcode();
|
|
if (f !== 0) {
|
|
writer.writeInt32(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getErrormessage();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int32 errorCode = 1;
|
|
* @return {number}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.prototype.getErrorcode = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
};
|
|
|
|
|
|
/** @param {number} value */
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.prototype.setErrorcode = function(value) {
|
|
jspb.Message.setProto3IntField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string errorMessage = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.prototype.getErrormessage = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.cash.z.wallet.sdk.rpc.SendResponse.prototype.setErrormessage = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cash.z.wallet.sdk.rpc.ChainSpec, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.displayName = 'proto.cash.z.wallet.sdk.rpc.ChainSpec';
|
|
}
|
|
|
|
|
|
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.cash.z.wallet.sdk.rpc.ChainSpec.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cash.z.wallet.sdk.rpc.ChainSpec.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.cash.z.wallet.sdk.rpc.ChainSpec} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.ChainSpec}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cash.z.wallet.sdk.rpc.ChainSpec;
|
|
return proto.cash.z.wallet.sdk.rpc.ChainSpec.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.ChainSpec} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cash.z.wallet.sdk.rpc.ChainSpec}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cash.z.wallet.sdk.rpc.ChainSpec} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cash.z.wallet.sdk.rpc.ChainSpec.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
};
|
|
|
|
|
|
goog.object.extend(exports, proto.cash.z.wallet.sdk.rpc);
|