@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,378 lines (1,140 loc) • 45.2 kB
JavaScript
"use strict";
// source: provenance/name/v1/tx.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 () {
return this || window || global || self || Function('return this')();
}.call(null);
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js');
goog.object.extend(proto, cosmos_msg_v1_msg_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var provenance_name_v1_name_pb = require('../../../provenance/name/v1/name_pb.js');
goog.object.extend(proto, provenance_name_v1_name_pb);
goog.exportSymbol('proto.provenance.name.v1.MsgBindNameRequest', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgBindNameResponse', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgCreateRootNameRequest', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgCreateRootNameResponse', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgDeleteNameRequest', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgDeleteNameResponse', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgModifyNameRequest', null, global);
goog.exportSymbol('proto.provenance.name.v1.MsgModifyNameResponse', 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.provenance.name.v1.MsgBindNameRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgBindNameRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgBindNameRequest.displayName = 'proto.provenance.name.v1.MsgBindNameRequest';
}
/**
* 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.provenance.name.v1.MsgBindNameResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgBindNameResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgBindNameResponse.displayName = 'proto.provenance.name.v1.MsgBindNameResponse';
}
/**
* 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.provenance.name.v1.MsgDeleteNameRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgDeleteNameRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgDeleteNameRequest.displayName = 'proto.provenance.name.v1.MsgDeleteNameRequest';
}
/**
* 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.provenance.name.v1.MsgDeleteNameResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgDeleteNameResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgDeleteNameResponse.displayName = 'proto.provenance.name.v1.MsgDeleteNameResponse';
}
/**
* 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.provenance.name.v1.MsgCreateRootNameRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgCreateRootNameRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.displayName = 'proto.provenance.name.v1.MsgCreateRootNameRequest';
}
/**
* 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.provenance.name.v1.MsgCreateRootNameResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgCreateRootNameResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgCreateRootNameResponse.displayName = 'proto.provenance.name.v1.MsgCreateRootNameResponse';
}
/**
* 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.provenance.name.v1.MsgModifyNameRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgModifyNameRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgModifyNameRequest.displayName = 'proto.provenance.name.v1.MsgModifyNameRequest';
}
/**
* 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.provenance.name.v1.MsgModifyNameResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.MsgModifyNameResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.MsgModifyNameResponse.displayName = 'proto.provenance.name.v1.MsgModifyNameResponse';
}
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.provenance.name.v1.MsgBindNameRequest.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgBindNameRequest.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.provenance.name.v1.MsgBindNameRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgBindNameRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
parent: (f = msg.getParent()) && provenance_name_v1_name_pb.NameRecord.toObject(includeInstance, f),
record: (f = msg.getRecord()) && provenance_name_v1_name_pb.NameRecord.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.provenance.name.v1.MsgBindNameRequest}
*/
proto.provenance.name.v1.MsgBindNameRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgBindNameRequest();
return proto.provenance.name.v1.MsgBindNameRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgBindNameRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgBindNameRequest}
*/
proto.provenance.name.v1.MsgBindNameRequest.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new provenance_name_v1_name_pb.NameRecord();
reader.readMessage(value, provenance_name_v1_name_pb.NameRecord.deserializeBinaryFromReader);
msg.setParent(value);
break;
case 2:
var value = new provenance_name_v1_name_pb.NameRecord();
reader.readMessage(value, provenance_name_v1_name_pb.NameRecord.deserializeBinaryFromReader);
msg.setRecord(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgBindNameRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgBindNameRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgBindNameRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getParent();
if (f != null) {
writer.writeMessage(1, f, provenance_name_v1_name_pb.NameRecord.serializeBinaryToWriter);
}
f = message.getRecord();
if (f != null) {
writer.writeMessage(2, f, provenance_name_v1_name_pb.NameRecord.serializeBinaryToWriter);
}
};
/**
* optional NameRecord parent = 1;
* @return {?proto.provenance.name.v1.NameRecord}
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.getParent = function () {
return (
/** @type{?proto.provenance.name.v1.NameRecord} */
jspb.Message.getWrapperField(this, provenance_name_v1_name_pb.NameRecord, 1)
);
};
/**
* @param {?proto.provenance.name.v1.NameRecord|undefined} value
* @return {!proto.provenance.name.v1.MsgBindNameRequest} returns this
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.setParent = function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.provenance.name.v1.MsgBindNameRequest} returns this
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.clearParent = function () {
return this.setParent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.hasParent = function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional NameRecord record = 2;
* @return {?proto.provenance.name.v1.NameRecord}
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.getRecord = function () {
return (
/** @type{?proto.provenance.name.v1.NameRecord} */
jspb.Message.getWrapperField(this, provenance_name_v1_name_pb.NameRecord, 2)
);
};
/**
* @param {?proto.provenance.name.v1.NameRecord|undefined} value
* @return {!proto.provenance.name.v1.MsgBindNameRequest} returns this
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.setRecord = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.provenance.name.v1.MsgBindNameRequest} returns this
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.clearRecord = function () {
return this.setRecord(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.provenance.name.v1.MsgBindNameRequest.prototype.hasRecord = function () {
return jspb.Message.getField(this, 2) != null;
};
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.provenance.name.v1.MsgBindNameResponse.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgBindNameResponse.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.provenance.name.v1.MsgBindNameResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgBindNameResponse.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.provenance.name.v1.MsgBindNameResponse}
*/
proto.provenance.name.v1.MsgBindNameResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgBindNameResponse();
return proto.provenance.name.v1.MsgBindNameResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgBindNameResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgBindNameResponse}
*/
proto.provenance.name.v1.MsgBindNameResponse.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.provenance.name.v1.MsgBindNameResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgBindNameResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgBindNameResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgBindNameResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
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.provenance.name.v1.MsgDeleteNameRequest.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgDeleteNameRequest.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.provenance.name.v1.MsgDeleteNameRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgDeleteNameRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
record: (f = msg.getRecord()) && provenance_name_v1_name_pb.NameRecord.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.provenance.name.v1.MsgDeleteNameRequest}
*/
proto.provenance.name.v1.MsgDeleteNameRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgDeleteNameRequest();
return proto.provenance.name.v1.MsgDeleteNameRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgDeleteNameRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgDeleteNameRequest}
*/
proto.provenance.name.v1.MsgDeleteNameRequest.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new provenance_name_v1_name_pb.NameRecord();
reader.readMessage(value, provenance_name_v1_name_pb.NameRecord.deserializeBinaryFromReader);
msg.setRecord(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.MsgDeleteNameRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgDeleteNameRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgDeleteNameRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgDeleteNameRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getRecord();
if (f != null) {
writer.writeMessage(1, f, provenance_name_v1_name_pb.NameRecord.serializeBinaryToWriter);
}
};
/**
* optional NameRecord record = 1;
* @return {?proto.provenance.name.v1.NameRecord}
*/
proto.provenance.name.v1.MsgDeleteNameRequest.prototype.getRecord = function () {
return (
/** @type{?proto.provenance.name.v1.NameRecord} */
jspb.Message.getWrapperField(this, provenance_name_v1_name_pb.NameRecord, 1)
);
};
/**
* @param {?proto.provenance.name.v1.NameRecord|undefined} value
* @return {!proto.provenance.name.v1.MsgDeleteNameRequest} returns this
*/
proto.provenance.name.v1.MsgDeleteNameRequest.prototype.setRecord = function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.provenance.name.v1.MsgDeleteNameRequest} returns this
*/
proto.provenance.name.v1.MsgDeleteNameRequest.prototype.clearRecord = function () {
return this.setRecord(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.provenance.name.v1.MsgDeleteNameRequest.prototype.hasRecord = function () {
return jspb.Message.getField(this, 1) != null;
};
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.provenance.name.v1.MsgDeleteNameResponse.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgDeleteNameResponse.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.provenance.name.v1.MsgDeleteNameResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgDeleteNameResponse.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.provenance.name.v1.MsgDeleteNameResponse}
*/
proto.provenance.name.v1.MsgDeleteNameResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgDeleteNameResponse();
return proto.provenance.name.v1.MsgDeleteNameResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgDeleteNameResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgDeleteNameResponse}
*/
proto.provenance.name.v1.MsgDeleteNameResponse.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.provenance.name.v1.MsgDeleteNameResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgDeleteNameResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgDeleteNameResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgDeleteNameResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
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.provenance.name.v1.MsgCreateRootNameRequest.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgCreateRootNameRequest.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.provenance.name.v1.MsgCreateRootNameRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
authority: jspb.Message.getFieldWithDefault(msg, 1, ""),
record: (f = msg.getRecord()) && provenance_name_v1_name_pb.NameRecord.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.provenance.name.v1.MsgCreateRootNameRequest}
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgCreateRootNameRequest();
return proto.provenance.name.v1.MsgCreateRootNameRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgCreateRootNameRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgCreateRootNameRequest}
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.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.setAuthority(value);
break;
case 2:
var value = new provenance_name_v1_name_pb.NameRecord();
reader.readMessage(value, provenance_name_v1_name_pb.NameRecord.deserializeBinaryFromReader);
msg.setRecord(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgCreateRootNameRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgCreateRootNameRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getRecord();
if (f != null) {
writer.writeMessage(2, f, provenance_name_v1_name_pb.NameRecord.serializeBinaryToWriter);
}
};
/**
* optional string authority = 1;
* @return {string}
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.MsgCreateRootNameRequest} returns this
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.setAuthority = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional NameRecord record = 2;
* @return {?proto.provenance.name.v1.NameRecord}
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.getRecord = function () {
return (
/** @type{?proto.provenance.name.v1.NameRecord} */
jspb.Message.getWrapperField(this, provenance_name_v1_name_pb.NameRecord, 2)
);
};
/**
* @param {?proto.provenance.name.v1.NameRecord|undefined} value
* @return {!proto.provenance.name.v1.MsgCreateRootNameRequest} returns this
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.setRecord = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.provenance.name.v1.MsgCreateRootNameRequest} returns this
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.clearRecord = function () {
return this.setRecord(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.provenance.name.v1.MsgCreateRootNameRequest.prototype.hasRecord = function () {
return jspb.Message.getField(this, 2) != null;
};
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.provenance.name.v1.MsgCreateRootNameResponse.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgCreateRootNameResponse.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.provenance.name.v1.MsgCreateRootNameResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgCreateRootNameResponse.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.provenance.name.v1.MsgCreateRootNameResponse}
*/
proto.provenance.name.v1.MsgCreateRootNameResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgCreateRootNameResponse();
return proto.provenance.name.v1.MsgCreateRootNameResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgCreateRootNameResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgCreateRootNameResponse}
*/
proto.provenance.name.v1.MsgCreateRootNameResponse.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.provenance.name.v1.MsgCreateRootNameResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgCreateRootNameResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgCreateRootNameResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgCreateRootNameResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
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.provenance.name.v1.MsgModifyNameRequest.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgModifyNameRequest.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.provenance.name.v1.MsgModifyNameRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgModifyNameRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
authority: jspb.Message.getFieldWithDefault(msg, 1, ""),
record: (f = msg.getRecord()) && provenance_name_v1_name_pb.NameRecord.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.provenance.name.v1.MsgModifyNameRequest}
*/
proto.provenance.name.v1.MsgModifyNameRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgModifyNameRequest();
return proto.provenance.name.v1.MsgModifyNameRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgModifyNameRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgModifyNameRequest}
*/
proto.provenance.name.v1.MsgModifyNameRequest.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.setAuthority(value);
break;
case 2:
var value = new provenance_name_v1_name_pb.NameRecord();
reader.readMessage(value, provenance_name_v1_name_pb.NameRecord.deserializeBinaryFromReader);
msg.setRecord(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgModifyNameRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgModifyNameRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgModifyNameRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getRecord();
if (f != null) {
writer.writeMessage(2, f, provenance_name_v1_name_pb.NameRecord.serializeBinaryToWriter);
}
};
/**
* optional string authority = 1;
* @return {string}
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.MsgModifyNameRequest} returns this
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.setAuthority = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional NameRecord record = 2;
* @return {?proto.provenance.name.v1.NameRecord}
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.getRecord = function () {
return (
/** @type{?proto.provenance.name.v1.NameRecord} */
jspb.Message.getWrapperField(this, provenance_name_v1_name_pb.NameRecord, 2)
);
};
/**
* @param {?proto.provenance.name.v1.NameRecord|undefined} value
* @return {!proto.provenance.name.v1.MsgModifyNameRequest} returns this
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.setRecord = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.provenance.name.v1.MsgModifyNameRequest} returns this
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.clearRecord = function () {
return this.setRecord(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.provenance.name.v1.MsgModifyNameRequest.prototype.hasRecord = function () {
return jspb.Message.getField(this, 2) != null;
};
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.provenance.name.v1.MsgModifyNameResponse.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.MsgModifyNameResponse.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.provenance.name.v1.MsgModifyNameResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgModifyNameResponse.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.provenance.name.v1.MsgModifyNameResponse}
*/
proto.provenance.name.v1.MsgModifyNameResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.MsgModifyNameResponse();
return proto.provenance.name.v1.MsgModifyNameResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.MsgModifyNameResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.MsgModifyNameResponse}
*/
proto.provenance.name.v1.MsgModifyNameResponse.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.provenance.name.v1.MsgModifyNameResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.MsgModifyNameResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.provenance.name.v1.MsgModifyNameResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.MsgModifyNameResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.provenance.name.v1);