UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

1,669 lines (1,372 loc) 142 kB
"use strict"; // source: provenance/marker/v1/marker.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_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js'); goog.object.extend(proto, cosmos_auth_v1beta1_auth_pb); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); var provenance_marker_v1_accessgrant_pb = require('../../../provenance/marker/v1/accessgrant_pb.js'); goog.object.extend(proto, provenance_marker_v1_accessgrant_pb); goog.exportSymbol('proto.provenance.marker.v1.EventDenomUnit', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerAccess', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerActivate', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerAdd', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerAddAccess', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerBurn', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerCancel', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerDelete', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerDeleteAccess', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerFinalize', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerMint', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerSetDenomMetadata', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerTransfer', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventMarkerWithdraw', null, global); goog.exportSymbol('proto.provenance.marker.v1.EventSetNetAssetValue', null, global); goog.exportSymbol('proto.provenance.marker.v1.MarkerAccount', null, global); goog.exportSymbol('proto.provenance.marker.v1.MarkerStatus', null, global); goog.exportSymbol('proto.provenance.marker.v1.MarkerType', null, global); goog.exportSymbol('proto.provenance.marker.v1.NetAssetValue', null, global); goog.exportSymbol('proto.provenance.marker.v1.Params', 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.marker.v1.Params = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.Params, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.Params.displayName = 'proto.provenance.marker.v1.Params'; } /** * 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.marker.v1.MarkerAccount = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.marker.v1.MarkerAccount.repeatedFields_, null); }; goog.inherits(proto.provenance.marker.v1.MarkerAccount, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.MarkerAccount.displayName = 'proto.provenance.marker.v1.MarkerAccount'; } /** * 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.marker.v1.NetAssetValue = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.NetAssetValue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.NetAssetValue.displayName = 'proto.provenance.marker.v1.NetAssetValue'; } /** * 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.marker.v1.EventMarkerAdd = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerAdd, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerAdd.displayName = 'proto.provenance.marker.v1.EventMarkerAdd'; } /** * 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.marker.v1.EventMarkerAddAccess = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerAddAccess, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerAddAccess.displayName = 'proto.provenance.marker.v1.EventMarkerAddAccess'; } /** * 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.marker.v1.EventMarkerAccess = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.marker.v1.EventMarkerAccess.repeatedFields_, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerAccess, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerAccess.displayName = 'proto.provenance.marker.v1.EventMarkerAccess'; } /** * 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.marker.v1.EventMarkerDeleteAccess = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerDeleteAccess, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerDeleteAccess.displayName = 'proto.provenance.marker.v1.EventMarkerDeleteAccess'; } /** * 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.marker.v1.EventMarkerFinalize = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerFinalize, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerFinalize.displayName = 'proto.provenance.marker.v1.EventMarkerFinalize'; } /** * 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.marker.v1.EventMarkerActivate = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerActivate, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerActivate.displayName = 'proto.provenance.marker.v1.EventMarkerActivate'; } /** * 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.marker.v1.EventMarkerCancel = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerCancel, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerCancel.displayName = 'proto.provenance.marker.v1.EventMarkerCancel'; } /** * 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.marker.v1.EventMarkerDelete = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerDelete, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerDelete.displayName = 'proto.provenance.marker.v1.EventMarkerDelete'; } /** * 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.marker.v1.EventMarkerMint = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerMint, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerMint.displayName = 'proto.provenance.marker.v1.EventMarkerMint'; } /** * 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.marker.v1.EventMarkerBurn = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerBurn, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerBurn.displayName = 'proto.provenance.marker.v1.EventMarkerBurn'; } /** * 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.marker.v1.EventMarkerWithdraw = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerWithdraw, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerWithdraw.displayName = 'proto.provenance.marker.v1.EventMarkerWithdraw'; } /** * 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.marker.v1.EventMarkerTransfer = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerTransfer, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerTransfer.displayName = 'proto.provenance.marker.v1.EventMarkerTransfer'; } /** * 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.marker.v1.EventMarkerSetDenomMetadata = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.marker.v1.EventMarkerSetDenomMetadata.repeatedFields_, null); }; goog.inherits(proto.provenance.marker.v1.EventMarkerSetDenomMetadata, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventMarkerSetDenomMetadata.displayName = 'proto.provenance.marker.v1.EventMarkerSetDenomMetadata'; } /** * 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.marker.v1.EventDenomUnit = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.provenance.marker.v1.EventDenomUnit.repeatedFields_, null); }; goog.inherits(proto.provenance.marker.v1.EventDenomUnit, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventDenomUnit.displayName = 'proto.provenance.marker.v1.EventDenomUnit'; } /** * 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.marker.v1.EventSetNetAssetValue = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.marker.v1.EventSetNetAssetValue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.marker.v1.EventSetNetAssetValue.displayName = 'proto.provenance.marker.v1.EventSetNetAssetValue'; } 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.marker.v1.Params.prototype.toObject = function (opt_includeInstance) { return proto.provenance.marker.v1.Params.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.marker.v1.Params} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.Params.toObject = function (includeInstance, msg) { var f, obj = { maxTotalSupply: jspb.Message.getFieldWithDefault(msg, 1, 0), enableGovernance: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), unrestrictedDenomRegex: jspb.Message.getFieldWithDefault(msg, 3, ""), maxSupply: jspb.Message.getFieldWithDefault(msg, 4, "") }; 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.marker.v1.Params} */ proto.provenance.marker.v1.Params.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.marker.v1.Params(); return proto.provenance.marker.v1.Params.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.marker.v1.Params} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.marker.v1.Params} */ proto.provenance.marker.v1.Params.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.setMaxTotalSupply(value); break; case 2: var value = /** @type {boolean} */ reader.readBool(); msg.setEnableGovernance(value); break; case 3: var value = /** @type {string} */ reader.readString(); msg.setUnrestrictedDenomRegex(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setMaxSupply(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.marker.v1.Params.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.marker.v1.Params.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.marker.v1.Params} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.Params.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getMaxTotalSupply(); if (f !== 0) { writer.writeUint64(1, f); } f = message.getEnableGovernance(); if (f) { writer.writeBool(2, f); } f = message.getUnrestrictedDenomRegex(); if (f.length > 0) { writer.writeString(3, f); } f = message.getMaxSupply(); if (f.length > 0) { writer.writeString(4, f); } }; /** * optional uint64 max_total_supply = 1; * @return {number} */ proto.provenance.marker.v1.Params.prototype.getMaxTotalSupply = function () { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; /** * @param {number} value * @return {!proto.provenance.marker.v1.Params} returns this */ proto.provenance.marker.v1.Params.prototype.setMaxTotalSupply = function (value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional bool enable_governance = 2; * @return {boolean} */ proto.provenance.marker.v1.Params.prototype.getEnableGovernance = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 2, false) ); }; /** * @param {boolean} value * @return {!proto.provenance.marker.v1.Params} returns this */ proto.provenance.marker.v1.Params.prototype.setEnableGovernance = function (value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** * optional string unrestricted_denom_regex = 3; * @return {string} */ proto.provenance.marker.v1.Params.prototype.getUnrestrictedDenomRegex = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; /** * @param {string} value * @return {!proto.provenance.marker.v1.Params} returns this */ proto.provenance.marker.v1.Params.prototype.setUnrestrictedDenomRegex = function (value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string max_supply = 4; * @return {string} */ proto.provenance.marker.v1.Params.prototype.getMaxSupply = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.marker.v1.Params} returns this */ proto.provenance.marker.v1.Params.prototype.setMaxSupply = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.provenance.marker.v1.MarkerAccount.repeatedFields_ = [3, 11]; 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.marker.v1.MarkerAccount.prototype.toObject = function (opt_includeInstance) { return proto.provenance.marker.v1.MarkerAccount.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.marker.v1.MarkerAccount} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.MarkerAccount.toObject = function (includeInstance, msg) { var f, obj = { baseAccount: (f = msg.getBaseAccount()) && cosmos_auth_v1beta1_auth_pb.BaseAccount.toObject(includeInstance, f), manager: jspb.Message.getFieldWithDefault(msg, 2, ""), accessControlList: jspb.Message.toObjectList(msg.getAccessControlList(), provenance_marker_v1_accessgrant_pb.AccessGrant.toObject, includeInstance), status: jspb.Message.getFieldWithDefault(msg, 4, 0), denom: jspb.Message.getFieldWithDefault(msg, 5, ""), supply: jspb.Message.getFieldWithDefault(msg, 6, ""), markerType: jspb.Message.getFieldWithDefault(msg, 7, 0), supplyFixed: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), allowGovernanceControl: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), allowForcedTransfer: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), requiredAttributesList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : 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.marker.v1.MarkerAccount} */ proto.provenance.marker.v1.MarkerAccount.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.marker.v1.MarkerAccount(); return proto.provenance.marker.v1.MarkerAccount.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.marker.v1.MarkerAccount} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.marker.v1.MarkerAccount} */ proto.provenance.marker.v1.MarkerAccount.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new cosmos_auth_v1beta1_auth_pb.BaseAccount(); reader.readMessage(value, cosmos_auth_v1beta1_auth_pb.BaseAccount.deserializeBinaryFromReader); msg.setBaseAccount(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setManager(value); break; case 3: var value = new provenance_marker_v1_accessgrant_pb.AccessGrant(); reader.readMessage(value, provenance_marker_v1_accessgrant_pb.AccessGrant.deserializeBinaryFromReader); msg.addAccessControl(value); break; case 4: var value = /** @type {!proto.provenance.marker.v1.MarkerStatus} */ reader.readEnum(); msg.setStatus(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setDenom(value); break; case 6: var value = /** @type {string} */ reader.readString(); msg.setSupply(value); break; case 7: var value = /** @type {!proto.provenance.marker.v1.MarkerType} */ reader.readEnum(); msg.setMarkerType(value); break; case 8: var value = /** @type {boolean} */ reader.readBool(); msg.setSupplyFixed(value); break; case 9: var value = /** @type {boolean} */ reader.readBool(); msg.setAllowGovernanceControl(value); break; case 10: var value = /** @type {boolean} */ reader.readBool(); msg.setAllowForcedTransfer(value); break; case 11: var value = /** @type {string} */ reader.readString(); msg.addRequiredAttributes(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.marker.v1.MarkerAccount.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.marker.v1.MarkerAccount.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.marker.v1.MarkerAccount} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.MarkerAccount.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getBaseAccount(); if (f != null) { writer.writeMessage(1, f, cosmos_auth_v1beta1_auth_pb.BaseAccount.serializeBinaryToWriter); } f = message.getManager(); if (f.length > 0) { writer.writeString(2, f); } f = message.getAccessControlList(); if (f.length > 0) { writer.writeRepeatedMessage(3, f, provenance_marker_v1_accessgrant_pb.AccessGrant.serializeBinaryToWriter); } f = message.getStatus(); if (f !== 0.0) { writer.writeEnum(4, f); } f = message.getDenom(); if (f.length > 0) { writer.writeString(5, f); } f = message.getSupply(); if (f.length > 0) { writer.writeString(6, f); } f = message.getMarkerType(); if (f !== 0.0) { writer.writeEnum(7, f); } f = message.getSupplyFixed(); if (f) { writer.writeBool(8, f); } f = message.getAllowGovernanceControl(); if (f) { writer.writeBool(9, f); } f = message.getAllowForcedTransfer(); if (f) { writer.writeBool(10, f); } f = message.getRequiredAttributesList(); if (f.length > 0) { writer.writeRepeatedString(11, f); } }; /** * optional cosmos.auth.v1beta1.BaseAccount base_account = 1; * @return {?proto.cosmos.auth.v1beta1.BaseAccount} */ proto.provenance.marker.v1.MarkerAccount.prototype.getBaseAccount = function () { return ( /** @type{?proto.cosmos.auth.v1beta1.BaseAccount} */ jspb.Message.getWrapperField(this, cosmos_auth_v1beta1_auth_pb.BaseAccount, 1) ); }; /** * @param {?proto.cosmos.auth.v1beta1.BaseAccount|undefined} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setBaseAccount = function (value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.clearBaseAccount = function () { return this.setBaseAccount(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.marker.v1.MarkerAccount.prototype.hasBaseAccount = function () { return jspb.Message.getField(this, 1) != null; }; /** * optional string manager = 2; * @return {string} */ proto.provenance.marker.v1.MarkerAccount.prototype.getManager = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * @param {string} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setManager = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated AccessGrant access_control = 3; * @return {!Array<!proto.provenance.marker.v1.AccessGrant>} */ proto.provenance.marker.v1.MarkerAccount.prototype.getAccessControlList = function () { return ( /** @type{!Array<!proto.provenance.marker.v1.AccessGrant>} */ jspb.Message.getRepeatedWrapperField(this, provenance_marker_v1_accessgrant_pb.AccessGrant, 3) ); }; /** * @param {!Array<!proto.provenance.marker.v1.AccessGrant>} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setAccessControlList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.provenance.marker.v1.AccessGrant=} opt_value * @param {number=} opt_index * @return {!proto.provenance.marker.v1.AccessGrant} */ proto.provenance.marker.v1.MarkerAccount.prototype.addAccessControl = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.provenance.marker.v1.AccessGrant, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.clearAccessControlList = function () { return this.setAccessControlList([]); }; /** * optional MarkerStatus status = 4; * @return {!proto.provenance.marker.v1.MarkerStatus} */ proto.provenance.marker.v1.MarkerAccount.prototype.getStatus = function () { return ( /** @type {!proto.provenance.marker.v1.MarkerStatus} */ jspb.Message.getFieldWithDefault(this, 4, 0) ); }; /** * @param {!proto.provenance.marker.v1.MarkerStatus} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setStatus = function (value) { return jspb.Message.setProto3EnumField(this, 4, value); }; /** * optional string denom = 5; * @return {string} */ proto.provenance.marker.v1.MarkerAccount.prototype.getDenom = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; /** * @param {string} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setDenom = function (value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string supply = 6; * @return {string} */ proto.provenance.marker.v1.MarkerAccount.prototype.getSupply = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 6, "") ); }; /** * @param {string} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setSupply = function (value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional MarkerType marker_type = 7; * @return {!proto.provenance.marker.v1.MarkerType} */ proto.provenance.marker.v1.MarkerAccount.prototype.getMarkerType = function () { return ( /** @type {!proto.provenance.marker.v1.MarkerType} */ jspb.Message.getFieldWithDefault(this, 7, 0) ); }; /** * @param {!proto.provenance.marker.v1.MarkerType} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setMarkerType = function (value) { return jspb.Message.setProto3EnumField(this, 7, value); }; /** * optional bool supply_fixed = 8; * @return {boolean} */ proto.provenance.marker.v1.MarkerAccount.prototype.getSupplyFixed = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 8, false) ); }; /** * @param {boolean} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setSupplyFixed = function (value) { return jspb.Message.setProto3BooleanField(this, 8, value); }; /** * optional bool allow_governance_control = 9; * @return {boolean} */ proto.provenance.marker.v1.MarkerAccount.prototype.getAllowGovernanceControl = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 9, false) ); }; /** * @param {boolean} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setAllowGovernanceControl = function (value) { return jspb.Message.setProto3BooleanField(this, 9, value); }; /** * optional bool allow_forced_transfer = 10; * @return {boolean} */ proto.provenance.marker.v1.MarkerAccount.prototype.getAllowForcedTransfer = function () { return ( /** @type {boolean} */ jspb.Message.getBooleanFieldWithDefault(this, 10, false) ); }; /** * @param {boolean} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setAllowForcedTransfer = function (value) { return jspb.Message.setProto3BooleanField(this, 10, value); }; /** * repeated string required_attributes = 11; * @return {!Array<string>} */ proto.provenance.marker.v1.MarkerAccount.prototype.getRequiredAttributesList = function () { return ( /** @type {!Array<string>} */ jspb.Message.getRepeatedField(this, 11) ); }; /** * @param {!Array<string>} value * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.setRequiredAttributesList = function (value) { return jspb.Message.setField(this, 11, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.addRequiredAttributes = function (value, opt_index) { return jspb.Message.addToRepeatedField(this, 11, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.provenance.marker.v1.MarkerAccount} returns this */ proto.provenance.marker.v1.MarkerAccount.prototype.clearRequiredAttributesList = function () { return this.setRequiredAttributesList([]); }; 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.marker.v1.NetAssetValue.prototype.toObject = function (opt_includeInstance) { return proto.provenance.marker.v1.NetAssetValue.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.marker.v1.NetAssetValue} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.NetAssetValue.toObject = function (includeInstance, msg) { var f, obj = { price: (f = msg.getPrice()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), volume: jspb.Message.getFieldWithDefault(msg, 2, 0), updatedBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) }; 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.marker.v1.NetAssetValue} */ proto.provenance.marker.v1.NetAssetValue.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.marker.v1.NetAssetValue(); return proto.provenance.marker.v1.NetAssetValue.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.marker.v1.NetAssetValue} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.marker.v1.NetAssetValue} */ proto.provenance.marker.v1.NetAssetValue.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new cosmos_base_v1beta1_coin_pb.Coin(); reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); msg.setPrice(value); break; case 2: var value = /** @type {number} */ reader.readUint64(); msg.setVolume(value); break; case 3: var value = /** @type {number} */ reader.readUint64(); msg.setUpdatedBlockHeight(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.marker.v1.NetAssetValue.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.marker.v1.NetAssetValue.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.marker.v1.NetAssetValue} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.NetAssetValue.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getPrice(); if (f != null) { writer.writeMessage(1, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter); } f = message.getVolume(); if (f !== 0) { writer.writeUint64(2, f); } f = message.getUpdatedBlockHeight(); if (f !== 0) { writer.writeUint64(3, f); } }; /** * optional cosmos.base.v1beta1.Coin price = 1; * @return {?proto.cosmos.base.v1beta1.Coin} */ proto.provenance.marker.v1.NetAssetValue.prototype.getPrice = function () { return ( /** @type{?proto.cosmos.base.v1beta1.Coin} */ jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1) ); }; /** * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value * @return {!proto.provenance.marker.v1.NetAssetValue} returns this */ proto.provenance.marker.v1.NetAssetValue.prototype.setPrice = function (value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.marker.v1.NetAssetValue} returns this */ proto.provenance.marker.v1.NetAssetValue.prototype.clearPrice = function () { return this.setPrice(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.marker.v1.NetAssetValue.prototype.hasPrice = function () { return jspb.Message.getField(this, 1) != null; }; /** * optional uint64 volume = 2; * @return {number} */ proto.provenance.marker.v1.NetAssetValue.prototype.getVolume = function () { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 2, 0) ); }; /** * @param {number} value * @return {!proto.provenance.marker.v1.NetAssetValue} returns this */ proto.provenance.marker.v1.NetAssetValue.prototype.setVolume = function (value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional uint64 updated_block_height = 3; * @return {number} */ proto.provenance.marker.v1.NetAssetValue.prototype.getUpdatedBlockHeight = function () { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; /** * @param {number} value * @return {!proto.provenance.marker.v1.NetAssetValue} returns this */ proto.provenance.marker.v1.NetAssetValue.prototype.setUpdatedBlockHeight = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.marker.v1.EventMarkerAdd.prototype.toObject = function (opt_includeInstance) { return proto.provenance.marker.v1.EventMarkerAdd.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.marker.v1.EventMarkerAdd} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.EventMarkerAdd.toObject = function (includeInstance, msg) { var f, obj = { denom: jspb.Message.getFieldWithDefault(msg, 1, ""), amount: jspb.Message.getFieldWithDefault(msg, 2, ""), status: jspb.Message.getFieldWithDefault(msg, 3, ""), manager: jspb.Message.getFieldWithDefault(msg, 4, ""), markerType: jspb.Message.getFieldWithDefault(msg, 5, ""), address: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.marker.v1.EventMarkerAdd} */ proto.provenance.marker.v1.EventMarkerAdd.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.marker.v1.EventMarkerAdd(); return proto.provenance.marker.v1.EventMarkerAdd.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.marker.v1.EventMarkerAdd} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.marker.v1.EventMarkerAdd} */ proto.provenance.marker.v1.EventMarkerAdd.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ reader.readString(); msg.setDenom(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setAmount(value); break; case 3: var value = /** @type {string} */ reader.readString(); msg.setStatus(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setManager(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setMarkerType(value); break; case 6: var value = /** @type {string} */ reader.readString(); msg.setAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.marker.v1.EventMarkerAdd.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.marker.v1.EventMarkerAdd.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.marker.v1.EventMarkerAdd} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.marker.v1.EventMarkerAdd.serializeBinaryToWriter = function (message, writer) { var f = un