pactus-grpc 1.8.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/blockchain_pb.js CHANGED
@@ -3062,7 +3062,8 @@ committeeValidatorsList: jspb.Message.toObjectList(msg.getCommitteeValidatorsLis
3062
3062
  proto.pactus.ValidatorInfo.toObject, includeInstance),
3063
3063
  isPruned: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
3064
3064
  pruningHeight: jspb.Message.getFieldWithDefault(msg, 9, 0),
3065
- lastBlockTime: jspb.Message.getFieldWithDefault(msg, 10, 0)
3065
+ lastBlockTime: jspb.Message.getFieldWithDefault(msg, 10, 0),
3066
+ committeeProtocolVersionsMap: (f = msg.getCommitteeProtocolVersionsMap()) ? f.toObject(includeInstance, undefined) : []
3066
3067
  };
3067
3068
 
3068
3069
  if (includeInstance) {
@@ -3140,6 +3141,12 @@ proto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader = function(ms
3140
3141
  var value = /** @type {number} */ (reader.readInt64());
3141
3142
  msg.setLastBlockTime(value);
3142
3143
  break;
3144
+ case 11:
3145
+ var value = msg.getCommitteeProtocolVersionsMap();
3146
+ reader.readMessage(value, function(message, reader) {
3147
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readDouble, null, 0, 0.0);
3148
+ });
3149
+ break;
3143
3150
  default:
3144
3151
  reader.skipField();
3145
3152
  break;
@@ -3240,6 +3247,10 @@ proto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter = function(messag
3240
3247
  f
3241
3248
  );
3242
3249
  }
3250
+ f = message.getCommitteeProtocolVersionsMap(true);
3251
+ if (f && f.getLength() > 0) {
3252
+ f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeDouble);
3253
+ }
3243
3254
  };
3244
3255
 
3245
3256
 
@@ -3443,6 +3454,29 @@ proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockTime = function(val
3443
3454
  };
3444
3455
 
3445
3456
 
3457
+ /**
3458
+ * map<int32, double> committee_protocol_versions = 11;
3459
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
3460
+ * empty, instead returning `undefined`
3461
+ * @return {!jspb.Map<number,number>}
3462
+ */
3463
+ proto.pactus.GetBlockchainInfoResponse.prototype.getCommitteeProtocolVersionsMap = function(opt_noLazyCreate) {
3464
+ return /** @type {!jspb.Map<number,number>} */ (
3465
+ jspb.Message.getMapField(this, 11, opt_noLazyCreate,
3466
+ null));
3467
+ };
3468
+
3469
+
3470
+ /**
3471
+ * Clears values from the map. The map will be non-null.
3472
+ * @return {!proto.pactus.GetBlockchainInfoResponse} returns this
3473
+ */
3474
+ proto.pactus.GetBlockchainInfoResponse.prototype.clearCommitteeProtocolVersionsMap = function() {
3475
+ this.getCommitteeProtocolVersionsMap().clear();
3476
+ return this;
3477
+ };
3478
+
3479
+
3446
3480
 
3447
3481
 
3448
3482
 
@@ -4086,7 +4120,8 @@ lastBondingHeight: jspb.Message.getFieldWithDefault(msg, 6, 0),
4086
4120
  lastSortitionHeight: jspb.Message.getFieldWithDefault(msg, 7, 0),
4087
4121
  unbondingHeight: jspb.Message.getFieldWithDefault(msg, 8, 0),
4088
4122
  address: jspb.Message.getFieldWithDefault(msg, 9, ""),
4089
- availabilityScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0)
4123
+ availabilityScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0),
4124
+ protocolVersion: jspb.Message.getFieldWithDefault(msg, 11, 0)
4090
4125
  };
4091
4126
 
4092
4127
  if (includeInstance) {
@@ -4163,6 +4198,10 @@ proto.pactus.ValidatorInfo.deserializeBinaryFromReader = function(msg, reader) {
4163
4198
  var value = /** @type {number} */ (reader.readDouble());
4164
4199
  msg.setAvailabilityScore(value);
4165
4200
  break;
4201
+ case 11:
4202
+ var value = /** @type {number} */ (reader.readInt32());
4203
+ msg.setProtocolVersion(value);
4204
+ break;
4166
4205
  default:
4167
4206
  reader.skipField();
4168
4207
  break;
@@ -4262,6 +4301,13 @@ proto.pactus.ValidatorInfo.serializeBinaryToWriter = function(message, writer) {
4262
4301
  f
4263
4302
  );
4264
4303
  }
4304
+ f = message.getProtocolVersion();
4305
+ if (f !== 0) {
4306
+ writer.writeInt32(
4307
+ 11,
4308
+ f
4309
+ );
4310
+ }
4265
4311
  };
4266
4312
 
4267
4313
 
@@ -4445,6 +4491,24 @@ proto.pactus.ValidatorInfo.prototype.setAvailabilityScore = function(value) {
4445
4491
  };
4446
4492
 
4447
4493
 
