UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

476 lines (408 loc) 19.8 kB
// source: routerprotocol/routerchain/attestation/genesis.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')(); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var routerprotocol_routerchain_attestation_params_pb = require('../../../routerprotocol/routerchain/attestation/params_pb.js'); goog.object.extend(proto, routerprotocol_routerchain_attestation_params_pb); var routerprotocol_routerchain_attestation_valset_pb = require('../../../routerprotocol/routerchain/attestation/valset_pb.js'); goog.object.extend(proto, routerprotocol_routerchain_attestation_valset_pb); var routerprotocol_routerchain_attestation_attestation_pb = require('../../../routerprotocol/routerchain/attestation/attestation_pb.js'); goog.object.extend(proto, routerprotocol_routerchain_attestation_attestation_pb); var routerprotocol_routerchain_attestation_valset_confirmation_pb = require('../../../routerprotocol/routerchain/attestation/valset_confirmation_pb.js'); goog.object.extend(proto, routerprotocol_routerchain_attestation_valset_confirmation_pb); var routerprotocol_routerchain_attestation_valset_updated_claim_pb = require('../../../routerprotocol/routerchain/attestation/valset_updated_claim_pb.js'); goog.object.extend(proto, routerprotocol_routerchain_attestation_valset_updated_claim_pb); goog.exportSymbol('proto.routerprotocol.routerchain.attestation.GenesisState', 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.routerprotocol.routerchain.attestation.GenesisState = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.routerprotocol.routerchain.attestation.GenesisState.repeatedFields_, null); }; goog.inherits(proto.routerprotocol.routerchain.attestation.GenesisState, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.attestation.GenesisState.displayName = 'proto.routerprotocol.routerchain.attestation.GenesisState'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.routerprotocol.routerchain.attestation.GenesisState.repeatedFields_ = [2,3,4,5,6]; 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.routerprotocol.routerchain.attestation.GenesisState.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.attestation.GenesisState.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.routerprotocol.routerchain.attestation.GenesisState} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.attestation.GenesisState.toObject = function(includeInstance, msg) { var f, obj = { params: (f = msg.getParams()) && routerprotocol_routerchain_attestation_params_pb.Params.toObject(includeInstance, f), valsetlistList: jspb.Message.toObjectList(msg.getValsetlistList(), routerprotocol_routerchain_attestation_valset_pb.Valset.toObject, includeInstance), attestationlistList: jspb.Message.toObjectList(msg.getAttestationlistList(), routerprotocol_routerchain_attestation_attestation_pb.Attestation.toObject, includeInstance), valsetconfirmationlistList: jspb.Message.toObjectList(msg.getValsetconfirmationlistList(), routerprotocol_routerchain_attestation_valset_confirmation_pb.ValsetConfirmation.toObject, includeInstance), valsetupdatedclaimlistList: jspb.Message.toObjectList(msg.getValsetupdatedclaimlistList(), routerprotocol_routerchain_attestation_valset_updated_claim_pb.ValsetUpdatedClaim.toObject, includeInstance), observedattestationlistList: jspb.Message.toObjectList(msg.getObservedattestationlistList(), routerprotocol_routerchain_attestation_attestation_pb.Attestation.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} */ proto.routerprotocol.routerchain.attestation.GenesisState.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.attestation.GenesisState; return proto.routerprotocol.routerchain.attestation.GenesisState.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.attestation.GenesisState} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} */ proto.routerprotocol.routerchain.attestation.GenesisState.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new routerprotocol_routerchain_attestation_params_pb.Params; reader.readMessage(value,routerprotocol_routerchain_attestation_params_pb.Params.deserializeBinaryFromReader); msg.setParams(value); break; case 2: var value = new routerprotocol_routerchain_attestation_valset_pb.Valset; reader.readMessage(value,routerprotocol_routerchain_attestation_valset_pb.Valset.deserializeBinaryFromReader); msg.addValsetlist(value); break; case 3: var value = new routerprotocol_routerchain_attestation_attestation_pb.Attestation; reader.readMessage(value,routerprotocol_routerchain_attestation_attestation_pb.Attestation.deserializeBinaryFromReader); msg.addAttestationlist(value); break; case 4: var value = new routerprotocol_routerchain_attestation_valset_confirmation_pb.ValsetConfirmation; reader.readMessage(value,routerprotocol_routerchain_attestation_valset_confirmation_pb.ValsetConfirmation.deserializeBinaryFromReader); msg.addValsetconfirmationlist(value); break; case 5: var value = new routerprotocol_routerchain_attestation_valset_updated_claim_pb.ValsetUpdatedClaim; reader.readMessage(value,routerprotocol_routerchain_attestation_valset_updated_claim_pb.ValsetUpdatedClaim.deserializeBinaryFromReader); msg.addValsetupdatedclaimlist(value); break; case 6: var value = new routerprotocol_routerchain_attestation_attestation_pb.Attestation; reader.readMessage(value,routerprotocol_routerchain_attestation_attestation_pb.Attestation.deserializeBinaryFromReader); msg.addObservedattestationlist(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.attestation.GenesisState.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.routerprotocol.routerchain.attestation.GenesisState} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.attestation.GenesisState.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getParams(); if (f != null) { writer.writeMessage( 1, f, routerprotocol_routerchain_attestation_params_pb.Params.serializeBinaryToWriter ); } f = message.getValsetlistList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, routerprotocol_routerchain_attestation_valset_pb.Valset.serializeBinaryToWriter ); } f = message.getAttestationlistList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, routerprotocol_routerchain_attestation_attestation_pb.Attestation.serializeBinaryToWriter ); } f = message.getValsetconfirmationlistList(); if (f.length > 0) { writer.writeRepeatedMessage( 4, f, routerprotocol_routerchain_attestation_valset_confirmation_pb.ValsetConfirmation.serializeBinaryToWriter ); } f = message.getValsetupdatedclaimlistList(); if (f.length > 0) { writer.writeRepeatedMessage( 5, f, routerprotocol_routerchain_attestation_valset_updated_claim_pb.ValsetUpdatedClaim.serializeBinaryToWriter ); } f = message.getObservedattestationlistList(); if (f.length > 0) { writer.writeRepeatedMessage( 6, f, routerprotocol_routerchain_attestation_attestation_pb.Attestation.serializeBinaryToWriter ); } }; /** * optional Params params = 1; * @return {?proto.routerprotocol.routerchain.attestation.Params} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.getParams = function() { return /** @type{?proto.routerprotocol.routerchain.attestation.Params} */ ( jspb.Message.getWrapperField(this, routerprotocol_routerchain_attestation_params_pb.Params, 1)); }; /** * @param {?proto.routerprotocol.routerchain.attestation.Params|undefined} value * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.clearParams = function() { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.hasParams = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated Valset valsetList = 2; * @return {!Array<!proto.routerprotocol.routerchain.attestation.Valset>} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.getValsetlistList = function() { return /** @type{!Array<!proto.routerprotocol.routerchain.attestation.Valset>} */ ( jspb.Message.getRepeatedWrapperField(this, routerprotocol_routerchain_attestation_valset_pb.Valset, 2)); }; /** * @param {!Array<!proto.routerprotocol.routerchain.attestation.Valset>} value * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.setValsetlistList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.routerprotocol.routerchain.attestation.Valset=} opt_value * @param {number=} opt_index * @return {!proto.routerprotocol.routerchain.attestation.Valset} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.addValsetlist = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.routerprotocol.routerchain.attestation.Valset, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.clearValsetlistList = function() { return this.setValsetlistList([]); }; /** * repeated Attestation attestationList = 3; * @return {!Array<!proto.routerprotocol.routerchain.attestation.Attestation>} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.getAttestationlistList = function() { return /** @type{!Array<!proto.routerprotocol.routerchain.attestation.Attestation>} */ ( jspb.Message.getRepeatedWrapperField(this, routerprotocol_routerchain_attestation_attestation_pb.Attestation, 3)); }; /** * @param {!Array<!proto.routerprotocol.routerchain.attestation.Attestation>} value * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.setAttestationlistList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.routerprotocol.routerchain.attestation.Attestation=} opt_value * @param {number=} opt_index * @return {!proto.routerprotocol.routerchain.attestation.Attestation} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.addAttestationlist = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.routerprotocol.routerchain.attestation.Attestation, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.clearAttestationlistList = function() { return this.setAttestationlistList([]); }; /** * repeated ValsetConfirmation valsetConfirmationList = 4; * @return {!Array<!proto.routerprotocol.routerchain.attestation.ValsetConfirmation>} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.getValsetconfirmationlistList = function() { return /** @type{!Array<!proto.routerprotocol.routerchain.attestation.ValsetConfirmation>} */ ( jspb.Message.getRepeatedWrapperField(this, routerprotocol_routerchain_attestation_valset_confirmation_pb.ValsetConfirmation, 4)); }; /** * @param {!Array<!proto.routerprotocol.routerchain.attestation.ValsetConfirmation>} value * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.setValsetconfirmationlistList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** * @param {!proto.routerprotocol.routerchain.attestation.ValsetConfirmation=} opt_value * @param {number=} opt_index * @return {!proto.routerprotocol.routerchain.attestation.ValsetConfirmation} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.addValsetconfirmationlist = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.routerprotocol.routerchain.attestation.ValsetConfirmation, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.clearValsetconfirmationlistList = function() { return this.setValsetconfirmationlistList([]); }; /** * repeated ValsetUpdatedClaim valsetUpdatedClaimList = 5; * @return {!Array<!proto.routerprotocol.routerchain.attestation.ValsetUpdatedClaim>} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.getValsetupdatedclaimlistList = function() { return /** @type{!Array<!proto.routerprotocol.routerchain.attestation.ValsetUpdatedClaim>} */ ( jspb.Message.getRepeatedWrapperField(this, routerprotocol_routerchain_attestation_valset_updated_claim_pb.ValsetUpdatedClaim, 5)); }; /** * @param {!Array<!proto.routerprotocol.routerchain.attestation.ValsetUpdatedClaim>} value * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.setValsetupdatedclaimlistList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** * @param {!proto.routerprotocol.routerchain.attestation.ValsetUpdatedClaim=} opt_value * @param {number=} opt_index * @return {!proto.routerprotocol.routerchain.attestation.ValsetUpdatedClaim} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.addValsetupdatedclaimlist = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.routerprotocol.routerchain.attestation.ValsetUpdatedClaim, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.clearValsetupdatedclaimlistList = function() { return this.setValsetupdatedclaimlistList([]); }; /** * repeated Attestation observedAttestationList = 6; * @return {!Array<!proto.routerprotocol.routerchain.attestation.Attestation>} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.getObservedattestationlistList = function() { return /** @type{!Array<!proto.routerprotocol.routerchain.attestation.Attestation>} */ ( jspb.Message.getRepeatedWrapperField(this, routerprotocol_routerchain_attestation_attestation_pb.Attestation, 6)); }; /** * @param {!Array<!proto.routerprotocol.routerchain.attestation.Attestation>} value * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.setObservedattestationlistList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 6, value); }; /** * @param {!proto.routerprotocol.routerchain.attestation.Attestation=} opt_value * @param {number=} opt_index * @return {!proto.routerprotocol.routerchain.attestation.Attestation} */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.addObservedattestationlist = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.routerprotocol.routerchain.attestation.Attestation, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.routerprotocol.routerchain.attestation.GenesisState} returns this */ proto.routerprotocol.routerchain.attestation.GenesisState.prototype.clearObservedattestationlistList = function() { return this.setObservedattestationlistList([]); }; goog.object.extend(exports, proto.routerprotocol.routerchain.attestation);