github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/bcm_pb.js (about)

     1  // source: bcm.proto
     2  /**
     3   * @fileoverview
     4   * @enhanceable
     5   * @suppress {missingRequire} reports error on implicit type usages.
     6   * @suppress {messageConventions} JS Compiler reports an error if a variable or
     7   *     field starts with 'MSG_' and isn't a translatable message.
     8   * @public
     9   */
    10  // GENERATED CODE -- DO NOT EDIT!
    11  /* eslint-disable */
    12  // @ts-nocheck
    13  
    14  var jspb = require('google-protobuf');
    15  var goog = jspb;
    16  var global = Function('return this')();
    17  
    18  var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js');
    19  goog.object.extend(proto, gogoproto_gogo_pb);
    20  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
    21  goog.object.extend(proto, google_protobuf_timestamp_pb);
    22  var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
    23  goog.object.extend(proto, google_protobuf_duration_pb);
    24  goog.exportSymbol('proto.bcm.PersistedState', null, global);
    25  goog.exportSymbol('proto.bcm.SyncInfo', null, global);
    26  /**
    27   * Generated by JsPbCodeGenerator.
    28   * @param {Array=} opt_data Optional initial data array, typically from a
    29   * server response, or constructed directly in Javascript. The array is used
    30   * in place and becomes part of the constructed object. It is not cloned.
    31   * If no data is provided, the constructed object will be empty, but still
    32   * valid.
    33   * @extends {jspb.Message}
    34   * @constructor
    35   */
    36  proto.bcm.SyncInfo = function(opt_data) {
    37    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
    38  };
    39  goog.inherits(proto.bcm.SyncInfo, jspb.Message);
    40  if (goog.DEBUG && !COMPILED) {
    41    /**
    42     * @public
    43     * @override
    44     */
    45    proto.bcm.SyncInfo.displayName = 'proto.bcm.SyncInfo';
    46  }
    47  /**
    48   * Generated by JsPbCodeGenerator.
    49   * @param {Array=} opt_data Optional initial data array, typically from a
    50   * server response, or constructed directly in Javascript. The array is used
    51   * in place and becomes part of the constructed object. It is not cloned.
    52   * If no data is provided, the constructed object will be empty, but still
    53   * valid.
    54   * @extends {jspb.Message}
    55   * @constructor
    56   */
    57  proto.bcm.PersistedState = function(opt_data) {
    58    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
    59  };
    60  goog.inherits(proto.bcm.PersistedState, jspb.Message);
    61  if (goog.DEBUG && !COMPILED) {
    62    /**
    63     * @public
    64     * @override
    65     */
    66    proto.bcm.PersistedState.displayName = 'proto.bcm.PersistedState';
    67  }
    68  
    69  
    70  
    71  if (jspb.Message.GENERATE_TO_OBJECT) {
    72  /**
    73   * Creates an object representation of this proto.
    74   * Field names that are reserved in JavaScript and will be renamed to pb_name.
    75   * Optional fields that are not set will be set to undefined.
    76   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
    77   * For the list of reserved names please see:
    78   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
    79   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
    80   *     JSPB instance for transitional soy proto support:
    81   *     http://goto/soy-param-migration
    82   * @return {!Object}
    83   */
    84  proto.bcm.SyncInfo.prototype.toObject = function(opt_includeInstance) {
    85    return proto.bcm.SyncInfo.toObject(opt_includeInstance, this);
    86  };
    87  
    88  
    89  /**
    90   * Static version of the {@see toObject} method.
    91   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
    92   *     the JSPB instance for transitional soy proto support:
    93   *     http://goto/soy-param-migration
    94   * @param {!proto.bcm.SyncInfo} msg The msg instance to transform.
    95   * @return {!Object}
    96   * @suppress {unusedLocalVariables} f is only used for nested messages
    97   */
    98  proto.bcm.SyncInfo.toObject = function(includeInstance, msg) {
    99    var f, obj = {
   100      latestblockheight: jspb.Message.getFieldWithDefault(msg, 1, 0),
   101      latestblockhash: msg.getLatestblockhash_asB64(),
   102      latestapphash: msg.getLatestapphash_asB64(),
   103      latestblocktime: (f = msg.getLatestblocktime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
   104      latestblockseentime: (f = msg.getLatestblockseentime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
   105      latestblockduration: (f = msg.getLatestblockduration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
   106    };
   107  
   108    if (includeInstance) {
   109      obj.$jspbMessageInstance = msg;
   110    }
   111    return obj;
   112  };
   113  }
   114  
   115  
   116  /**
   117   * Deserializes binary data (in protobuf wire format).
   118   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   119   * @return {!proto.bcm.SyncInfo}
   120   */
   121  proto.bcm.SyncInfo.deserializeBinary = function(bytes) {
   122    var reader = new jspb.BinaryReader(bytes);
   123    var msg = new proto.bcm.SyncInfo;
   124    return proto.bcm.SyncInfo.deserializeBinaryFromReader(msg, reader);
   125  };
   126  
   127  
   128  /**
   129   * Deserializes binary data (in protobuf wire format) from the
   130   * given reader into the given message object.
   131   * @param {!proto.bcm.SyncInfo} msg The message object to deserialize into.
   132   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   133   * @return {!proto.bcm.SyncInfo}
   134   */
   135  proto.bcm.SyncInfo.deserializeBinaryFromReader = function(msg, reader) {
   136    while (reader.nextField()) {
   137      if (reader.isEndGroup()) {
   138        break;
   139      }
   140      var field = reader.getFieldNumber();
   141      switch (field) {
   142      case 1:
   143        var value = /** @type {number} */ (reader.readUint64());
   144        msg.setLatestblockheight(value);
   145        break;
   146      case 2:
   147        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   148        msg.setLatestblockhash(value);
   149        break;
   150      case 3:
   151        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   152        msg.setLatestapphash(value);
   153        break;
   154      case 4:
   155        var value = new google_protobuf_timestamp_pb.Timestamp;
   156        reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
   157        msg.setLatestblocktime(value);
   158        break;
   159      case 5:
   160        var value = new google_protobuf_timestamp_pb.Timestamp;
   161        reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
   162        msg.setLatestblockseentime(value);
   163        break;
   164      case 6:
   165        var value = new google_protobuf_duration_pb.Duration;
   166        reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
   167        msg.setLatestblockduration(value);
   168        break;
   169      default:
   170        reader.skipField();
   171        break;
   172      }
   173    }
   174    return msg;
   175  };
   176  
   177  
   178  /**
   179   * Serializes the message to binary data (in protobuf wire format).
   180   * @return {!Uint8Array}
   181   */
   182  proto.bcm.SyncInfo.prototype.serializeBinary = function() {
   183    var writer = new jspb.BinaryWriter();
   184    proto.bcm.SyncInfo.serializeBinaryToWriter(this, writer);
   185    return writer.getResultBuffer();
   186  };
   187  
   188  
   189  /**
   190   * Serializes the given message to binary data (in protobuf wire
   191   * format), writing to the given BinaryWriter.
   192   * @param {!proto.bcm.SyncInfo} message
   193   * @param {!jspb.BinaryWriter} writer
   194   * @suppress {unusedLocalVariables} f is only used for nested messages
   195   */
   196  proto.bcm.SyncInfo.serializeBinaryToWriter = function(message, writer) {
   197    var f = undefined;
   198    f = message.getLatestblockheight();
   199    if (f !== 0) {
   200      writer.writeUint64(
   201        1,
   202        f
   203      );
   204    }
   205    f = message.getLatestblockhash_asU8();
   206    if (f.length > 0) {
   207      writer.writeBytes(
   208        2,
   209        f
   210      );
   211    }
   212    f = message.getLatestapphash_asU8();
   213    if (f.length > 0) {
   214      writer.writeBytes(
   215        3,
   216        f
   217      );
   218    }
   219    f = message.getLatestblocktime();
   220    if (f != null) {
   221      writer.writeMessage(
   222        4,
   223        f,
   224        google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
   225      );
   226    }
   227    f = message.getLatestblockseentime();
   228    if (f != null) {
   229      writer.writeMessage(
   230        5,
   231        f,
   232        google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
   233      );
   234    }
   235    f = message.getLatestblockduration();
   236    if (f != null) {
   237      writer.writeMessage(
   238        6,
   239        f,
   240        google_protobuf_duration_pb.Duration.serializeBinaryToWriter
   241      );
   242    }
   243  };
   244  
   245  
   246  /**
   247   * optional uint64 LatestBlockHeight = 1;
   248   * @return {number}
   249   */
   250  proto.bcm.SyncInfo.prototype.getLatestblockheight = function() {
   251    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
   252  };
   253  
   254  
   255  /**
   256   * @param {number} value
   257   * @return {!proto.bcm.SyncInfo} returns this
   258   */
   259  proto.bcm.SyncInfo.prototype.setLatestblockheight = function(value) {
   260    return jspb.Message.setProto3IntField(this, 1, value);
   261  };
   262  
   263  
   264  /**
   265   * optional bytes LatestBlockHash = 2;
   266   * @return {!(string|Uint8Array)}
   267   */
   268  proto.bcm.SyncInfo.prototype.getLatestblockhash = function() {
   269    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   270  };
   271  
   272  
   273  /**
   274   * optional bytes LatestBlockHash = 2;
   275   * This is a type-conversion wrapper around `getLatestblockhash()`
   276   * @return {string}
   277   */
   278  proto.bcm.SyncInfo.prototype.getLatestblockhash_asB64 = function() {
   279    return /** @type {string} */ (jspb.Message.bytesAsB64(
   280        this.getLatestblockhash()));
   281  };
   282  
   283  
   284  /**
   285   * optional bytes LatestBlockHash = 2;
   286   * Note that Uint8Array is not supported on all browsers.
   287   * @see http://caniuse.com/Uint8Array
   288   * This is a type-conversion wrapper around `getLatestblockhash()`
   289   * @return {!Uint8Array}
   290   */
   291  proto.bcm.SyncInfo.prototype.getLatestblockhash_asU8 = function() {
   292    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   293        this.getLatestblockhash()));
   294  };
   295  
   296  
   297  /**
   298   * @param {!(string|Uint8Array)} value
   299   * @return {!proto.bcm.SyncInfo} returns this
   300   */
   301  proto.bcm.SyncInfo.prototype.setLatestblockhash = function(value) {
   302    return jspb.Message.setProto3BytesField(this, 2, value);
   303  };
   304  
   305  
   306  /**
   307   * optional bytes LatestAppHash = 3;
   308   * @return {!(string|Uint8Array)}
   309   */
   310  proto.bcm.SyncInfo.prototype.getLatestapphash = function() {
   311    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
   312  };
   313  
   314  
   315  /**
   316   * optional bytes LatestAppHash = 3;
   317   * This is a type-conversion wrapper around `getLatestapphash()`
   318   * @return {string}
   319   */
   320  proto.bcm.SyncInfo.prototype.getLatestapphash_asB64 = function() {
   321    return /** @type {string} */ (jspb.Message.bytesAsB64(
   322        this.getLatestapphash()));
   323  };
   324  
   325  
   326  /**
   327   * optional bytes LatestAppHash = 3;
   328   * Note that Uint8Array is not supported on all browsers.
   329   * @see http://caniuse.com/Uint8Array
   330   * This is a type-conversion wrapper around `getLatestapphash()`
   331   * @return {!Uint8Array}
   332   */
   333  proto.bcm.SyncInfo.prototype.getLatestapphash_asU8 = function() {
   334    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   335        this.getLatestapphash()));
   336  };
   337  
   338  
   339  /**
   340   * @param {!(string|Uint8Array)} value
   341   * @return {!proto.bcm.SyncInfo} returns this
   342   */
   343  proto.bcm.SyncInfo.prototype.setLatestapphash = function(value) {
   344    return jspb.Message.setProto3BytesField(this, 3, value);
   345  };
   346  
   347  
   348  /**
   349   * optional google.protobuf.Timestamp LatestBlockTime = 4;
   350   * @return {?proto.google.protobuf.Timestamp}
   351   */
   352  proto.bcm.SyncInfo.prototype.getLatestblocktime = function() {
   353    return /** @type{?proto.google.protobuf.Timestamp} */ (
   354      jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
   355  };
   356  
   357  
   358  /**
   359   * @param {?proto.google.protobuf.Timestamp|undefined} value
   360   * @return {!proto.bcm.SyncInfo} returns this
   361  */
   362  proto.bcm.SyncInfo.prototype.setLatestblocktime = function(value) {
   363    return jspb.Message.setWrapperField(this, 4, value);
   364  };
   365  
   366  
   367  /**
   368   * Clears the message field making it undefined.
   369   * @return {!proto.bcm.SyncInfo} returns this
   370   */
   371  proto.bcm.SyncInfo.prototype.clearLatestblocktime = function() {
   372    return this.setLatestblocktime(undefined);
   373  };
   374  
   375  
   376  /**
   377   * Returns whether this field is set.
   378   * @return {boolean}
   379   */
   380  proto.bcm.SyncInfo.prototype.hasLatestblocktime = function() {
   381    return jspb.Message.getField(this, 4) != null;
   382  };
   383  
   384  
   385  /**
   386   * optional google.protobuf.Timestamp LatestBlockSeenTime = 5;
   387   * @return {?proto.google.protobuf.Timestamp}
   388   */
   389  proto.bcm.SyncInfo.prototype.getLatestblockseentime = function() {
   390    return /** @type{?proto.google.protobuf.Timestamp} */ (
   391      jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
   392  };
   393  
   394  
   395  /**
   396   * @param {?proto.google.protobuf.Timestamp|undefined} value
   397   * @return {!proto.bcm.SyncInfo} returns this
   398  */
   399  proto.bcm.SyncInfo.prototype.setLatestblockseentime = function(value) {
   400    return jspb.Message.setWrapperField(this, 5, value);
   401  };
   402  
   403  
   404  /**
   405   * Clears the message field making it undefined.
   406   * @return {!proto.bcm.SyncInfo} returns this
   407   */
   408  proto.bcm.SyncInfo.prototype.clearLatestblockseentime = function() {
   409    return this.setLatestblockseentime(undefined);
   410  };
   411  
   412  
   413  /**
   414   * Returns whether this field is set.
   415   * @return {boolean}
   416   */
   417  proto.bcm.SyncInfo.prototype.hasLatestblockseentime = function() {
   418    return jspb.Message.getField(this, 5) != null;
   419  };
   420  
   421  
   422  /**
   423   * optional google.protobuf.Duration LatestBlockDuration = 6;
   424   * @return {?proto.google.protobuf.Duration}
   425   */
   426  proto.bcm.SyncInfo.prototype.getLatestblockduration = function() {
   427    return /** @type{?proto.google.protobuf.Duration} */ (
   428      jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 6));
   429  };
   430  
   431  
   432  /**
   433   * @param {?proto.google.protobuf.Duration|undefined} value
   434   * @return {!proto.bcm.SyncInfo} returns this
   435  */
   436  proto.bcm.SyncInfo.prototype.setLatestblockduration = function(value) {
   437    return jspb.Message.setWrapperField(this, 6, value);
   438  };
   439  
   440  
   441  /**
   442   * Clears the message field making it undefined.
   443   * @return {!proto.bcm.SyncInfo} returns this
   444   */
   445  proto.bcm.SyncInfo.prototype.clearLatestblockduration = function() {
   446    return this.setLatestblockduration(undefined);
   447  };
   448  
   449  
   450  /**
   451   * Returns whether this field is set.
   452   * @return {boolean}
   453   */
   454  proto.bcm.SyncInfo.prototype.hasLatestblockduration = function() {
   455    return jspb.Message.getField(this, 6) != null;
   456  };
   457  
   458  
   459  
   460  
   461  
   462  if (jspb.Message.GENERATE_TO_OBJECT) {
   463  /**
   464   * Creates an object representation of this proto.
   465   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   466   * Optional fields that are not set will be set to undefined.
   467   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   468   * For the list of reserved names please see:
   469   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   470   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   471   *     JSPB instance for transitional soy proto support:
   472   *     http://goto/soy-param-migration
   473   * @return {!Object}
   474   */
   475  proto.bcm.PersistedState.prototype.toObject = function(opt_includeInstance) {
   476    return proto.bcm.PersistedState.toObject(opt_includeInstance, this);
   477  };
   478  
   479  
   480  /**
   481   * Static version of the {@see toObject} method.
   482   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   483   *     the JSPB instance for transitional soy proto support:
   484   *     http://goto/soy-param-migration
   485   * @param {!proto.bcm.PersistedState} msg The msg instance to transform.
   486   * @return {!Object}
   487   * @suppress {unusedLocalVariables} f is only used for nested messages
   488   */
   489  proto.bcm.PersistedState.toObject = function(includeInstance, msg) {
   490    var f, obj = {
   491      apphashafterlastblock: msg.getApphashafterlastblock_asB64(),
   492      lastblocktime: (f = msg.getLastblocktime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
   493      lastblockheight: jspb.Message.getFieldWithDefault(msg, 3, 0),
   494      genesishash: msg.getGenesishash_asB64()
   495    };
   496  
   497    if (includeInstance) {
   498      obj.$jspbMessageInstance = msg;
   499    }
   500    return obj;
   501  };
   502  }
   503  
   504  
   505  /**
   506   * Deserializes binary data (in protobuf wire format).
   507   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   508   * @return {!proto.bcm.PersistedState}
   509   */
   510  proto.bcm.PersistedState.deserializeBinary = function(bytes) {
   511    var reader = new jspb.BinaryReader(bytes);
   512    var msg = new proto.bcm.PersistedState;
   513    return proto.bcm.PersistedState.deserializeBinaryFromReader(msg, reader);
   514  };
   515  
   516  
   517  /**
   518   * Deserializes binary data (in protobuf wire format) from the
   519   * given reader into the given message object.
   520   * @param {!proto.bcm.PersistedState} msg The message object to deserialize into.
   521   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   522   * @return {!proto.bcm.PersistedState}
   523   */
   524  proto.bcm.PersistedState.deserializeBinaryFromReader = function(msg, reader) {
   525    while (reader.nextField()) {
   526      if (reader.isEndGroup()) {
   527        break;
   528      }
   529      var field = reader.getFieldNumber();
   530      switch (field) {
   531      case 1:
   532        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   533        msg.setApphashafterlastblock(value);
   534        break;
   535      case 2:
   536        var value = new google_protobuf_timestamp_pb.Timestamp;
   537        reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
   538        msg.setLastblocktime(value);
   539        break;
   540      case 3:
   541        var value = /** @type {number} */ (reader.readUint64());
   542        msg.setLastblockheight(value);
   543        break;
   544      case 4:
   545        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   546        msg.setGenesishash(value);
   547        break;
   548      default:
   549        reader.skipField();
   550        break;
   551      }
   552    }
   553    return msg;
   554  };
   555  
   556  
   557  /**
   558   * Serializes the message to binary data (in protobuf wire format).
   559   * @return {!Uint8Array}
   560   */
   561  proto.bcm.PersistedState.prototype.serializeBinary = function() {
   562    var writer = new jspb.BinaryWriter();
   563    proto.bcm.PersistedState.serializeBinaryToWriter(this, writer);
   564    return writer.getResultBuffer();
   565  };
   566  
   567  
   568  /**
   569   * Serializes the given message to binary data (in protobuf wire
   570   * format), writing to the given BinaryWriter.
   571   * @param {!proto.bcm.PersistedState} message
   572   * @param {!jspb.BinaryWriter} writer
   573   * @suppress {unusedLocalVariables} f is only used for nested messages
   574   */
   575  proto.bcm.PersistedState.serializeBinaryToWriter = function(message, writer) {
   576    var f = undefined;
   577    f = message.getApphashafterlastblock_asU8();
   578    if (f.length > 0) {
   579      writer.writeBytes(
   580        1,
   581        f
   582      );
   583    }
   584    f = message.getLastblocktime();
   585    if (f != null) {
   586      writer.writeMessage(
   587        2,
   588        f,
   589        google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
   590      );
   591    }
   592    f = message.getLastblockheight();
   593    if (f !== 0) {
   594      writer.writeUint64(
   595        3,
   596        f
   597      );
   598    }
   599    f = message.getGenesishash_asU8();
   600    if (f.length > 0) {
   601      writer.writeBytes(
   602        4,
   603        f
   604      );
   605    }
   606  };
   607  
   608  
   609  /**
   610   * optional bytes AppHashAfterLastBlock = 1;
   611   * @return {!(string|Uint8Array)}
   612   */
   613  proto.bcm.PersistedState.prototype.getApphashafterlastblock = function() {
   614    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
   615  };
   616  
   617  
   618  /**
   619   * optional bytes AppHashAfterLastBlock = 1;
   620   * This is a type-conversion wrapper around `getApphashafterlastblock()`
   621   * @return {string}
   622   */
   623  proto.bcm.PersistedState.prototype.getApphashafterlastblock_asB64 = function() {
   624    return /** @type {string} */ (jspb.Message.bytesAsB64(
   625        this.getApphashafterlastblock()));
   626  };
   627  
   628  
   629  /**
   630   * optional bytes AppHashAfterLastBlock = 1;
   631   * Note that Uint8Array is not supported on all browsers.
   632   * @see http://caniuse.com/Uint8Array
   633   * This is a type-conversion wrapper around `getApphashafterlastblock()`
   634   * @return {!Uint8Array}
   635   */
   636  proto.bcm.PersistedState.prototype.getApphashafterlastblock_asU8 = function() {
   637    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   638        this.getApphashafterlastblock()));
   639  };
   640  
   641  
   642  /**
   643   * @param {!(string|Uint8Array)} value
   644   * @return {!proto.bcm.PersistedState} returns this
   645   */
   646  proto.bcm.PersistedState.prototype.setApphashafterlastblock = function(value) {
   647    return jspb.Message.setProto3BytesField(this, 1, value);
   648  };
   649  
   650  
   651  /**
   652   * optional google.protobuf.Timestamp LastBlockTime = 2;
   653   * @return {?proto.google.protobuf.Timestamp}
   654   */
   655  proto.bcm.PersistedState.prototype.getLastblocktime = function() {
   656    return /** @type{?proto.google.protobuf.Timestamp} */ (
   657      jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
   658  };
   659  
   660  
   661  /**
   662   * @param {?proto.google.protobuf.Timestamp|undefined} value
   663   * @return {!proto.bcm.PersistedState} returns this
   664  */
   665  proto.bcm.PersistedState.prototype.setLastblocktime = function(value) {
   666    return jspb.Message.setWrapperField(this, 2, value);
   667  };
   668  
   669  
   670  /**
   671   * Clears the message field making it undefined.
   672   * @return {!proto.bcm.PersistedState} returns this
   673   */
   674  proto.bcm.PersistedState.prototype.clearLastblocktime = function() {
   675    return this.setLastblocktime(undefined);
   676  };
   677  
   678  
   679  /**
   680   * Returns whether this field is set.
   681   * @return {boolean}
   682   */
   683  proto.bcm.PersistedState.prototype.hasLastblocktime = function() {
   684    return jspb.Message.getField(this, 2) != null;
   685  };
   686  
   687  
   688  /**
   689   * optional uint64 LastBlockHeight = 3;
   690   * @return {number}
   691   */
   692  proto.bcm.PersistedState.prototype.getLastblockheight = function() {
   693    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
   694  };
   695  
   696  
   697  /**
   698   * @param {number} value
   699   * @return {!proto.bcm.PersistedState} returns this
   700   */
   701  proto.bcm.PersistedState.prototype.setLastblockheight = function(value) {
   702    return jspb.Message.setProto3IntField(this, 3, value);
   703  };
   704  
   705  
   706  /**
   707   * optional bytes GenesisHash = 4;
   708   * @return {!(string|Uint8Array)}
   709   */
   710  proto.bcm.PersistedState.prototype.getGenesishash = function() {
   711    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
   712  };
   713  
   714  
   715  /**
   716   * optional bytes GenesisHash = 4;
   717   * This is a type-conversion wrapper around `getGenesishash()`
   718   * @return {string}
   719   */
   720  proto.bcm.PersistedState.prototype.getGenesishash_asB64 = function() {
   721    return /** @type {string} */ (jspb.Message.bytesAsB64(
   722        this.getGenesishash()));
   723  };
   724  
   725  
   726  /**
   727   * optional bytes GenesisHash = 4;
   728   * Note that Uint8Array is not supported on all browsers.
   729   * @see http://caniuse.com/Uint8Array
   730   * This is a type-conversion wrapper around `getGenesishash()`
   731   * @return {!Uint8Array}
   732   */
   733  proto.bcm.PersistedState.prototype.getGenesishash_asU8 = function() {
   734    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   735        this.getGenesishash()));
   736  };
   737  
   738  
   739  /**
   740   * @param {!(string|Uint8Array)} value
   741   * @return {!proto.bcm.PersistedState} returns this
   742   */
   743  proto.bcm.PersistedState.prototype.setGenesishash = function(value) {
   744    return jspb.Message.setProto3BytesField(this, 4, value);
   745  };
   746  
   747  
   748  goog.object.extend(exports, proto.bcm);