UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

1,603 lines (1,320 loc) 84.3 kB
"use strict"; // source: provenance/attribute/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 cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js'); goog.object.extend(proto, cosmos_msg_v1_msg_pb); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var provenance_attribute_v1_attribute_pb = require('../../../provenance/attribute/v1/attribute_pb.js'); goog.object.extend(proto, provenance_attribute_v1_attribute_pb); goog.exportSymbol('proto.provenance.attribute.v1.MsgAddAttributeRequest', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgAddAttributeResponse', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgDeleteAttributeRequest', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgDeleteAttributeResponse', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgDeleteDistinctAttributeRequest', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgDeleteDistinctAttributeResponse', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgSetAccountDataRequest', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgSetAccountDataResponse', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgUpdateAttributeExpirationResponse', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgUpdateAttributeRequest', null, global); goog.exportSymbol('proto.provenance.attribute.v1.MsgUpdateAttributeResponse', 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.attribute.v1.MsgAddAttributeRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgAddAttributeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgAddAttributeRequest.displayName = 'proto.provenance.attribute.v1.MsgAddAttributeRequest'; } /** * 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.attribute.v1.MsgAddAttributeResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgAddAttributeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgAddAttributeResponse.displayName = 'proto.provenance.attribute.v1.MsgAddAttributeResponse'; } /** * 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.attribute.v1.MsgUpdateAttributeRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgUpdateAttributeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.displayName = 'proto.provenance.attribute.v1.MsgUpdateAttributeRequest'; } /** * 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.attribute.v1.MsgUpdateAttributeResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgUpdateAttributeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgUpdateAttributeResponse.displayName = 'proto.provenance.attribute.v1.MsgUpdateAttributeResponse'; } /** * 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.attribute.v1.MsgUpdateAttributeExpirationRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.displayName = 'proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest'; } /** * 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.attribute.v1.MsgUpdateAttributeExpirationResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgUpdateAttributeExpirationResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationResponse.displayName = 'proto.provenance.attribute.v1.MsgUpdateAttributeExpirationResponse'; } /** * 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.attribute.v1.MsgDeleteAttributeRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgDeleteAttributeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgDeleteAttributeRequest.displayName = 'proto.provenance.attribute.v1.MsgDeleteAttributeRequest'; } /** * 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.attribute.v1.MsgDeleteAttributeResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgDeleteAttributeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgDeleteAttributeResponse.displayName = 'proto.provenance.attribute.v1.MsgDeleteAttributeResponse'; } /** * 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.attribute.v1.MsgDeleteDistinctAttributeRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgDeleteDistinctAttributeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgDeleteDistinctAttributeRequest.displayName = 'proto.provenance.attribute.v1.MsgDeleteDistinctAttributeRequest'; } /** * 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.attribute.v1.MsgDeleteDistinctAttributeResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgDeleteDistinctAttributeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgDeleteDistinctAttributeResponse.displayName = 'proto.provenance.attribute.v1.MsgDeleteDistinctAttributeResponse'; } /** * 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.attribute.v1.MsgSetAccountDataRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgSetAccountDataRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgSetAccountDataRequest.displayName = 'proto.provenance.attribute.v1.MsgSetAccountDataRequest'; } /** * 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.attribute.v1.MsgSetAccountDataResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.MsgSetAccountDataResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.MsgSetAccountDataResponse.displayName = 'proto.provenance.attribute.v1.MsgSetAccountDataResponse'; } 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.attribute.v1.MsgAddAttributeRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.MsgAddAttributeRequest.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.attribute.v1.MsgAddAttributeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgAddAttributeRequest.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), value: msg.getValue_asB64(), attributeType: jspb.Message.getFieldWithDefault(msg, 3, 0), account: jspb.Message.getFieldWithDefault(msg, 4, ""), owner: jspb.Message.getFieldWithDefault(msg, 5, ""), expirationDate: (f = msg.getExpirationDate()) && google_protobuf_timestamp_pb.Timestamp.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.attribute.v1.MsgAddAttributeRequest} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.MsgAddAttributeRequest(); return proto.provenance.attribute.v1.MsgAddAttributeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.MsgAddAttributeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.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.setName(value); break; case 2: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.setValue(value); break; case 3: var value = /** @type {!proto.provenance.attribute.v1.AttributeType} */ reader.readEnum(); msg.setAttributeType(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setAccount(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setOwner(value); break; case 6: var value = new google_protobuf_timestamp_pb.Timestamp(); reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setExpirationDate(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.MsgAddAttributeRequest.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.attribute.v1.MsgAddAttributeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgAddAttributeRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getValue_asU8(); if (f.length > 0) { writer.writeBytes(2, f); } f = message.getAttributeType(); if (f !== 0.0) { writer.writeEnum(3, f); } f = message.getAccount(); if (f.length > 0) { writer.writeString(4, f); } f = message.getOwner(); if (f.length > 0) { writer.writeString(5, f); } f = message.getExpirationDate(); if (f != null) { writer.writeMessage(6, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes value = 2; * @return {!(string|Uint8Array)} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getValue = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * optional bytes value = 2; * This is a type-conversion wrapper around `getValue()` * @return {string} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getValue_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getValue()) ); }; /** * optional bytes value = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getValue()` * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getValue_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getValue()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.setValue = function (value) { return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional AttributeType attribute_type = 3; * @return {!proto.provenance.attribute.v1.AttributeType} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getAttributeType = function () { return ( /** @type {!proto.provenance.attribute.v1.AttributeType} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; /** * @param {!proto.provenance.attribute.v1.AttributeType} value * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.setAttributeType = function (value) { return jspb.Message.setProto3EnumField(this, 3, value); }; /** * optional string account = 4; * @return {string} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getAccount = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.setAccount = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string owner = 5; * @return {string} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getOwner = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional google.protobuf.Timestamp expiration_date = 6; * @return {?proto.google.protobuf.Timestamp} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.getExpirationDate = function () { return ( /** @type{?proto.google.protobuf.Timestamp} */ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6) ); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.setExpirationDate = function (value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.attribute.v1.MsgAddAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.clearExpirationDate = function () { return this.setExpirationDate(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.attribute.v1.MsgAddAttributeRequest.prototype.hasExpirationDate = function () { return jspb.Message.getField(this, 6) != 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.attribute.v1.MsgAddAttributeResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.MsgAddAttributeResponse.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.attribute.v1.MsgAddAttributeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgAddAttributeResponse.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.attribute.v1.MsgAddAttributeResponse} */ proto.provenance.attribute.v1.MsgAddAttributeResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.MsgAddAttributeResponse(); return proto.provenance.attribute.v1.MsgAddAttributeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.MsgAddAttributeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.MsgAddAttributeResponse} */ proto.provenance.attribute.v1.MsgAddAttributeResponse.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.attribute.v1.MsgAddAttributeResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.MsgAddAttributeResponse.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.attribute.v1.MsgAddAttributeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgAddAttributeResponse.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.attribute.v1.MsgUpdateAttributeRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.MsgUpdateAttributeRequest.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.attribute.v1.MsgUpdateAttributeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), originalValue: msg.getOriginalValue_asB64(), updateValue: msg.getUpdateValue_asB64(), originalAttributeType: jspb.Message.getFieldWithDefault(msg, 4, 0), updateAttributeType: jspb.Message.getFieldWithDefault(msg, 5, 0), account: jspb.Message.getFieldWithDefault(msg, 6, ""), owner: jspb.Message.getFieldWithDefault(msg, 7, "") }; 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.attribute.v1.MsgUpdateAttributeRequest} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.MsgUpdateAttributeRequest(); return proto.provenance.attribute.v1.MsgUpdateAttributeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.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.setName(value); break; case 2: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.setOriginalValue(value); break; case 3: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.setUpdateValue(value); break; case 4: var value = /** @type {!proto.provenance.attribute.v1.AttributeType} */ reader.readEnum(); msg.setOriginalAttributeType(value); break; case 5: var value = /** @type {!proto.provenance.attribute.v1.AttributeType} */ reader.readEnum(); msg.setUpdateAttributeType(value); break; case 6: var value = /** @type {string} */ reader.readString(); msg.setAccount(value); break; case 7: var value = /** @type {string} */ reader.readString(); msg.setOwner(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.MsgUpdateAttributeRequest.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.attribute.v1.MsgUpdateAttributeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getOriginalValue_asU8(); if (f.length > 0) { writer.writeBytes(2, f); } f = message.getUpdateValue_asU8(); if (f.length > 0) { writer.writeBytes(3, f); } f = message.getOriginalAttributeType(); if (f !== 0.0) { writer.writeEnum(4, f); } f = message.getUpdateAttributeType(); if (f !== 0.0) { writer.writeEnum(5, f); } f = message.getAccount(); if (f.length > 0) { writer.writeString(6, f); } f = message.getOwner(); if (f.length > 0) { writer.writeString(7, f); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes original_value = 2; * @return {!(string|Uint8Array)} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getOriginalValue = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * optional bytes original_value = 2; * This is a type-conversion wrapper around `getOriginalValue()` * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getOriginalValue_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getOriginalValue()) ); }; /** * optional bytes original_value = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOriginalValue()` * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getOriginalValue_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getOriginalValue()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setOriginalValue = function (value) { return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional bytes update_value = 3; * @return {!(string|Uint8Array)} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getUpdateValue = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; /** * optional bytes update_value = 3; * This is a type-conversion wrapper around `getUpdateValue()` * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getUpdateValue_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getUpdateValue()) ); }; /** * optional bytes update_value = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getUpdateValue()` * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getUpdateValue_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getUpdateValue()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setUpdateValue = function (value) { return jspb.Message.setProto3BytesField(this, 3, value); }; /** * optional AttributeType original_attribute_type = 4; * @return {!proto.provenance.attribute.v1.AttributeType} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getOriginalAttributeType = function () { return ( /** @type {!proto.provenance.attribute.v1.AttributeType} */ jspb.Message.getFieldWithDefault(this, 4, 0) ); }; /** * @param {!proto.provenance.attribute.v1.AttributeType} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setOriginalAttributeType = function (value) { return jspb.Message.setProto3EnumField(this, 4, value); }; /** * optional AttributeType update_attribute_type = 5; * @return {!proto.provenance.attribute.v1.AttributeType} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getUpdateAttributeType = function () { return ( /** @type {!proto.provenance.attribute.v1.AttributeType} */ jspb.Message.getFieldWithDefault(this, 5, 0) ); }; /** * @param {!proto.provenance.attribute.v1.AttributeType} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setUpdateAttributeType = function (value) { return jspb.Message.setProto3EnumField(this, 5, value); }; /** * optional string account = 6; * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getAccount = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 6, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setAccount = function (value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string owner = 7; * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.getOwner = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 7, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeRequest.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 7, 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.provenance.attribute.v1.MsgUpdateAttributeResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.MsgUpdateAttributeResponse.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.attribute.v1.MsgUpdateAttributeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgUpdateAttributeResponse.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.attribute.v1.MsgUpdateAttributeResponse} */ proto.provenance.attribute.v1.MsgUpdateAttributeResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.MsgUpdateAttributeResponse(); return proto.provenance.attribute.v1.MsgUpdateAttributeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.MsgUpdateAttributeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeResponse} */ proto.provenance.attribute.v1.MsgUpdateAttributeResponse.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.attribute.v1.MsgUpdateAttributeResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.MsgUpdateAttributeResponse.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.attribute.v1.MsgUpdateAttributeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgUpdateAttributeResponse.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.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.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.attribute.v1.MsgUpdateAttributeExpirationRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), value: msg.getValue_asB64(), expirationDate: (f = msg.getExpirationDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), account: jspb.Message.getFieldWithDefault(msg, 4, ""), owner: jspb.Message.getFieldWithDefault(msg, 5, "") }; 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.attribute.v1.MsgUpdateAttributeExpirationRequest} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest(); return proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.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.setName(value); break; case 2: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.setValue(value); break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp(); reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setExpirationDate(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setAccount(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setOwner(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.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.attribute.v1.MsgUpdateAttributeExpirationRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getValue_asU8(); if (f.length > 0) { writer.writeBytes(2, f); } f = message.getExpirationDate(); if (f != null) { writer.writeMessage(3, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter); } f = message.getAccount(); if (f.length > 0) { writer.writeString(4, f); } f = message.getOwner(); if (f.length > 0) { writer.writeString(5, f); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes value = 2; * @return {!(string|Uint8Array)} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.getValue = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * optional bytes value = 2; * This is a type-conversion wrapper around `getValue()` * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.getValue_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getValue()) ); }; /** * optional bytes value = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getValue()` * @return {!Uint8Array} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.getValue_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getValue()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.setValue = function (value) { return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional google.protobuf.Timestamp expiration_date = 3; * @return {?proto.google.protobuf.Timestamp} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.getExpirationDate = function () { return ( /** @type{?proto.google.protobuf.Timestamp} */ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) ); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.setExpirationDate = function (value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} returns this */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.clearExpirationDate = function () { return this.setExpirationDate(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.hasExpirationDate = function () { return jspb.Message.getField(this, 3) != null; }; /** * optional string account = 4; * @return {string} */ proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest.prototype.getAccount = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.MsgUpdateAttributeExpirationRequest} returns this */ proto.provenance.attribute.v1.Ms