4494
+ /**
4495
+ * optional int32 protocol_version = 11;
4496
+ * @return {number}
4497
+ */
4498
+ proto.pactus.ValidatorInfo.prototype.getProtocolVersion = function() {
4499
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
4500
+ };
4501
+
4502
+
4503
+ /**
4504
+ * @param {number} value
4505
+ * @return {!proto.pactus.ValidatorInfo} returns this
4506
+ */
4507
+ proto.pactus.ValidatorInfo.prototype.setProtocolVersion = function(value) {
4508
+ return jspb.Message.setProto3IntField(this, 11, value);
4509
+ };
4510
+
4511
+
4448
4512
 
4449
4513
 
4450
4514
 
package/network_pb.js CHANGED
@@ -23,6 +23,7 @@ var global =
23
23
 
24
24
  goog.exportSymbol('proto.pactus.ConnectionInfo', null, global);
25
25
  goog.exportSymbol('proto.pactus.CounterInfo', null, global);
26
+ goog.exportSymbol('proto.pactus.Direction', null, global);
26
27
  goog.exportSymbol('proto.pactus.GetNetworkInfoRequest', null, global);
27
28
  goog.exportSymbol('proto.pactus.GetNetworkInfoResponse', null, global);
28
29
  goog.exportSymbol('proto.pactus.GetNodeInfoRequest', null, global);
@@ -772,7 +773,8 @@ protocolsList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined :
772
773
  clockOffset: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0),
773
774
  connectionInfo: (f = msg.getConnectionInfo()) && proto.pactus.ConnectionInfo.toObject(includeInstance, f),
774
775
  zmqPublishersList: jspb.Message.toObjectList(msg.getZmqPublishersList(),
775
- proto.pactus.ZMQPublisherInfo.toObject, includeInstance)
776
+ proto.pactus.ZMQPublisherInfo.toObject, includeInstance),
777
+ currentTime: jspb.Message.getFieldWithDefault(msg, 16, 0)
776
778
  };
777
779
 
778
780
  if (includeInstance) {
@@ -859,6 +861,10 @@ proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, rea
859
861
  reader.readMessage(value,proto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader);
860
862
  msg.addZmqPublishers(value);
861
863
  break;
864
+ case 16:
865
+ var value = /** @type {number} */ (reader.readUint64());
866
+ msg.setCurrentTime(value);
867
+ break;
862
868
  default:
863
869
  reader.skipField();
864
870
  break;
@@ -974,6 +980,13 @@ proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter = function(message, wri
974
980
  proto.pactus.ZMQPublisherInfo.serializeBinaryToWriter
975
981
  );
976
982
  }
983
+ f = message.getCurrentTime();
984
+ if (f !== 0) {
985
+ writer.writeUint64(
986
+ 16,
987
+ f
988
+ );
989
+ }
977
990
  };
978
991
 
979
992
 
@@ -1270,6 +1283,24 @@ proto.pactus.GetNodeInfoResponse.prototype.clearZmqPublishersList = function() {
1270
1283
  };
1271
1284
 
1272
1285
 
1286
+ /**
1287
+ * optional uint64 current_time = 16;
1288
+ * @return {number}
1289
+ */
1290
+ proto.pactus.GetNodeInfoResponse.prototype.getCurrentTime = function() {
1291
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
1292
+ };
1293
+
1294
+
1295
+ /**
1296
+ * @param {number} value
1297
+ * @return {!proto.pactus.GetNodeInfoResponse} returns this
1298
+ */
1299
+ proto.pactus.GetNodeInfoResponse.prototype.setCurrentTime = function(value) {
1300
+ return jspb.Message.setProto3IntField(this, 16, value);
1301
+ };
1302
+
1303
+
1273
1304
 
1274
1305
 
1275
1306
 
@@ -1511,11 +1542,12 @@ height: jspb.Message.getFieldWithDefault(msg, 9, 0),
1511
1542
  lastSent: jspb.Message.getFieldWithDefault(msg, 10, 0),
1512
1543
  lastReceived: jspb.Message.getFieldWithDefault(msg, 11, 0),
1513
1544
  address: jspb.Message.getFieldWithDefault(msg, 12, ""),
1514
- direction: jspb.Message.getFieldWithDefault(msg, 13, ""),
1545
+ direction: jspb.Message.getFieldWithDefault(msg, 13, 0),
1515
1546
  protocolsList: (f = jspb.Message.getRepeatedField(msg, 14)) == null ? undefined : f,
1516
1547
  totalSessions: jspb.Message.getFieldWithDefault(msg, 15, 0),
1517
1548
  completedSessions: jspb.Message.getFieldWithDefault(msg, 16, 0),
1518
- metricInfo: (f = msg.getMetricInfo()) && proto.pactus.MetricInfo.toObject(includeInstance, f)
1549
+ metricInfo: (f = msg.getMetricInfo()) && proto.pactus.MetricInfo.toObject(includeInstance, f),
1550
+ outboundHelloSent: jspb.Message.getBooleanFieldWithDefault(msg, 18, false)
1519
1551
  };
