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

     1  // source: txs.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 crypto_pb = require('./crypto_pb.js');
    21  goog.object.extend(proto, crypto_pb);
    22  goog.exportSymbol('proto.txs.Envelope', null, global);
    23  goog.exportSymbol('proto.txs.Envelope.EncodingType', null, global);
    24  goog.exportSymbol('proto.txs.Receipt', null, global);
    25  goog.exportSymbol('proto.txs.Signatory', 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.txs.Envelope = function(opt_data) {
    37    jspb.Message.initialize(this, opt_data, 0, -1, proto.txs.Envelope.repeatedFields_, null);
    38  };
    39  goog.inherits(proto.txs.Envelope, jspb.Message);
    40  if (goog.DEBUG && !COMPILED) {
    41    /**
    42     * @public
    43     * @override
    44     */
    45    proto.txs.Envelope.displayName = 'proto.txs.Envelope';
    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.txs.Signatory = function(opt_data) {
    58    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
    59  };
    60  goog.inherits(proto.txs.Signatory, jspb.Message);
    61  if (goog.DEBUG && !COMPILED) {
    62    /**
    63     * @public
    64     * @override
    65     */
    66    proto.txs.Signatory.displayName = 'proto.txs.Signatory';
    67  }
    68  /**
    69   * Generated by JsPbCodeGenerator.
    70   * @param {Array=} opt_data Optional initial data array, typically from a
    71   * server response, or constructed directly in Javascript. The array is used
    72   * in place and becomes part of the constructed object. It is not cloned.
    73   * If no data is provided, the constructed object will be empty, but still
    74   * valid.
    75   * @extends {jspb.Message}
    76   * @constructor
    77   */
    78  proto.txs.Receipt = function(opt_data) {
    79    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
    80  };
    81  goog.inherits(proto.txs.Receipt, jspb.Message);
    82  if (goog.DEBUG && !COMPILED) {
    83    /**
    84     * @public
    85     * @override
    86     */
    87    proto.txs.Receipt.displayName = 'proto.txs.Receipt';
    88  }
    89  
    90  /**
    91   * List of repeated fields within this message type.
    92   * @private {!Array<number>}
    93   * @const
    94   */
    95  proto.txs.Envelope.repeatedFields_ = [1];
    96  
    97  
    98  
    99  if (jspb.Message.GENERATE_TO_OBJECT) {
   100  /**
   101   * Creates an object representation of this proto.
   102   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   103   * Optional fields that are not set will be set to undefined.
   104   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   105   * For the list of reserved names please see:
   106   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   107   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   108   *     JSPB instance for transitional soy proto support:
   109   *     http://goto/soy-param-migration
   110   * @return {!Object}
   111   */
   112  proto.txs.Envelope.prototype.toObject = function(opt_includeInstance) {
   113    return proto.txs.Envelope.toObject(opt_includeInstance, this);
   114  };
   115  
   116  
   117  /**
   118   * Static version of the {@see toObject} method.
   119   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   120   *     the JSPB instance for transitional soy proto support:
   121   *     http://goto/soy-param-migration
   122   * @param {!proto.txs.Envelope} msg The msg instance to transform.
   123   * @return {!Object}
   124   * @suppress {unusedLocalVariables} f is only used for nested messages
   125   */
   126  proto.txs.Envelope.toObject = function(includeInstance, msg) {
   127    var f, obj = {
   128      signatoriesList: jspb.Message.toObjectList(msg.getSignatoriesList(),
   129      proto.txs.Signatory.toObject, includeInstance),
   130      tx: msg.getTx_asB64(),
   131      encoding: jspb.Message.getFieldWithDefault(msg, 3, 0)
   132    };
   133  
   134    if (includeInstance) {
   135      obj.$jspbMessageInstance = msg;
   136    }
   137    return obj;
   138  };
   139  }
   140  
   141  
   142  /**
   143   * Deserializes binary data (in protobuf wire format).
   144   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   145   * @return {!proto.txs.Envelope}
   146   */
   147  proto.txs.Envelope.deserializeBinary = function(bytes) {
   148    var reader = new jspb.BinaryReader(bytes);
   149    var msg = new proto.txs.Envelope;
   150    return proto.txs.Envelope.deserializeBinaryFromReader(msg, reader);
   151  };
   152  
   153  
   154  /**
   155   * Deserializes binary data (in protobuf wire format) from the
   156   * given reader into the given message object.
   157   * @param {!proto.txs.Envelope} msg The message object to deserialize into.
   158   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   159   * @return {!proto.txs.Envelope}
   160   */
   161  proto.txs.Envelope.deserializeBinaryFromReader = function(msg, reader) {
   162    while (reader.nextField()) {
   163      if (reader.isEndGroup()) {
   164        break;
   165      }
   166      var field = reader.getFieldNumber();
   167      switch (field) {
   168      case 1:
   169        var value = new proto.txs.Signatory;
   170        reader.readMessage(value,proto.txs.Signatory.deserializeBinaryFromReader);
   171        msg.addSignatories(value);
   172        break;
   173      case 2:
   174        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   175        msg.setTx(value);
   176        break;
   177      case 3:
   178        var value = /** @type {!proto.txs.Envelope.EncodingType} */ (reader.readEnum());
   179        msg.setEncoding(value);
   180        break;
   181      default:
   182        reader.skipField();
   183        break;
   184      }
   185    }
   186    return msg;
   187  };
   188  
   189  
   190  /**
   191   * Serializes the message to binary data (in protobuf wire format).
   192   * @return {!Uint8Array}
   193   */
   194  proto.txs.Envelope.prototype.serializeBinary = function() {
   195    var writer = new jspb.BinaryWriter();
   196    proto.txs.Envelope.serializeBinaryToWriter(this, writer);
   197    return writer.getResultBuffer();
   198  };
   199  
   200  
   201  /**
   202   * Serializes the given message to binary data (in protobuf wire
   203   * format), writing to the given BinaryWriter.
   204   * @param {!proto.txs.Envelope} message
   205   * @param {!jspb.BinaryWriter} writer
   206   * @suppress {unusedLocalVariables} f is only used for nested messages
   207   */
   208  proto.txs.Envelope.serializeBinaryToWriter = function(message, writer) {
   209    var f = undefined;
   210    f = message.getSignatoriesList();
   211    if (f.length > 0) {
   212      writer.writeRepeatedMessage(
   213        1,
   214        f,
   215        proto.txs.Signatory.serializeBinaryToWriter
   216      );
   217    }
   218    f = message.getTx_asU8();
   219    if (f.length > 0) {
   220      writer.writeBytes(
   221        2,
   222        f
   223      );
   224    }
   225    f = message.getEncoding();
   226    if (f !== 0.0) {
   227      writer.writeEnum(
   228        3,
   229        f
   230      );
   231    }
   232  };
   233  
   234  
   235  /**
   236   * @enum {number}
   237   */
   238  proto.txs.Envelope.EncodingType = {
   239    JSON: 0,
   240    RLP: 1
   241  };
   242  
   243  /**
   244   * repeated Signatory Signatories = 1;
   245   * @return {!Array<!proto.txs.Signatory>}
   246   */
   247  proto.txs.Envelope.prototype.getSignatoriesList = function() {
   248    return /** @type{!Array<!proto.txs.Signatory>} */ (
   249      jspb.Message.getRepeatedWrapperField(this, proto.txs.Signatory, 1));
   250  };
   251  
   252  
   253  /**
   254   * @param {!Array<!proto.txs.Signatory>} value
   255   * @return {!proto.txs.Envelope} returns this
   256  */
   257  proto.txs.Envelope.prototype.setSignatoriesList = function(value) {
   258    return jspb.Message.setRepeatedWrapperField(this, 1, value);
   259  };
   260  
   261  
   262  /**
   263   * @param {!proto.txs.Signatory=} opt_value
   264   * @param {number=} opt_index
   265   * @return {!proto.txs.Signatory}
   266   */
   267  proto.txs.Envelope.prototype.addSignatories = function(opt_value, opt_index) {
   268    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.txs.Signatory, opt_index);
   269  };
   270  
   271  
   272  /**
   273   * Clears the list making it empty but non-null.
   274   * @return {!proto.txs.Envelope} returns this
   275   */
   276  proto.txs.Envelope.prototype.clearSignatoriesList = function() {
   277    return this.setSignatoriesList([]);
   278  };
   279  
   280  
   281  /**
   282   * optional bytes Tx = 2;
   283   * @return {!(string|Uint8Array)}
   284   */
   285  proto.txs.Envelope.prototype.getTx = function() {
   286    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   287  };
   288  
   289  
   290  /**
   291   * optional bytes Tx = 2;
   292   * This is a type-conversion wrapper around `getTx()`
   293   * @return {string}
   294   */
   295  proto.txs.Envelope.prototype.getTx_asB64 = function() {
   296    return /** @type {string} */ (jspb.Message.bytesAsB64(
   297        this.getTx()));
   298  };
   299  
   300  
   301  /**
   302   * optional bytes Tx = 2;
   303   * Note that Uint8Array is not supported on all browsers.
   304   * @see http://caniuse.com/Uint8Array
   305   * This is a type-conversion wrapper around `getTx()`
   306   * @return {!Uint8Array}
   307   */
   308  proto.txs.Envelope.prototype.getTx_asU8 = function() {
   309    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   310        this.getTx()));
   311  };
   312  
   313  
   314  /**
   315   * @param {!(string|Uint8Array)} value
   316   * @return {!proto.txs.Envelope} returns this
   317   */
   318  proto.txs.Envelope.prototype.setTx = function(value) {
   319    return jspb.Message.setProto3BytesField(this, 2, value);
   320  };
   321  
   322  
   323  /**
   324   * optional EncodingType Encoding = 3;
   325   * @return {!proto.txs.Envelope.EncodingType}
   326   */
   327  proto.txs.Envelope.prototype.getEncoding = function() {
   328    return /** @type {!proto.txs.Envelope.EncodingType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
   329  };
   330  
   331  
   332  /**
   333   * @param {!proto.txs.Envelope.EncodingType} value
   334   * @return {!proto.txs.Envelope} returns this
   335   */
   336  proto.txs.Envelope.prototype.setEncoding = function(value) {
   337    return jspb.Message.setProto3EnumField(this, 3, value);
   338  };
   339  
   340  
   341  
   342  
   343  
   344  if (jspb.Message.GENERATE_TO_OBJECT) {
   345  /**
   346   * Creates an object representation of this proto.
   347   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   348   * Optional fields that are not set will be set to undefined.
   349   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   350   * For the list of reserved names please see:
   351   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   352   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   353   *     JSPB instance for transitional soy proto support:
   354   *     http://goto/soy-param-migration
   355   * @return {!Object}
   356   */
   357  proto.txs.Signatory.prototype.toObject = function(opt_includeInstance) {
   358    return proto.txs.Signatory.toObject(opt_includeInstance, this);
   359  };
   360  
   361  
   362  /**
   363   * Static version of the {@see toObject} method.
   364   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   365   *     the JSPB instance for transitional soy proto support:
   366   *     http://goto/soy-param-migration
   367   * @param {!proto.txs.Signatory} msg The msg instance to transform.
   368   * @return {!Object}
   369   * @suppress {unusedLocalVariables} f is only used for nested messages
   370   */
   371  proto.txs.Signatory.toObject = function(includeInstance, msg) {
   372    var f, obj = {
   373      address: msg.getAddress_asB64(),
   374      publickey: (f = msg.getPublickey()) && crypto_pb.PublicKey.toObject(includeInstance, f),
   375      signature: (f = msg.getSignature()) && crypto_pb.Signature.toObject(includeInstance, f)
   376    };
   377  
   378    if (includeInstance) {
   379      obj.$jspbMessageInstance = msg;
   380    }
   381    return obj;
   382  };
   383  }
   384  
   385  
   386  /**
   387   * Deserializes binary data (in protobuf wire format).
   388   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   389   * @return {!proto.txs.Signatory}
   390   */
   391  proto.txs.Signatory.deserializeBinary = function(bytes) {
   392    var reader = new jspb.BinaryReader(bytes);
   393    var msg = new proto.txs.Signatory;
   394    return proto.txs.Signatory.deserializeBinaryFromReader(msg, reader);
   395  };
   396  
   397  
   398  /**
   399   * Deserializes binary data (in protobuf wire format) from the
   400   * given reader into the given message object.
   401   * @param {!proto.txs.Signatory} msg The message object to deserialize into.
   402   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   403   * @return {!proto.txs.Signatory}
   404   */
   405  proto.txs.Signatory.deserializeBinaryFromReader = function(msg, reader) {
   406    while (reader.nextField()) {
   407      if (reader.isEndGroup()) {
   408        break;
   409      }
   410      var field = reader.getFieldNumber();
   411      switch (field) {
   412      case 1:
   413        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   414        msg.setAddress(value);
   415        break;
   416      case 2:
   417        var value = new crypto_pb.PublicKey;
   418        reader.readMessage(value,crypto_pb.PublicKey.deserializeBinaryFromReader);
   419        msg.setPublickey(value);
   420        break;
   421      case 4:
   422        var value = new crypto_pb.Signature;
   423        reader.readMessage(value,crypto_pb.Signature.deserializeBinaryFromReader);
   424        msg.setSignature(value);
   425        break;
   426      default:
   427        reader.skipField();
   428        break;
   429      }
   430    }
   431    return msg;
   432  };
   433  
   434  
   435  /**
   436   * Serializes the message to binary data (in protobuf wire format).
   437   * @return {!Uint8Array}
   438   */
   439  proto.txs.Signatory.prototype.serializeBinary = function() {
   440    var writer = new jspb.BinaryWriter();
   441    proto.txs.Signatory.serializeBinaryToWriter(this, writer);
   442    return writer.getResultBuffer();
   443  };
   444  
   445  
   446  /**
   447   * Serializes the given message to binary data (in protobuf wire
   448   * format), writing to the given BinaryWriter.
   449   * @param {!proto.txs.Signatory} message
   450   * @param {!jspb.BinaryWriter} writer
   451   * @suppress {unusedLocalVariables} f is only used for nested messages
   452   */
   453  proto.txs.Signatory.serializeBinaryToWriter = function(message, writer) {
   454    var f = undefined;
   455    f = message.getAddress_asU8();
   456    if (f.length > 0) {
   457      writer.writeBytes(
   458        1,
   459        f
   460      );
   461    }
   462    f = message.getPublickey();
   463    if (f != null) {
   464      writer.writeMessage(
   465        2,
   466        f,
   467        crypto_pb.PublicKey.serializeBinaryToWriter
   468      );
   469    }
   470    f = message.getSignature();
   471    if (f != null) {
   472      writer.writeMessage(
   473        4,
   474        f,
   475        crypto_pb.Signature.serializeBinaryToWriter
   476      );
   477    }
   478  };
   479  
   480  
   481  /**
   482   * optional bytes Address = 1;
   483   * @return {!(string|Uint8Array)}
   484   */
   485  proto.txs.Signatory.prototype.getAddress = function() {
   486    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
   487  };
   488  
   489  
   490  /**
   491   * optional bytes Address = 1;
   492   * This is a type-conversion wrapper around `getAddress()`
   493   * @return {string}
   494   */
   495  proto.txs.Signatory.prototype.getAddress_asB64 = function() {
   496    return /** @type {string} */ (jspb.Message.bytesAsB64(
   497        this.getAddress()));
   498  };
   499  
   500  
   501  /**
   502   * optional bytes Address = 1;
   503   * Note that Uint8Array is not supported on all browsers.
   504   * @see http://caniuse.com/Uint8Array
   505   * This is a type-conversion wrapper around `getAddress()`
   506   * @return {!Uint8Array}
   507   */
   508  proto.txs.Signatory.prototype.getAddress_asU8 = function() {
   509    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   510        this.getAddress()));
   511  };
   512  
   513  
   514  /**
   515   * @param {!(string|Uint8Array)} value
   516   * @return {!proto.txs.Signatory} returns this
   517   */
   518  proto.txs.Signatory.prototype.setAddress = function(value) {
   519    return jspb.Message.setProto3BytesField(this, 1, value);
   520  };
   521  
   522  
   523  /**
   524   * optional crypto.PublicKey PublicKey = 2;
   525   * @return {?proto.crypto.PublicKey}
   526   */
   527  proto.txs.Signatory.prototype.getPublickey = function() {
   528    return /** @type{?proto.crypto.PublicKey} */ (
   529      jspb.Message.getWrapperField(this, crypto_pb.PublicKey, 2));
   530  };
   531  
   532  
   533  /**
   534   * @param {?proto.crypto.PublicKey|undefined} value
   535   * @return {!proto.txs.Signatory} returns this
   536  */
   537  proto.txs.Signatory.prototype.setPublickey = function(value) {
   538    return jspb.Message.setWrapperField(this, 2, value);
   539  };
   540  
   541  
   542  /**
   543   * Clears the message field making it undefined.
   544   * @return {!proto.txs.Signatory} returns this
   545   */
   546  proto.txs.Signatory.prototype.clearPublickey = function() {
   547    return this.setPublickey(undefined);
   548  };
   549  
   550  
   551  /**
   552   * Returns whether this field is set.
   553   * @return {boolean}
   554   */
   555  proto.txs.Signatory.prototype.hasPublickey = function() {
   556    return jspb.Message.getField(this, 2) != null;
   557  };
   558  
   559  
   560  /**
   561   * optional crypto.Signature Signature = 4;
   562   * @return {?proto.crypto.Signature}
   563   */
   564  proto.txs.Signatory.prototype.getSignature = function() {
   565    return /** @type{?proto.crypto.Signature} */ (
   566      jspb.Message.getWrapperField(this, crypto_pb.Signature, 4));
   567  };
   568  
   569  
   570  /**
   571   * @param {?proto.crypto.Signature|undefined} value
   572   * @return {!proto.txs.Signatory} returns this
   573  */
   574  proto.txs.Signatory.prototype.setSignature = function(value) {
   575    return jspb.Message.setWrapperField(this, 4, value);
   576  };
   577  
   578  
   579  /**
   580   * Clears the message field making it undefined.
   581   * @return {!proto.txs.Signatory} returns this
   582   */
   583  proto.txs.Signatory.prototype.clearSignature = function() {
   584    return this.setSignature(undefined);
   585  };
   586  
   587  
   588  /**
   589   * Returns whether this field is set.
   590   * @return {boolean}
   591   */
   592  proto.txs.Signatory.prototype.hasSignature = function() {
   593    return jspb.Message.getField(this, 4) != null;
   594  };
   595  
   596  
   597  
   598  
   599  
   600  if (jspb.Message.GENERATE_TO_OBJECT) {
   601  /**
   602   * Creates an object representation of this proto.
   603   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   604   * Optional fields that are not set will be set to undefined.
   605   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   606   * For the list of reserved names please see:
   607   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   608   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   609   *     JSPB instance for transitional soy proto support:
   610   *     http://goto/soy-param-migration
   611   * @return {!Object}
   612   */
   613  proto.txs.Receipt.prototype.toObject = function(opt_includeInstance) {
   614    return proto.txs.Receipt.toObject(opt_includeInstance, this);
   615  };
   616  
   617  
   618  /**
   619   * Static version of the {@see toObject} method.
   620   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   621   *     the JSPB instance for transitional soy proto support:
   622   *     http://goto/soy-param-migration
   623   * @param {!proto.txs.Receipt} msg The msg instance to transform.
   624   * @return {!Object}
   625   * @suppress {unusedLocalVariables} f is only used for nested messages
   626   */
   627  proto.txs.Receipt.toObject = function(includeInstance, msg) {
   628    var f, obj = {
   629      txtype: jspb.Message.getFieldWithDefault(msg, 1, 0),
   630      txhash: msg.getTxhash_asB64(),
   631      createscontract: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
   632      contractaddress: msg.getContractaddress_asB64()
   633    };
   634  
   635    if (includeInstance) {
   636      obj.$jspbMessageInstance = msg;
   637    }
   638    return obj;
   639  };
   640  }
   641  
   642  
   643  /**
   644   * Deserializes binary data (in protobuf wire format).
   645   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   646   * @return {!proto.txs.Receipt}
   647   */
   648  proto.txs.Receipt.deserializeBinary = function(bytes) {
   649    var reader = new jspb.BinaryReader(bytes);
   650    var msg = new proto.txs.Receipt;
   651    return proto.txs.Receipt.deserializeBinaryFromReader(msg, reader);
   652  };
   653  
   654  
   655  /**
   656   * Deserializes binary data (in protobuf wire format) from the
   657   * given reader into the given message object.
   658   * @param {!proto.txs.Receipt} msg The message object to deserialize into.
   659   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   660   * @return {!proto.txs.Receipt}
   661   */
   662  proto.txs.Receipt.deserializeBinaryFromReader = function(msg, reader) {
   663    while (reader.nextField()) {
   664      if (reader.isEndGroup()) {
   665        break;
   666      }
   667      var field = reader.getFieldNumber();
   668      switch (field) {
   669      case 1:
   670        var value = /** @type {number} */ (reader.readUint32());
   671        msg.setTxtype(value);
   672        break;
   673      case 2:
   674        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   675        msg.setTxhash(value);
   676        break;
   677      case 3:
   678        var value = /** @type {boolean} */ (reader.readBool());
   679        msg.setCreatescontract(value);
   680        break;
   681      case 4:
   682        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   683        msg.setContractaddress(value);
   684        break;
   685      default:
   686        reader.skipField();
   687        break;
   688      }
   689    }
   690    return msg;
   691  };
   692  
   693  
   694  /**
   695   * Serializes the message to binary data (in protobuf wire format).
   696   * @return {!Uint8Array}
   697   */
   698  proto.txs.Receipt.prototype.serializeBinary = function() {
   699    var writer = new jspb.BinaryWriter();
   700    proto.txs.Receipt.serializeBinaryToWriter(this, writer);
   701    return writer.getResultBuffer();
   702  };
   703  
   704  
   705  /**
   706   * Serializes the given message to binary data (in protobuf wire
   707   * format), writing to the given BinaryWriter.
   708   * @param {!proto.txs.Receipt} message
   709   * @param {!jspb.BinaryWriter} writer
   710   * @suppress {unusedLocalVariables} f is only used for nested messages
   711   */
   712  proto.txs.Receipt.serializeBinaryToWriter = function(message, writer) {
   713    var f = undefined;
   714    f = message.getTxtype();
   715    if (f !== 0) {
   716      writer.writeUint32(
   717        1,
   718        f
   719      );
   720    }
   721    f = message.getTxhash_asU8();
   722    if (f.length > 0) {
   723      writer.writeBytes(
   724        2,
   725        f
   726      );
   727    }
   728    f = message.getCreatescontract();
   729    if (f) {
   730      writer.writeBool(
   731        3,
   732        f
   733      );
   734    }
   735    f = message.getContractaddress_asU8();
   736    if (f.length > 0) {
   737      writer.writeBytes(
   738        4,
   739        f
   740      );
   741    }
   742  };
   743  
   744  
   745  /**
   746   * optional uint32 TxType = 1;
   747   * @return {number}
   748   */
   749  proto.txs.Receipt.prototype.getTxtype = function() {
   750    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
   751  };
   752  
   753  
   754  /**
   755   * @param {number} value
   756   * @return {!proto.txs.Receipt} returns this
   757   */
   758  proto.txs.Receipt.prototype.setTxtype = function(value) {
   759    return jspb.Message.setProto3IntField(this, 1, value);
   760  };
   761  
   762  
   763  /**
   764   * optional bytes TxHash = 2;
   765   * @return {!(string|Uint8Array)}
   766   */
   767  proto.txs.Receipt.prototype.getTxhash = function() {
   768    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   769  };
   770  
   771  
   772  /**
   773   * optional bytes TxHash = 2;
   774   * This is a type-conversion wrapper around `getTxhash()`
   775   * @return {string}
   776   */
   777  proto.txs.Receipt.prototype.getTxhash_asB64 = function() {
   778    return /** @type {string} */ (jspb.Message.bytesAsB64(
   779        this.getTxhash()));
   780  };
   781  
   782  
   783  /**
   784   * optional bytes TxHash = 2;
   785   * Note that Uint8Array is not supported on all browsers.
   786   * @see http://caniuse.com/Uint8Array
   787   * This is a type-conversion wrapper around `getTxhash()`
   788   * @return {!Uint8Array}
   789   */
   790  proto.txs.Receipt.prototype.getTxhash_asU8 = function() {
   791    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   792        this.getTxhash()));
   793  };
   794  
   795  
   796  /**
   797   * @param {!(string|Uint8Array)} value
   798   * @return {!proto.txs.Receipt} returns this
   799   */
   800  proto.txs.Receipt.prototype.setTxhash = function(value) {
   801    return jspb.Message.setProto3BytesField(this, 2, value);
   802  };
   803  
   804  
   805  /**
   806   * optional bool CreatesContract = 3;
   807   * @return {boolean}
   808   */
   809  proto.txs.Receipt.prototype.getCreatescontract = function() {
   810    return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
   811  };
   812  
   813  
   814  /**
   815   * @param {boolean} value
   816   * @return {!proto.txs.Receipt} returns this
   817   */
   818  proto.txs.Receipt.prototype.setCreatescontract = function(value) {
   819    return jspb.Message.setProto3BooleanField(this, 3, value);
   820  };
   821  
   822  
   823  /**
   824   * optional bytes ContractAddress = 4;
   825   * @return {!(string|Uint8Array)}
   826   */
   827  proto.txs.Receipt.prototype.getContractaddress = function() {
   828    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
   829  };
   830  
   831  
   832  /**
   833   * optional bytes ContractAddress = 4;
   834   * This is a type-conversion wrapper around `getContractaddress()`
   835   * @return {string}
   836   */
   837  proto.txs.Receipt.prototype.getContractaddress_asB64 = function() {
   838    return /** @type {string} */ (jspb.Message.bytesAsB64(
   839        this.getContractaddress()));
   840  };
   841  
   842  
   843  /**
   844   * optional bytes ContractAddress = 4;
   845   * Note that Uint8Array is not supported on all browsers.
   846   * @see http://caniuse.com/Uint8Array
   847   * This is a type-conversion wrapper around `getContractaddress()`
   848   * @return {!Uint8Array}
   849   */
   850  proto.txs.Receipt.prototype.getContractaddress_asU8 = function() {
   851    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   852        this.getContractaddress()));
   853  };
   854  
   855  
   856  /**
   857   * @param {!(string|Uint8Array)} value
   858   * @return {!proto.txs.Receipt} returns this
   859   */
   860  proto.txs.Receipt.prototype.setContractaddress = function(value) {
   861    return jspb.Message.setProto3BytesField(this, 4, value);
   862  };
   863  
   864  
   865  goog.object.extend(exports, proto.txs);