1520
1552
 
1521
1553
  if (includeInstance) {
@@ -1601,7 +1633,7 @@ proto.pactus.PeerInfo.deserializeBinaryFromReader = function(msg, reader) {
1601
1633
  msg.setAddress(value);
1602
1634
  break;
1603
1635
  case 13:
1604
- var value = /** @type {string} */ (reader.readString());
1636
+ var value = /** @type {!proto.pactus.Direction} */ (reader.readEnum());
1605
1637
  msg.setDirection(value);
1606
1638
  break;
1607
1639
  case 14:
@@ -1621,6 +1653,10 @@ proto.pactus.PeerInfo.deserializeBinaryFromReader = function(msg, reader) {
1621
1653
  reader.readMessage(value,proto.pactus.MetricInfo.deserializeBinaryFromReader);
1622
1654
  msg.setMetricInfo(value);
1623
1655
  break;
1656
+ case 18:
1657
+ var value = /** @type {boolean} */ (reader.readBool());
1658
+ msg.setOutboundHelloSent(value);
1659
+ break;
1624
1660
  default:
1625
1661
  reader.skipField();
1626
1662
  break;
@@ -1735,8 +1771,8 @@ proto.pactus.PeerInfo.serializeBinaryToWriter = function(message, writer) {
1735
1771
  );
1736
1772
  }
1737
1773
  f = message.getDirection();
1738
- if (f.length > 0) {
1739
- writer.writeString(
1774
+ if (f !== 0.0) {
1775
+ writer.writeEnum(
1740
1776
  13,
1741
1777
  f
1742
1778
  );
@@ -1770,6 +1806,13 @@ proto.pactus.PeerInfo.serializeBinaryToWriter = function(message, writer) {
1770
1806
  proto.pactus.MetricInfo.serializeBinaryToWriter
1771
1807
  );
1772
1808
  }
1809
+ f = message.getOutboundHelloSent();
1810
+ if (f) {
1811
+ writer.writeBool(
1812
+ 18,
1813
+ f
1814
+ );
1815
+ }
1773
1816
  };
1774
1817
 
1775
1818
 
@@ -2028,20 +2071,20 @@ proto.pactus.PeerInfo.prototype.setAddress = function(value) {
2028
2071
 
2029
2072
 
2030
2073
  /**
2031
- * optional string direction = 13;
2032
- * @return {string}
2074
+ * optional Direction direction = 13;
2075
+ * @return {!proto.pactus.Direction}
2033
2076
  */
2034
2077
  proto.pactus.PeerInfo.prototype.getDirection = function() {
2035
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
2078
+ return /** @type {!proto.pactus.Direction} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
2036
2079
  };
2037
2080
 
2038
2081
 
2039
2082
  /**
2040
- * @param {string} value
2083
+ * @param {!proto.pactus.Direction} value
2041
2084
  * @return {!proto.pactus.PeerInfo} returns this
2042
2085
  */
2043
2086
  proto.pactus.PeerInfo.prototype.setDirection = function(value) {
2044
- return jspb.Message.setProto3StringField(this, 13, value);
2087
+ return jspb.Message.setProto3EnumField(this, 13, value);
2045
2088
  };
2046
2089
 
2047
2090
 
@@ -2155,6 +2198,24 @@ proto.pactus.PeerInfo.prototype.hasMetricInfo = function() {
2155
2198
  };
2156
2199
 
2157
2200
 
2201
+ /**
2202
+ * optional bool outbound_hello_sent = 18;
2203
+ * @return {boolean}
2204
+ */
2205
+ proto.pactus.PeerInfo.prototype.getOutboundHelloSent = function() {
2206
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false));
2207
+ };
2208
+
2209
+
2210
+ /**
2211
+ * @param {boolean} value
2212
+ * @return {!proto.pactus.PeerInfo} returns this
2213
+ */
2214
+ proto.pactus.PeerInfo.prototype.setOutboundHelloSent = function(value) {
2215
+ return jspb.Message.setProto3BooleanField(this, 18, value);
2216
+ };
2217
+
2218
+
2158
2219
 
2159
2220
 
2160
2221
 
@@ -2826,4 +2887,13 @@ proto.pactus.CounterInfo.prototype.setBundles = function(value) {
2826
2887
  };
2827
2888
 
2828
2889
 
2890
+ /**
2891
+ * @enum {number}
2892
+ */
2893
+ proto.pactus.Direction = {
2894
+ DIRECTION_UNKNOWN: 0,
2895
+ DIRECTION_INBOUND: 1,
2896
+ DIRECTION_OUTBOUND: 2
2897
+ };
2898
+
2829
2899
  goog.object.extend(exports, proto.pactus);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pactus-grpc",
3
- "version": "v1.8.0",
3
+ "version": "v1.9.1",
4
4
  "description": "JavaScript client for interacting with the Pactus blockchain via gRPC",
5
5
  "author": "Pactus Development Team",
6
6
  "license": "MIT",