koilib 4.1.0 → 5.0.0
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/dist/koinos.js +9585 -9051
- package/dist/koinos.min.js +1 -1
- package/lib/Contract.d.ts +2 -0
- package/lib/Contract.js +8 -6
- package/lib/Contract.js.map +1 -1
- package/lib/Provider.d.ts +17 -5
- package/lib/Provider.js +21 -7
- package/lib/Provider.js.map +1 -1
- package/lib/Serializer.js +2 -0
- package/lib/Serializer.js.map +1 -1
- package/lib/Signer.d.ts +4 -2
- package/lib/Signer.js +9 -9
- package/lib/Signer.js.map +1 -1
- package/lib/browser/Contract.d.ts +2 -0
- package/lib/browser/Contract.js +8 -6
- package/lib/browser/Contract.js.map +1 -1
- package/lib/browser/Provider.d.ts +17 -5
- package/lib/browser/Provider.js +21 -7
- package/lib/browser/Provider.js.map +1 -1
- package/lib/browser/Serializer.js +2 -0
- package/lib/browser/Serializer.js.map +1 -1
- package/lib/browser/Signer.d.ts +4 -2
- package/lib/browser/Signer.js +9 -9
- package/lib/browser/Signer.js.map +1 -1
- package/lib/browser/index.js +5 -1
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/index2.js +5 -1
- package/lib/browser/index2.js.map +1 -1
- package/lib/browser/indexUtils.js +5 -1
- package/lib/browser/indexUtils.js.map +1 -1
- package/lib/browser/interface.d.ts +12 -2
- package/lib/browser/jsonDescriptors/chain-proto.json +50 -0
- package/lib/browser/jsonDescriptors/token-proto.json +37 -8
- package/lib/browser/protoModules/protocol-proto.js +518 -201
- package/lib/browser/protoModules/protocol-proto.js.map +1 -1
- package/lib/browser/utils.js +5 -1
- package/lib/browser/utils.js.map +1 -1
- package/lib/browser/utilsNode.d.ts +50 -0
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/index2.js +5 -1
- package/lib/index2.js.map +1 -1
- package/lib/indexUtils.js +5 -1
- package/lib/indexUtils.js.map +1 -1
- package/lib/interface.d.ts +12 -2
- package/lib/jsonDescriptors/chain-proto.json +50 -0
- package/lib/jsonDescriptors/token-proto.json +37 -8
- package/lib/protoModules/protocol-proto.js +518 -201
- package/lib/protoModules/protocol-proto.js.map +1 -1
- package/lib/utils.js +5 -1
- package/lib/utils.js.map +1 -1
- package/lib/utilsNode.d.ts +50 -0
- package/package.json +29 -28
|
@@ -162,23 +162,28 @@
|
|
|
162
162
|
while (reader.pos < end) {
|
|
163
163
|
var tag = reader.uint32();
|
|
164
164
|
switch (tag >>> 3) {
|
|
165
|
-
case 1:
|
|
165
|
+
case 1: {
|
|
166
166
|
message.sequence = reader.uint32();
|
|
167
167
|
break;
|
|
168
|
-
|
|
168
|
+
}
|
|
169
|
+
case 2: {
|
|
169
170
|
message.source = reader.bytes();
|
|
170
171
|
break;
|
|
171
|
-
|
|
172
|
+
}
|
|
173
|
+
case 3: {
|
|
172
174
|
message.name = reader.string();
|
|
173
175
|
break;
|
|
174
|
-
|
|
176
|
+
}
|
|
177
|
+
case 4: {
|
|
175
178
|
message.data = reader.bytes();
|
|
176
179
|
break;
|
|
177
|
-
|
|
180
|
+
}
|
|
181
|
+
case 5: {
|
|
178
182
|
if (!(message.impacted && message.impacted.length))
|
|
179
183
|
message.impacted = [];
|
|
180
184
|
message.impacted.push(reader.bytes());
|
|
181
185
|
break;
|
|
186
|
+
}
|
|
182
187
|
default:
|
|
183
188
|
reader.skipType(tag & 7);
|
|
184
189
|
break;
|
|
@@ -254,14 +259,14 @@
|
|
|
254
259
|
if (object.source != null)
|
|
255
260
|
if (typeof object.source === "string")
|
|
256
261
|
$util.base64.decode(object.source, (message.source = $util.newBuffer($util.base64.length(object.source))), 0);
|
|
257
|
-
else if (object.source.length)
|
|
262
|
+
else if (object.source.length >= 0)
|
|
258
263
|
message.source = object.source;
|
|
259
264
|
if (object.name != null)
|
|
260
265
|
message.name = String(object.name);
|
|
261
266
|
if (object.data != null)
|
|
262
267
|
if (typeof object.data === "string")
|
|
263
268
|
$util.base64.decode(object.data, (message.data = $util.newBuffer($util.base64.length(object.data))), 0);
|
|
264
|
-
else if (object.data.length)
|
|
269
|
+
else if (object.data.length >= 0)
|
|
265
270
|
message.data = object.data;
|
|
266
271
|
if (object.impacted) {
|
|
267
272
|
if (!Array.isArray(object.impacted))
|
|
@@ -270,7 +275,7 @@
|
|
|
270
275
|
for (var i = 0; i < object.impacted.length; ++i)
|
|
271
276
|
if (typeof object.impacted[i] === "string")
|
|
272
277
|
$util.base64.decode(object.impacted[i], (message.impacted[i] = $util.newBuffer($util.base64.length(object.impacted[i]))), 0);
|
|
273
|
-
else if (object.impacted[i].length)
|
|
278
|
+
else if (object.impacted[i].length >= 0)
|
|
274
279
|
message.impacted[i] = object.impacted[i];
|
|
275
280
|
}
|
|
276
281
|
return message;
|
|
@@ -348,6 +353,20 @@
|
|
|
348
353
|
event_data.prototype.toJSON = function toJSON() {
|
|
349
354
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
350
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* Gets the default type url for event_data
|
|
358
|
+
* @function getTypeUrl
|
|
359
|
+
* @memberof koinos.protocol.event_data
|
|
360
|
+
* @static
|
|
361
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
362
|
+
* @returns {string} The default type url
|
|
363
|
+
*/
|
|
364
|
+
event_data.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
365
|
+
if (typeUrlPrefix === undefined) {
|
|
366
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
367
|
+
}
|
|
368
|
+
return typeUrlPrefix + "/koinos.protocol.event_data";
|
|
369
|
+
};
|
|
351
370
|
return event_data;
|
|
352
371
|
})();
|
|
353
372
|
protocol.contract_call_bundle = (function () {
|
|
@@ -451,12 +470,14 @@
|
|
|
451
470
|
while (reader.pos < end) {
|
|
452
471
|
var tag = reader.uint32();
|
|
453
472
|
switch (tag >>> 3) {
|
|
454
|
-
case 1:
|
|
473
|
+
case 1: {
|
|
455
474
|
message.contract_id = reader.bytes();
|
|
456
475
|
break;
|
|
457
|
-
|
|
476
|
+
}
|
|
477
|
+
case 2: {
|
|
458
478
|
message.entry_point = reader.uint32();
|
|
459
479
|
break;
|
|
480
|
+
}
|
|
460
481
|
default:
|
|
461
482
|
reader.skipType(tag & 7);
|
|
462
483
|
break;
|
|
@@ -517,7 +538,7 @@
|
|
|
517
538
|
if (object.contract_id != null)
|
|
518
539
|
if (typeof object.contract_id === "string")
|
|
519
540
|
$util.base64.decode(object.contract_id, (message.contract_id = $util.newBuffer($util.base64.length(object.contract_id))), 0);
|
|
520
|
-
else if (object.contract_id.length)
|
|
541
|
+
else if (object.contract_id.length >= 0)
|
|
521
542
|
message.contract_id = object.contract_id;
|
|
522
543
|
if (object.entry_point != null)
|
|
523
544
|
message.entry_point = object.entry_point >>> 0;
|
|
@@ -569,6 +590,20 @@
|
|
|
569
590
|
contract_call_bundle.prototype.toJSON = function toJSON() {
|
|
570
591
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
571
592
|
};
|
|
593
|
+
/**
|
|
594
|
+
* Gets the default type url for contract_call_bundle
|
|
595
|
+
* @function getTypeUrl
|
|
596
|
+
* @memberof koinos.protocol.contract_call_bundle
|
|
597
|
+
* @static
|
|
598
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
599
|
+
* @returns {string} The default type url
|
|
600
|
+
*/
|
|
601
|
+
contract_call_bundle.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
602
|
+
if (typeUrlPrefix === undefined) {
|
|
603
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
604
|
+
}
|
|
605
|
+
return typeUrlPrefix + "/koinos.protocol.contract_call_bundle";
|
|
606
|
+
};
|
|
572
607
|
return contract_call_bundle;
|
|
573
608
|
})();
|
|
574
609
|
protocol.system_call_target = (function () {
|
|
@@ -682,13 +717,15 @@
|
|
|
682
717
|
while (reader.pos < end) {
|
|
683
718
|
var tag = reader.uint32();
|
|
684
719
|
switch (tag >>> 3) {
|
|
685
|
-
case 1:
|
|
720
|
+
case 1: {
|
|
686
721
|
message.thunk_id = reader.uint32();
|
|
687
722
|
break;
|
|
688
|
-
|
|
723
|
+
}
|
|
724
|
+
case 2: {
|
|
689
725
|
message.system_call_bundle =
|
|
690
726
|
$root.koinos.protocol.contract_call_bundle.decode(reader, reader.uint32());
|
|
691
727
|
break;
|
|
728
|
+
}
|
|
692
729
|
default:
|
|
693
730
|
reader.skipType(tag & 7);
|
|
694
731
|
break;
|
|
@@ -800,6 +837,20 @@
|
|
|
800
837
|
system_call_target.prototype.toJSON = function toJSON() {
|
|
801
838
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
802
839
|
};
|
|
840
|
+
/**
|
|
841
|
+
* Gets the default type url for system_call_target
|
|
842
|
+
* @function getTypeUrl
|
|
843
|
+
* @memberof koinos.protocol.system_call_target
|
|
844
|
+
* @static
|
|
845
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
846
|
+
* @returns {string} The default type url
|
|
847
|
+
*/
|
|
848
|
+
system_call_target.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
849
|
+
if (typeUrlPrefix === undefined) {
|
|
850
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
851
|
+
}
|
|
852
|
+
return typeUrlPrefix + "/koinos.protocol.system_call_target";
|
|
853
|
+
};
|
|
803
854
|
return system_call_target;
|
|
804
855
|
})();
|
|
805
856
|
protocol.upload_contract_operation = (function () {
|
|
@@ -950,24 +1001,30 @@
|
|
|
950
1001
|
while (reader.pos < end) {
|
|
951
1002
|
var tag = reader.uint32();
|
|
952
1003
|
switch (tag >>> 3) {
|
|
953
|
-
case 1:
|
|
1004
|
+
case 1: {
|
|
954
1005
|
message.contract_id = reader.bytes();
|
|
955
1006
|
break;
|
|
956
|
-
|
|
1007
|
+
}
|
|
1008
|
+
case 2: {
|
|
957
1009
|
message.bytecode = reader.bytes();
|
|
958
1010
|
break;
|
|
959
|
-
|
|
1011
|
+
}
|
|
1012
|
+
case 3: {
|
|
960
1013
|
message.abi = reader.string();
|
|
961
1014
|
break;
|
|
962
|
-
|
|
1015
|
+
}
|
|
1016
|
+
case 4: {
|
|
963
1017
|
message.authorizes_call_contract = reader.bool();
|
|
964
1018
|
break;
|
|
965
|
-
|
|
1019
|
+
}
|
|
1020
|
+
case 5: {
|
|
966
1021
|
message.authorizes_transaction_application = reader.bool();
|
|
967
1022
|
break;
|
|
968
|
-
|
|
1023
|
+
}
|
|
1024
|
+
case 6: {
|
|
969
1025
|
message.authorizes_upload_contract = reader.bool();
|
|
970
1026
|
break;
|
|
1027
|
+
}
|
|
971
1028
|
default:
|
|
972
1029
|
reader.skipType(tag & 7);
|
|
973
1030
|
break;
|
|
@@ -1044,12 +1101,12 @@
|
|
|
1044
1101
|
if (object.contract_id != null)
|
|
1045
1102
|
if (typeof object.contract_id === "string")
|
|
1046
1103
|
$util.base64.decode(object.contract_id, (message.contract_id = $util.newBuffer($util.base64.length(object.contract_id))), 0);
|
|
1047
|
-
else if (object.contract_id.length)
|
|
1104
|
+
else if (object.contract_id.length >= 0)
|
|
1048
1105
|
message.contract_id = object.contract_id;
|
|
1049
1106
|
if (object.bytecode != null)
|
|
1050
1107
|
if (typeof object.bytecode === "string")
|
|
1051
1108
|
$util.base64.decode(object.bytecode, (message.bytecode = $util.newBuffer($util.base64.length(object.bytecode))), 0);
|
|
1052
|
-
else if (object.bytecode.length)
|
|
1109
|
+
else if (object.bytecode.length >= 0)
|
|
1053
1110
|
message.bytecode = object.bytecode;
|
|
1054
1111
|
if (object.abi != null)
|
|
1055
1112
|
message.abi = String(object.abi);
|
|
@@ -1134,6 +1191,20 @@
|
|
|
1134
1191
|
upload_contract_operation.prototype.toJSON = function toJSON() {
|
|
1135
1192
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1136
1193
|
};
|
|
1194
|
+
/**
|
|
1195
|
+
* Gets the default type url for upload_contract_operation
|
|
1196
|
+
* @function getTypeUrl
|
|
1197
|
+
* @memberof koinos.protocol.upload_contract_operation
|
|
1198
|
+
* @static
|
|
1199
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1200
|
+
* @returns {string} The default type url
|
|
1201
|
+
*/
|
|
1202
|
+
upload_contract_operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1203
|
+
if (typeUrlPrefix === undefined) {
|
|
1204
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1205
|
+
}
|
|
1206
|
+
return typeUrlPrefix + "/koinos.protocol.upload_contract_operation";
|
|
1207
|
+
};
|
|
1137
1208
|
return upload_contract_operation;
|
|
1138
1209
|
})();
|
|
1139
1210
|
protocol.call_contract_operation = (function () {
|
|
@@ -1248,15 +1319,18 @@
|
|
|
1248
1319
|
while (reader.pos < end) {
|
|
1249
1320
|
var tag = reader.uint32();
|
|
1250
1321
|
switch (tag >>> 3) {
|
|
1251
|
-
case 1:
|
|
1322
|
+
case 1: {
|
|
1252
1323
|
message.contract_id = reader.bytes();
|
|
1253
1324
|
break;
|
|
1254
|
-
|
|
1325
|
+
}
|
|
1326
|
+
case 2: {
|
|
1255
1327
|
message.entry_point = reader.uint32();
|
|
1256
1328
|
break;
|
|
1257
|
-
|
|
1329
|
+
}
|
|
1330
|
+
case 3: {
|
|
1258
1331
|
message.args = reader.bytes();
|
|
1259
1332
|
break;
|
|
1333
|
+
}
|
|
1260
1334
|
default:
|
|
1261
1335
|
reader.skipType(tag & 7);
|
|
1262
1336
|
break;
|
|
@@ -1321,14 +1395,14 @@
|
|
|
1321
1395
|
if (object.contract_id != null)
|
|
1322
1396
|
if (typeof object.contract_id === "string")
|
|
1323
1397
|
$util.base64.decode(object.contract_id, (message.contract_id = $util.newBuffer($util.base64.length(object.contract_id))), 0);
|
|
1324
|
-
else if (object.contract_id.length)
|
|
1398
|
+
else if (object.contract_id.length >= 0)
|
|
1325
1399
|
message.contract_id = object.contract_id;
|
|
1326
1400
|
if (object.entry_point != null)
|
|
1327
1401
|
message.entry_point = object.entry_point >>> 0;
|
|
1328
1402
|
if (object.args != null)
|
|
1329
1403
|
if (typeof object.args === "string")
|
|
1330
1404
|
$util.base64.decode(object.args, (message.args = $util.newBuffer($util.base64.length(object.args))), 0);
|
|
1331
|
-
else if (object.args.length)
|
|
1405
|
+
else if (object.args.length >= 0)
|
|
1332
1406
|
message.args = object.args;
|
|
1333
1407
|
return message;
|
|
1334
1408
|
};
|
|
@@ -1392,6 +1466,20 @@
|
|
|
1392
1466
|
call_contract_operation.prototype.toJSON = function toJSON() {
|
|
1393
1467
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1394
1468
|
};
|
|
1469
|
+
/**
|
|
1470
|
+
* Gets the default type url for call_contract_operation
|
|
1471
|
+
* @function getTypeUrl
|
|
1472
|
+
* @memberof koinos.protocol.call_contract_operation
|
|
1473
|
+
* @static
|
|
1474
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1475
|
+
* @returns {string} The default type url
|
|
1476
|
+
*/
|
|
1477
|
+
call_contract_operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1478
|
+
if (typeUrlPrefix === undefined) {
|
|
1479
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1480
|
+
}
|
|
1481
|
+
return typeUrlPrefix + "/koinos.protocol.call_contract_operation";
|
|
1482
|
+
};
|
|
1395
1483
|
return call_contract_operation;
|
|
1396
1484
|
})();
|
|
1397
1485
|
protocol.set_system_call_operation = (function () {
|
|
@@ -1493,13 +1581,15 @@
|
|
|
1493
1581
|
while (reader.pos < end) {
|
|
1494
1582
|
var tag = reader.uint32();
|
|
1495
1583
|
switch (tag >>> 3) {
|
|
1496
|
-
case 1:
|
|
1584
|
+
case 1: {
|
|
1497
1585
|
message.call_id = reader.uint32();
|
|
1498
1586
|
break;
|
|
1499
|
-
|
|
1587
|
+
}
|
|
1588
|
+
case 2: {
|
|
1500
1589
|
message.target =
|
|
1501
1590
|
$root.koinos.protocol.system_call_target.decode(reader, reader.uint32());
|
|
1502
1591
|
break;
|
|
1592
|
+
}
|
|
1503
1593
|
default:
|
|
1504
1594
|
reader.skipType(tag & 7);
|
|
1505
1595
|
break;
|
|
@@ -1598,6 +1688,20 @@
|
|
|
1598
1688
|
set_system_call_operation.prototype.toJSON = function toJSON() {
|
|
1599
1689
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1600
1690
|
};
|
|
1691
|
+
/**
|
|
1692
|
+
* Gets the default type url for set_system_call_operation
|
|
1693
|
+
* @function getTypeUrl
|
|
1694
|
+
* @memberof koinos.protocol.set_system_call_operation
|
|
1695
|
+
* @static
|
|
1696
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1697
|
+
* @returns {string} The default type url
|
|
1698
|
+
*/
|
|
1699
|
+
set_system_call_operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1700
|
+
if (typeUrlPrefix === undefined) {
|
|
1701
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1702
|
+
}
|
|
1703
|
+
return typeUrlPrefix + "/koinos.protocol.set_system_call_operation";
|
|
1704
|
+
};
|
|
1601
1705
|
return set_system_call_operation;
|
|
1602
1706
|
})();
|
|
1603
1707
|
protocol.set_system_contract_operation = (function () {
|
|
@@ -1702,12 +1806,14 @@
|
|
|
1702
1806
|
while (reader.pos < end) {
|
|
1703
1807
|
var tag = reader.uint32();
|
|
1704
1808
|
switch (tag >>> 3) {
|
|
1705
|
-
case 1:
|
|
1809
|
+
case 1: {
|
|
1706
1810
|
message.contract_id = reader.bytes();
|
|
1707
1811
|
break;
|
|
1708
|
-
|
|
1812
|
+
}
|
|
1813
|
+
case 2: {
|
|
1709
1814
|
message.system_contract = reader.bool();
|
|
1710
1815
|
break;
|
|
1816
|
+
}
|
|
1711
1817
|
default:
|
|
1712
1818
|
reader.skipType(tag & 7);
|
|
1713
1819
|
break;
|
|
@@ -1770,7 +1876,7 @@
|
|
|
1770
1876
|
if (object.contract_id != null)
|
|
1771
1877
|
if (typeof object.contract_id === "string")
|
|
1772
1878
|
$util.base64.decode(object.contract_id, (message.contract_id = $util.newBuffer($util.base64.length(object.contract_id))), 0);
|
|
1773
|
-
else if (object.contract_id.length)
|
|
1879
|
+
else if (object.contract_id.length >= 0)
|
|
1774
1880
|
message.contract_id = object.contract_id;
|
|
1775
1881
|
if (object.system_contract != null)
|
|
1776
1882
|
message.system_contract = Boolean(object.system_contract);
|
|
@@ -1822,6 +1928,20 @@
|
|
|
1822
1928
|
set_system_contract_operation.prototype.toJSON = function toJSON() {
|
|
1823
1929
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1824
1930
|
};
|
|
1931
|
+
/**
|
|
1932
|
+
* Gets the default type url for set_system_contract_operation
|
|
1933
|
+
* @function getTypeUrl
|
|
1934
|
+
* @memberof koinos.protocol.set_system_contract_operation
|
|
1935
|
+
* @static
|
|
1936
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1937
|
+
* @returns {string} The default type url
|
|
1938
|
+
*/
|
|
1939
|
+
set_system_contract_operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1940
|
+
if (typeUrlPrefix === undefined) {
|
|
1941
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1942
|
+
}
|
|
1943
|
+
return (typeUrlPrefix + "/koinos.protocol.set_system_contract_operation");
|
|
1944
|
+
};
|
|
1825
1945
|
return set_system_contract_operation;
|
|
1826
1946
|
})();
|
|
1827
1947
|
protocol.operation = (function () {
|
|
@@ -1968,22 +2088,26 @@
|
|
|
1968
2088
|
while (reader.pos < end) {
|
|
1969
2089
|
var tag = reader.uint32();
|
|
1970
2090
|
switch (tag >>> 3) {
|
|
1971
|
-
case 1:
|
|
2091
|
+
case 1: {
|
|
1972
2092
|
message.upload_contract =
|
|
1973
2093
|
$root.koinos.protocol.upload_contract_operation.decode(reader, reader.uint32());
|
|
1974
2094
|
break;
|
|
1975
|
-
|
|
2095
|
+
}
|
|
2096
|
+
case 2: {
|
|
1976
2097
|
message.call_contract =
|
|
1977
2098
|
$root.koinos.protocol.call_contract_operation.decode(reader, reader.uint32());
|
|
1978
2099
|
break;
|
|
1979
|
-
|
|
2100
|
+
}
|
|
2101
|
+
case 3: {
|
|
1980
2102
|
message.set_system_call =
|
|
1981
2103
|
$root.koinos.protocol.set_system_call_operation.decode(reader, reader.uint32());
|
|
1982
2104
|
break;
|
|
1983
|
-
|
|
2105
|
+
}
|
|
2106
|
+
case 4: {
|
|
1984
2107
|
message.set_system_contract =
|
|
1985
2108
|
$root.koinos.protocol.set_system_contract_operation.decode(reader, reader.uint32());
|
|
1986
2109
|
break;
|
|
2110
|
+
}
|
|
1987
2111
|
default:
|
|
1988
2112
|
reader.skipType(tag & 7);
|
|
1989
2113
|
break;
|
|
@@ -2153,6 +2277,20 @@
|
|
|
2153
2277
|
operation.prototype.toJSON = function toJSON() {
|
|
2154
2278
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2155
2279
|
};
|
|
2280
|
+
/**
|
|
2281
|
+
* Gets the default type url for operation
|
|
2282
|
+
* @function getTypeUrl
|
|
2283
|
+
* @memberof koinos.protocol.operation
|
|
2284
|
+
* @static
|
|
2285
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2286
|
+
* @returns {string} The default type url
|
|
2287
|
+
*/
|
|
2288
|
+
operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
2289
|
+
if (typeUrlPrefix === undefined) {
|
|
2290
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
2291
|
+
}
|
|
2292
|
+
return typeUrlPrefix + "/koinos.protocol.operation";
|
|
2293
|
+
};
|
|
2156
2294
|
return operation;
|
|
2157
2295
|
})();
|
|
2158
2296
|
protocol.transaction_header = (function () {
|
|
@@ -2300,24 +2438,30 @@
|
|
|
2300
2438
|
while (reader.pos < end) {
|
|
2301
2439
|
var tag = reader.uint32();
|
|
2302
2440
|
switch (tag >>> 3) {
|
|
2303
|
-
case 1:
|
|
2441
|
+
case 1: {
|
|
2304
2442
|
message.chain_id = reader.bytes();
|
|
2305
2443
|
break;
|
|
2306
|
-
|
|
2444
|
+
}
|
|
2445
|
+
case 2: {
|
|
2307
2446
|
message.rc_limit = reader.uint64();
|
|
2308
2447
|
break;
|
|
2309
|
-
|
|
2448
|
+
}
|
|
2449
|
+
case 3: {
|
|
2310
2450
|
message.nonce = reader.bytes();
|
|
2311
2451
|
break;
|
|
2312
|
-
|
|
2452
|
+
}
|
|
2453
|
+
case 4: {
|
|
2313
2454
|
message.operation_merkle_root = reader.bytes();
|
|
2314
2455
|
break;
|
|
2315
|
-
|
|
2456
|
+
}
|
|
2457
|
+
case 5: {
|
|
2316
2458
|
message.payer = reader.bytes();
|
|
2317
2459
|
break;
|
|
2318
|
-
|
|
2460
|
+
}
|
|
2461
|
+
case 6: {
|
|
2319
2462
|
message.payee = reader.bytes();
|
|
2320
2463
|
break;
|
|
2464
|
+
}
|
|
2321
2465
|
default:
|
|
2322
2466
|
reader.skipType(tag & 7);
|
|
2323
2467
|
break;
|
|
@@ -2397,7 +2541,7 @@
|
|
|
2397
2541
|
if (object.chain_id != null)
|
|
2398
2542
|
if (typeof object.chain_id === "string")
|
|
2399
2543
|
$util.base64.decode(object.chain_id, (message.chain_id = $util.newBuffer($util.base64.length(object.chain_id))), 0);
|
|
2400
|
-
else if (object.chain_id.length)
|
|
2544
|
+
else if (object.chain_id.length >= 0)
|
|
2401
2545
|
message.chain_id = object.chain_id;
|
|
2402
2546
|
if (object.rc_limit != null)
|
|
2403
2547
|
if ($util.Long)
|
|
@@ -2411,22 +2555,22 @@
|
|
|
2411
2555
|
if (object.nonce != null)
|
|
2412
2556
|
if (typeof object.nonce === "string")
|
|
2413
2557
|
$util.base64.decode(object.nonce, (message.nonce = $util.newBuffer($util.base64.length(object.nonce))), 0);
|
|
2414
|
-
else if (object.nonce.length)
|
|
2558
|
+
else if (object.nonce.length >= 0)
|
|
2415
2559
|
message.nonce = object.nonce;
|
|
2416
2560
|
if (object.operation_merkle_root != null)
|
|
2417
2561
|
if (typeof object.operation_merkle_root === "string")
|
|
2418
2562
|
$util.base64.decode(object.operation_merkle_root, (message.operation_merkle_root = $util.newBuffer($util.base64.length(object.operation_merkle_root))), 0);
|
|
2419
|
-
else if (object.operation_merkle_root.length)
|
|
2563
|
+
else if (object.operation_merkle_root.length >= 0)
|
|
2420
2564
|
message.operation_merkle_root = object.operation_merkle_root;
|
|
2421
2565
|
if (object.payer != null)
|
|
2422
2566
|
if (typeof object.payer === "string")
|
|
2423
2567
|
$util.base64.decode(object.payer, (message.payer = $util.newBuffer($util.base64.length(object.payer))), 0);
|
|
2424
|
-
else if (object.payer.length)
|
|
2568
|
+
else if (object.payer.length >= 0)
|
|
2425
2569
|
message.payer = object.payer;
|
|
2426
2570
|
if (object.payee != null)
|
|
2427
2571
|
if (typeof object.payee === "string")
|
|
2428
2572
|
$util.base64.decode(object.payee, (message.payee = $util.newBuffer($util.base64.length(object.payee))), 0);
|
|
2429
|
-
else if (object.payee.length)
|
|
2573
|
+
else if (object.payee.length >= 0)
|
|
2430
2574
|
message.payee = object.payee;
|
|
2431
2575
|
return message;
|
|
2432
2576
|
};
|
|
@@ -2552,6 +2696,20 @@
|
|
|
2552
2696
|
transaction_header.prototype.toJSON = function toJSON() {
|
|
2553
2697
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2554
2698
|
};
|
|
2699
|
+
/**
|
|
2700
|
+
* Gets the default type url for transaction_header
|
|
2701
|
+
* @function getTypeUrl
|
|
2702
|
+
* @memberof koinos.protocol.transaction_header
|
|
2703
|
+
* @static
|
|
2704
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2705
|
+
* @returns {string} The default type url
|
|
2706
|
+
*/
|
|
2707
|
+
transaction_header.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
2708
|
+
if (typeUrlPrefix === undefined) {
|
|
2709
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
2710
|
+
}
|
|
2711
|
+
return typeUrlPrefix + "/koinos.protocol.transaction_header";
|
|
2712
|
+
};
|
|
2555
2713
|
return transaction_header;
|
|
2556
2714
|
})();
|
|
2557
2715
|
protocol.transaction = (function () {
|
|
@@ -2680,23 +2838,27 @@
|
|
|
2680
2838
|
while (reader.pos < end) {
|
|
2681
2839
|
var tag = reader.uint32();
|
|
2682
2840
|
switch (tag >>> 3) {
|
|
2683
|
-
case 1:
|
|
2841
|
+
case 1: {
|
|
2684
2842
|
message.id = reader.bytes();
|
|
2685
2843
|
break;
|
|
2686
|
-
|
|
2844
|
+
}
|
|
2845
|
+
case 2: {
|
|
2687
2846
|
message.header =
|
|
2688
2847
|
$root.koinos.protocol.transaction_header.decode(reader, reader.uint32());
|
|
2689
2848
|
break;
|
|
2690
|
-
|
|
2849
|
+
}
|
|
2850
|
+
case 3: {
|
|
2691
2851
|
if (!(message.operations && message.operations.length))
|
|
2692
2852
|
message.operations = [];
|
|
2693
2853
|
message.operations.push($root.koinos.protocol.operation.decode(reader, reader.uint32()));
|
|
2694
2854
|
break;
|
|
2695
|
-
|
|
2855
|
+
}
|
|
2856
|
+
case 4: {
|
|
2696
2857
|
if (!(message.signatures && message.signatures.length))
|
|
2697
2858
|
message.signatures = [];
|
|
2698
2859
|
message.signatures.push(reader.bytes());
|
|
2699
2860
|
break;
|
|
2861
|
+
}
|
|
2700
2862
|
default:
|
|
2701
2863
|
reader.skipType(tag & 7);
|
|
2702
2864
|
break;
|
|
@@ -2776,7 +2938,7 @@
|
|
|
2776
2938
|
if (object.id != null)
|
|
2777
2939
|
if (typeof object.id === "string")
|
|
2778
2940
|
$util.base64.decode(object.id, (message.id = $util.newBuffer($util.base64.length(object.id))), 0);
|
|
2779
|
-
else if (object.id.length)
|
|
2941
|
+
else if (object.id.length >= 0)
|
|
2780
2942
|
message.id = object.id;
|
|
2781
2943
|
if (object.header != null) {
|
|
2782
2944
|
if (typeof object.header !== "object")
|
|
@@ -2802,7 +2964,7 @@
|
|
|
2802
2964
|
for (var i = 0; i < object.signatures.length; ++i)
|
|
2803
2965
|
if (typeof object.signatures[i] === "string")
|
|
2804
2966
|
$util.base64.decode(object.signatures[i], (message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i]))), 0);
|
|
2805
|
-
else if (object.signatures[i].length)
|
|
2967
|
+
else if (object.signatures[i].length >= 0)
|
|
2806
2968
|
message.signatures[i] = object.signatures[i];
|
|
2807
2969
|
}
|
|
2808
2970
|
return message;
|
|
@@ -2870,6 +3032,20 @@
|
|
|
2870
3032
|
transaction.prototype.toJSON = function toJSON() {
|
|
2871
3033
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2872
3034
|
};
|
|
3035
|
+
/**
|
|
3036
|
+
* Gets the default type url for transaction
|
|
3037
|
+
* @function getTypeUrl
|
|
3038
|
+
* @memberof koinos.protocol.transaction
|
|
3039
|
+
* @static
|
|
3040
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3041
|
+
* @returns {string} The default type url
|
|
3042
|
+
*/
|
|
3043
|
+
transaction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3044
|
+
if (typeUrlPrefix === undefined) {
|
|
3045
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3046
|
+
}
|
|
3047
|
+
return typeUrlPrefix + "/koinos.protocol.transaction";
|
|
3048
|
+
};
|
|
2873
3049
|
return transaction;
|
|
2874
3050
|
})();
|
|
2875
3051
|
protocol.transaction_receipt = (function () {
|
|
@@ -3093,43 +3269,54 @@
|
|
|
3093
3269
|
while (reader.pos < end) {
|
|
3094
3270
|
var tag = reader.uint32();
|
|
3095
3271
|
switch (tag >>> 3) {
|
|
3096
|
-
case 1:
|
|
3272
|
+
case 1: {
|
|
3097
3273
|
message.id = reader.bytes();
|
|
3098
3274
|
break;
|
|
3099
|
-
|
|
3275
|
+
}
|
|
3276
|
+
case 2: {
|
|
3100
3277
|
message.payer = reader.bytes();
|
|
3101
3278
|
break;
|
|
3102
|
-
|
|
3279
|
+
}
|
|
3280
|
+
case 3: {
|
|
3103
3281
|
message.max_payer_rc = reader.uint64();
|
|
3104
3282
|
break;
|
|
3105
|
-
|
|
3283
|
+
}
|
|
3284
|
+
case 4: {
|
|
3106
3285
|
message.rc_limit = reader.uint64();
|
|
3107
3286
|
break;
|
|
3108
|
-
|
|
3287
|
+
}
|
|
3288
|
+
case 5: {
|
|
3109
3289
|
message.rc_used = reader.uint64();
|
|
3110
3290
|
break;
|
|
3111
|
-
|
|
3291
|
+
}
|
|
3292
|
+
case 6: {
|
|
3112
3293
|
message.disk_storage_used = reader.uint64();
|
|
3113
3294
|
break;
|
|
3114
|
-
|
|
3295
|
+
}
|
|
3296
|
+
case 7: {
|
|
3115
3297
|
message.network_bandwidth_used = reader.uint64();
|
|
3116
3298
|
break;
|
|
3117
|
-
|
|
3299
|
+
}
|
|
3300
|
+
case 8: {
|
|
3118
3301
|
message.compute_bandwidth_used = reader.uint64();
|
|
3119
3302
|
break;
|
|
3120
|
-
|
|
3303
|
+
}
|
|
3304
|
+
case 9: {
|
|
3121
3305
|
message.reverted = reader.bool();
|
|
3122
3306
|
break;
|
|
3123
|
-
|
|
3307
|
+
}
|
|
3308
|
+
case 10: {
|
|
3124
3309
|
if (!(message.events && message.events.length))
|
|
3125
3310
|
message.events = [];
|
|
3126
3311
|
message.events.push($root.koinos.protocol.event_data.decode(reader, reader.uint32()));
|
|
3127
3312
|
break;
|
|
3128
|
-
|
|
3313
|
+
}
|
|
3314
|
+
case 11: {
|
|
3129
3315
|
if (!(message.logs && message.logs.length))
|
|
3130
3316
|
message.logs = [];
|
|
3131
3317
|
message.logs.push(reader.string());
|
|
3132
3318
|
break;
|
|
3319
|
+
}
|
|
3133
3320
|
default:
|
|
3134
3321
|
reader.skipType(tag & 7);
|
|
3135
3322
|
break;
|
|
@@ -3247,12 +3434,12 @@
|
|
|
3247
3434
|
if (object.id != null)
|
|
3248
3435
|
if (typeof object.id === "string")
|
|
3249
3436
|
$util.base64.decode(object.id, (message.id = $util.newBuffer($util.base64.length(object.id))), 0);
|
|
3250
|
-
else if (object.id.length)
|
|
3437
|
+
else if (object.id.length >= 0)
|
|
3251
3438
|
message.id = object.id;
|
|
3252
3439
|
if (object.payer != null)
|
|
3253
3440
|
if (typeof object.payer === "string")
|
|
3254
3441
|
$util.base64.decode(object.payer, (message.payer = $util.newBuffer($util.base64.length(object.payer))), 0);
|
|
3255
|
-
else if (object.payer.length)
|
|
3442
|
+
else if (object.payer.length >= 0)
|
|
3256
3443
|
message.payer = object.payer;
|
|
3257
3444
|
if (object.max_payer_rc != null)
|
|
3258
3445
|
if ($util.Long)
|
|
@@ -3551,6 +3738,20 @@
|
|
|
3551
3738
|
transaction_receipt.prototype.toJSON = function toJSON() {
|
|
3552
3739
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3553
3740
|
};
|
|
3741
|
+
/**
|
|
3742
|
+
* Gets the default type url for transaction_receipt
|
|
3743
|
+
* @function getTypeUrl
|
|
3744
|
+
* @memberof koinos.protocol.transaction_receipt
|
|
3745
|
+
* @static
|
|
3746
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
3747
|
+
* @returns {string} The default type url
|
|
3748
|
+
*/
|
|
3749
|
+
transaction_receipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
3750
|
+
if (typeUrlPrefix === undefined) {
|
|
3751
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
3752
|
+
}
|
|
3753
|
+
return typeUrlPrefix + "/koinos.protocol.transaction_receipt";
|
|
3754
|
+
};
|
|
3554
3755
|
return transaction_receipt;
|
|
3555
3756
|
})();
|
|
3556
3757
|
protocol.block_header = (function () {
|
|
@@ -3564,6 +3765,7 @@
|
|
|
3564
3765
|
* @property {Uint8Array|null} [previous_state_merkle_root] block_header previous_state_merkle_root
|
|
3565
3766
|
* @property {Uint8Array|null} [transaction_merkle_root] block_header transaction_merkle_root
|
|
3566
3767
|
* @property {Uint8Array|null} [signer] block_header signer
|
|
3768
|
+
* @property {Array.<Uint8Array>|null} [approved_proposals] block_header approved_proposals
|
|
3567
3769
|
*/
|
|
3568
3770
|
/**
|
|
3569
3771
|
* Constructs a new block_header.
|
|
@@ -3574,6 +3776,7 @@
|
|
|
3574
3776
|
* @param {koinos.protocol.Iblock_header=} [properties] Properties to set
|
|
3575
3777
|
*/
|
|
3576
3778
|
function block_header(properties) {
|
|
3779
|
+
this.approved_proposals = [];
|
|
3577
3780
|
if (properties)
|
|
3578
3781
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
3579
3782
|
if (properties[keys[i]] != null)
|
|
@@ -3625,6 +3828,13 @@
|
|
|
3625
3828
|
* @instance
|
|
3626
3829
|
*/
|
|
3627
3830
|
block_header.prototype.signer = $util.newBuffer([]);
|
|
3831
|
+
/**
|
|
3832
|
+
* block_header approved_proposals.
|
|
3833
|
+
* @member {Array.<Uint8Array>} approved_proposals
|
|
3834
|
+
* @memberof koinos.protocol.block_header
|
|
3835
|
+
* @instance
|
|
3836
|
+
*/
|
|
3837
|
+
block_header.prototype.approved_proposals = $util.emptyArray;
|
|
3628
3838
|
/**
|
|
3629
3839
|
* Creates a new block_header instance using the specified properties.
|
|
3630
3840
|
* @function create
|
|
@@ -3670,6 +3880,12 @@
|
|
|
3670
3880
|
if (message.signer != null &&
|
|
3671
3881
|
Object.hasOwnProperty.call(message, "signer"))
|
|
3672
3882
|
writer.uint32(/* id 6, wireType 2 =*/ 50).bytes(message.signer);
|
|
3883
|
+
if (message.approved_proposals != null &&
|
|
3884
|
+
message.approved_proposals.length)
|
|
3885
|
+
for (var i = 0; i < message.approved_proposals.length; ++i)
|
|
3886
|
+
writer
|
|
3887
|
+
.uint32(/* id 7, wireType 2 =*/ 58)
|
|
3888
|
+
.bytes(message.approved_proposals[i]);
|
|
3673
3889
|
return writer;
|
|
3674
3890
|
};
|
|
3675
3891
|
/**
|
|
@@ -3702,24 +3918,37 @@
|
|
|
3702
3918
|
while (reader.pos < end) {
|
|
3703
3919
|
var tag = reader.uint32();
|
|
3704
3920
|
switch (tag >>> 3) {
|
|
3705
|
-
case 1:
|
|
3921
|
+
case 1: {
|
|
3706
3922
|
message.previous = reader.bytes();
|
|
3707
3923
|
break;
|
|
3708
|
-
|
|
3924
|
+
}
|
|
3925
|
+
case 2: {
|
|
3709
3926
|
message.height = reader.uint64();
|
|
3710
3927
|
break;
|
|
3711
|
-
|
|
3928
|
+
}
|
|
3929
|
+
case 3: {
|
|
3712
3930
|
message.timestamp = reader.uint64();
|
|
3713
3931
|
break;
|
|
3714
|
-
|
|
3932
|
+
}
|
|
3933
|
+
case 4: {
|
|
3715
3934
|
message.previous_state_merkle_root = reader.bytes();
|
|
3716
3935
|
break;
|
|
3717
|
-
|
|
3936
|
+
}
|
|
3937
|
+
case 5: {
|
|
3718
3938
|
message.transaction_merkle_root = reader.bytes();
|
|
3719
3939
|
break;
|
|
3720
|
-
|
|
3940
|
+
}
|
|
3941
|
+
case 6: {
|
|
3721
3942
|
message.signer = reader.bytes();
|
|
3722
3943
|
break;
|
|
3944
|
+
}
|
|
3945
|
+
case 7: {
|
|
3946
|
+
if (!(message.approved_proposals &&
|
|
3947
|
+
message.approved_proposals.length))
|
|
3948
|
+
message.approved_proposals = [];
|
|
3949
|
+
message.approved_proposals.push(reader.bytes());
|
|
3950
|
+
break;
|
|
3951
|
+
}
|
|
3723
3952
|
default:
|
|
3724
3953
|
reader.skipType(tag & 7);
|
|
3725
3954
|
break;
|
|
@@ -3787,6 +4016,16 @@
|
|
|
3787
4016
|
if (!((message.signer && typeof message.signer.length === "number") ||
|
|
3788
4017
|
$util.isString(message.signer)))
|
|
3789
4018
|
return "signer: buffer expected";
|
|
4019
|
+
if (message.approved_proposals != null &&
|
|
4020
|
+
message.hasOwnProperty("approved_proposals")) {
|
|
4021
|
+
if (!Array.isArray(message.approved_proposals))
|
|
4022
|
+
return "approved_proposals: array expected";
|
|
4023
|
+
for (var i = 0; i < message.approved_proposals.length; ++i)
|
|
4024
|
+
if (!((message.approved_proposals[i] &&
|
|
4025
|
+
typeof message.approved_proposals[i].length === "number") ||
|
|
4026
|
+
$util.isString(message.approved_proposals[i])))
|
|
4027
|
+
return "approved_proposals: buffer[] expected";
|
|
4028
|
+
}
|
|
3790
4029
|
return null;
|
|
3791
4030
|
};
|
|
3792
4031
|
/**
|
|
@@ -3804,7 +4043,7 @@
|
|
|
3804
4043
|
if (object.previous != null)
|
|
3805
4044
|
if (typeof object.previous === "string")
|
|
3806
4045
|
$util.base64.decode(object.previous, (message.previous = $util.newBuffer($util.base64.length(object.previous))), 0);
|
|
3807
|
-
else if (object.previous.length)
|
|
4046
|
+
else if (object.previous.length >= 0)
|
|
3808
4047
|
message.previous = object.previous;
|
|
3809
4048
|
if (object.height != null)
|
|
3810
4049
|
if ($util.Long)
|
|
@@ -3827,19 +4066,29 @@
|
|
|
3827
4066
|
if (object.previous_state_merkle_root != null)
|
|
3828
4067
|
if (typeof object.previous_state_merkle_root === "string")
|
|
3829
4068
|
$util.base64.decode(object.previous_state_merkle_root, (message.previous_state_merkle_root = $util.newBuffer($util.base64.length(object.previous_state_merkle_root))), 0);
|
|
3830
|
-
else if (object.previous_state_merkle_root.length)
|
|
4069
|
+
else if (object.previous_state_merkle_root.length >= 0)
|
|
3831
4070
|
message.previous_state_merkle_root =
|
|
3832
4071
|
object.previous_state_merkle_root;
|
|
3833
4072
|
if (object.transaction_merkle_root != null)
|
|
3834
4073
|
if (typeof object.transaction_merkle_root === "string")
|
|
3835
4074
|
$util.base64.decode(object.transaction_merkle_root, (message.transaction_merkle_root = $util.newBuffer($util.base64.length(object.transaction_merkle_root))), 0);
|
|
3836
|
-
else if (object.transaction_merkle_root.length)
|
|
4075
|
+
else if (object.transaction_merkle_root.length >= 0)
|
|
3837
4076
|
message.transaction_merkle_root = object.transaction_merkle_root;
|
|
3838
4077
|
if (object.signer != null)
|
|
3839
4078
|
if (typeof object.signer === "string")
|
|
3840
4079
|
$util.base64.decode(object.signer, (message.signer = $util.newBuffer($util.base64.length(object.signer))), 0);
|
|
3841
|
-
else if (object.signer.length)
|
|
4080
|
+
else if (object.signer.length >= 0)
|
|
3842
4081
|
message.signer = object.signer;
|
|
4082
|
+
if (object.approved_proposals) {
|
|
4083
|
+
if (!Array.isArray(object.approved_proposals))
|
|
4084
|
+
throw TypeError(".koinos.protocol.block_header.approved_proposals: array expected");
|
|
4085
|
+
message.approved_proposals = [];
|
|
4086
|
+
for (var i = 0; i < object.approved_proposals.length; ++i)
|
|
4087
|
+
if (typeof object.approved_proposals[i] === "string")
|
|
4088
|
+
$util.base64.decode(object.approved_proposals[i], (message.approved_proposals[i] = $util.newBuffer($util.base64.length(object.approved_proposals[i]))), 0);
|
|
4089
|
+
else if (object.approved_proposals[i].length >= 0)
|
|
4090
|
+
message.approved_proposals[i] = object.approved_proposals[i];
|
|
4091
|
+
}
|
|
3843
4092
|
return message;
|
|
3844
4093
|
};
|
|
3845
4094
|
/**
|
|
@@ -3855,6 +4104,8 @@
|
|
|
3855
4104
|
if (!options)
|
|
3856
4105
|
options = {};
|
|
3857
4106
|
var object = {};
|
|
4107
|
+
if (options.arrays || options.defaults)
|
|
4108
|
+
object.approved_proposals = [];
|
|
3858
4109
|
if (options.defaults) {
|
|
3859
4110
|
if (options.bytes === String)
|
|
3860
4111
|
object.previous = "";
|
|
@@ -3963,6 +4214,16 @@
|
|
|
3963
4214
|
: options.bytes === Array
|
|
3964
4215
|
? Array.prototype.slice.call(message.signer)
|
|
3965
4216
|
: message.signer;
|
|
4217
|
+
if (message.approved_proposals && message.approved_proposals.length) {
|
|
4218
|
+
object.approved_proposals = [];
|
|
4219
|
+
for (var j = 0; j < message.approved_proposals.length; ++j)
|
|
4220
|
+
object.approved_proposals[j] =
|
|
4221
|
+
options.bytes === String
|
|
4222
|
+
? $util.base64.encode(message.approved_proposals[j], 0, message.approved_proposals[j].length)
|
|
4223
|
+
: options.bytes === Array
|
|
4224
|
+
? Array.prototype.slice.call(message.approved_proposals[j])
|
|
4225
|
+
: message.approved_proposals[j];
|
|
4226
|
+
}
|
|
3966
4227
|
return object;
|
|
3967
4228
|
};
|
|
3968
4229
|
/**
|
|
@@ -3975,6 +4236,20 @@
|
|
|
3975
4236
|
block_header.prototype.toJSON = function toJSON() {
|
|
3976
4237
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
3977
4238
|
};
|
|
4239
|
+
/**
|
|
4240
|
+
* Gets the default type url for block_header
|
|
4241
|
+
* @function getTypeUrl
|
|
4242
|
+
* @memberof koinos.protocol.block_header
|
|
4243
|
+
* @static
|
|
4244
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4245
|
+
* @returns {string} The default type url
|
|
4246
|
+
*/
|
|
4247
|
+
block_header.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4248
|
+
if (typeUrlPrefix === undefined) {
|
|
4249
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
4250
|
+
}
|
|
4251
|
+
return typeUrlPrefix + "/koinos.protocol.block_header";
|
|
4252
|
+
};
|
|
3978
4253
|
return block_header;
|
|
3979
4254
|
})();
|
|
3980
4255
|
protocol.block = (function () {
|
|
@@ -4100,20 +4375,24 @@
|
|
|
4100
4375
|
while (reader.pos < end) {
|
|
4101
4376
|
var tag = reader.uint32();
|
|
4102
4377
|
switch (tag >>> 3) {
|
|
4103
|
-
case 1:
|
|
4378
|
+
case 1: {
|
|
4104
4379
|
message.id = reader.bytes();
|
|
4105
4380
|
break;
|
|
4106
|
-
|
|
4381
|
+
}
|
|
4382
|
+
case 2: {
|
|
4107
4383
|
message.header = $root.koinos.protocol.block_header.decode(reader, reader.uint32());
|
|
4108
4384
|
break;
|
|
4109
|
-
|
|
4385
|
+
}
|
|
4386
|
+
case 3: {
|
|
4110
4387
|
if (!(message.transactions && message.transactions.length))
|
|
4111
4388
|
message.transactions = [];
|
|
4112
4389
|
message.transactions.push($root.koinos.protocol.transaction.decode(reader, reader.uint32()));
|
|
4113
4390
|
break;
|
|
4114
|
-
|
|
4391
|
+
}
|
|
4392
|
+
case 4: {
|
|
4115
4393
|
message.signature = reader.bytes();
|
|
4116
4394
|
break;
|
|
4395
|
+
}
|
|
4117
4396
|
default:
|
|
4118
4397
|
reader.skipType(tag & 7);
|
|
4119
4398
|
break;
|
|
@@ -4188,7 +4467,7 @@
|
|
|
4188
4467
|
if (object.id != null)
|
|
4189
4468
|
if (typeof object.id === "string")
|
|
4190
4469
|
$util.base64.decode(object.id, (message.id = $util.newBuffer($util.base64.length(object.id))), 0);
|
|
4191
|
-
else if (object.id.length)
|
|
4470
|
+
else if (object.id.length >= 0)
|
|
4192
4471
|
message.id = object.id;
|
|
4193
4472
|
if (object.header != null) {
|
|
4194
4473
|
if (typeof object.header !== "object")
|
|
@@ -4209,7 +4488,7 @@
|
|
|
4209
4488
|
if (object.signature != null)
|
|
4210
4489
|
if (typeof object.signature === "string")
|
|
4211
4490
|
$util.base64.decode(object.signature, (message.signature = $util.newBuffer($util.base64.length(object.signature))), 0);
|
|
4212
|
-
else if (object.signature.length)
|
|
4491
|
+
else if (object.signature.length >= 0)
|
|
4213
4492
|
message.signature = object.signature;
|
|
4214
4493
|
return message;
|
|
4215
4494
|
};
|
|
@@ -4279,6 +4558,20 @@
|
|
|
4279
4558
|
block.prototype.toJSON = function toJSON() {
|
|
4280
4559
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4281
4560
|
};
|
|
4561
|
+
/**
|
|
4562
|
+
* Gets the default type url for block
|
|
4563
|
+
* @function getTypeUrl
|
|
4564
|
+
* @memberof koinos.protocol.block
|
|
4565
|
+
* @static
|
|
4566
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4567
|
+
* @returns {string} The default type url
|
|
4568
|
+
*/
|
|
4569
|
+
block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4570
|
+
if (typeUrlPrefix === undefined) {
|
|
4571
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
4572
|
+
}
|
|
4573
|
+
return typeUrlPrefix + "/koinos.protocol.block";
|
|
4574
|
+
};
|
|
4282
4575
|
return block;
|
|
4283
4576
|
})();
|
|
4284
4577
|
protocol.block_receipt = (function () {
|
|
@@ -4478,40 +4771,49 @@
|
|
|
4478
4771
|
while (reader.pos < end) {
|
|
4479
4772
|
var tag = reader.uint32();
|
|
4480
4773
|
switch (tag >>> 3) {
|
|
4481
|
-
case 1:
|
|
4774
|
+
case 1: {
|
|
4482
4775
|
message.id = reader.bytes();
|
|
4483
4776
|
break;
|
|
4484
|
-
|
|
4777
|
+
}
|
|
4778
|
+
case 2: {
|
|
4485
4779
|
message.height = reader.uint64();
|
|
4486
4780
|
break;
|
|
4487
|
-
|
|
4781
|
+
}
|
|
4782
|
+
case 3: {
|
|
4488
4783
|
message.disk_storage_used = reader.uint64();
|
|
4489
4784
|
break;
|
|
4490
|
-
|
|
4785
|
+
}
|
|
4786
|
+
case 4: {
|
|
4491
4787
|
message.network_bandwidth_used = reader.uint64();
|
|
4492
4788
|
break;
|
|
4493
|
-
|
|
4789
|
+
}
|
|
4790
|
+
case 5: {
|
|
4494
4791
|
message.compute_bandwidth_used = reader.uint64();
|
|
4495
4792
|
break;
|
|
4496
|
-
|
|
4793
|
+
}
|
|
4794
|
+
case 6: {
|
|
4497
4795
|
message.state_merkle_root = reader.bytes();
|
|
4498
4796
|
break;
|
|
4499
|
-
|
|
4797
|
+
}
|
|
4798
|
+
case 7: {
|
|
4500
4799
|
if (!(message.events && message.events.length))
|
|
4501
4800
|
message.events = [];
|
|
4502
4801
|
message.events.push($root.koinos.protocol.event_data.decode(reader, reader.uint32()));
|
|
4503
4802
|
break;
|
|
4504
|
-
|
|
4803
|
+
}
|
|
4804
|
+
case 8: {
|
|
4505
4805
|
if (!(message.transaction_receipts &&
|
|
4506
4806
|
message.transaction_receipts.length))
|
|
4507
4807
|
message.transaction_receipts = [];
|
|
4508
4808
|
message.transaction_receipts.push($root.koinos.protocol.transaction_receipt.decode(reader, reader.uint32()));
|
|
4509
4809
|
break;
|
|
4510
|
-
|
|
4810
|
+
}
|
|
4811
|
+
case 9: {
|
|
4511
4812
|
if (!(message.logs && message.logs.length))
|
|
4512
4813
|
message.logs = [];
|
|
4513
4814
|
message.logs.push(reader.string());
|
|
4514
4815
|
break;
|
|
4816
|
+
}
|
|
4515
4817
|
default:
|
|
4516
4818
|
reader.skipType(tag & 7);
|
|
4517
4819
|
break;
|
|
@@ -4625,7 +4927,7 @@
|
|
|
4625
4927
|
if (object.id != null)
|
|
4626
4928
|
if (typeof object.id === "string")
|
|
4627
4929
|
$util.base64.decode(object.id, (message.id = $util.newBuffer($util.base64.length(object.id))), 0);
|
|
4628
|
-
else if (object.id.length)
|
|
4930
|
+
else if (object.id.length >= 0)
|
|
4629
4931
|
message.id = object.id;
|
|
4630
4932
|
if (object.height != null)
|
|
4631
4933
|
if ($util.Long)
|
|
@@ -4666,7 +4968,7 @@
|
|
|
4666
4968
|
if (object.state_merkle_root != null)
|
|
4667
4969
|
if (typeof object.state_merkle_root === "string")
|
|
4668
4970
|
$util.base64.decode(object.state_merkle_root, (message.state_merkle_root = $util.newBuffer($util.base64.length(object.state_merkle_root))), 0);
|
|
4669
|
-
else if (object.state_merkle_root.length)
|
|
4971
|
+
else if (object.state_merkle_root.length >= 0)
|
|
4670
4972
|
message.state_merkle_root = object.state_merkle_root;
|
|
4671
4973
|
if (object.events) {
|
|
4672
4974
|
if (!Array.isArray(object.events))
|
|
@@ -4877,6 +5179,20 @@
|
|
|
4877
5179
|
block_receipt.prototype.toJSON = function toJSON() {
|
|
4878
5180
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4879
5181
|
};
|
|
5182
|
+
/**
|
|
5183
|
+
* Gets the default type url for block_receipt
|
|
5184
|
+
* @function getTypeUrl
|
|
5185
|
+
* @memberof koinos.protocol.block_receipt
|
|
5186
|
+
* @static
|
|
5187
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
5188
|
+
* @returns {string} The default type url
|
|
5189
|
+
*/
|
|
5190
|
+
block_receipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5191
|
+
if (typeUrlPrefix === undefined) {
|
|
5192
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5193
|
+
}
|
|
5194
|
+
return typeUrlPrefix + "/koinos.protocol.block_receipt";
|
|
5195
|
+
};
|
|
4880
5196
|
return block_receipt;
|
|
4881
5197
|
})();
|
|
4882
5198
|
return protocol;
|
|
@@ -4894,8 +5210,6 @@
|
|
|
4894
5210
|
* @memberof koinos.chain
|
|
4895
5211
|
* @interface Ivalue_type
|
|
4896
5212
|
* @property {google.protobuf.IAny|null} [message_value] value_type message_value
|
|
4897
|
-
* @property {number|null} [double_value] value_type double_value
|
|
4898
|
-
* @property {number|null} [float_value] value_type float_value
|
|
4899
5213
|
* @property {number|null} [int32_value] value_type int32_value
|
|
4900
5214
|
* @property {number|Long|null} [int64_value] value_type int64_value
|
|
4901
5215
|
* @property {number|null} [uint32_value] value_type uint32_value
|
|
@@ -4931,20 +5245,6 @@
|
|
|
4931
5245
|
* @instance
|
|
4932
5246
|
*/
|
|
4933
5247
|
value_type.prototype.message_value = null;
|
|
4934
|
-
/**
|
|
4935
|
-
* value_type double_value.
|
|
4936
|
-
* @member {number|null|undefined} double_value
|
|
4937
|
-
* @memberof koinos.chain.value_type
|
|
4938
|
-
* @instance
|
|
4939
|
-
*/
|
|
4940
|
-
value_type.prototype.double_value = null;
|
|
4941
|
-
/**
|
|
4942
|
-
* value_type float_value.
|
|
4943
|
-
* @member {number|null|undefined} float_value
|
|
4944
|
-
* @memberof koinos.chain.value_type
|
|
4945
|
-
* @instance
|
|
4946
|
-
*/
|
|
4947
|
-
value_type.prototype.float_value = null;
|
|
4948
5248
|
/**
|
|
4949
5249
|
* value_type int32_value.
|
|
4950
5250
|
* @member {number|null|undefined} int32_value
|
|
@@ -5040,15 +5340,13 @@
|
|
|
5040
5340
|
var $oneOfFields;
|
|
5041
5341
|
/**
|
|
5042
5342
|
* value_type kind.
|
|
5043
|
-
* @member {"message_value"|"
|
|
5343
|
+
* @member {"message_value"|"int32_value"|"int64_value"|"uint32_value"|"uint64_value"|"sint32_value"|"sint64_value"|"fixed32_value"|"fixed64_value"|"sfixed32_value"|"sfixed64_value"|"bool_value"|"string_value"|"bytes_value"|undefined} kind
|
|
5044
5344
|
* @memberof koinos.chain.value_type
|
|
5045
5345
|
* @instance
|
|
5046
5346
|
*/
|
|
5047
5347
|
Object.defineProperty(value_type.prototype, "kind", {
|
|
5048
5348
|
get: $util.oneOfGetter(($oneOfFields = [
|
|
5049
5349
|
"message_value",
|
|
5050
|
-
"double_value",
|
|
5051
|
-
"float_value",
|
|
5052
5350
|
"int32_value",
|
|
5053
5351
|
"int64_value",
|
|
5054
5352
|
"uint32_value",
|
|
@@ -5091,80 +5389,68 @@
|
|
|
5091
5389
|
if (message.message_value != null &&
|
|
5092
5390
|
Object.hasOwnProperty.call(message, "message_value"))
|
|
5093
5391
|
$root.google.protobuf.Any.encode(message.message_value, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();
|
|
5094
|
-
if (message.double_value != null &&
|
|
5095
|
-
Object.hasOwnProperty.call(message, "double_value"))
|
|
5096
|
-
writer
|
|
5097
|
-
.uint32(/* id 2, wireType 1 =*/ 17)
|
|
5098
|
-
.double(message.double_value);
|
|
5099
|
-
if (message.float_value != null &&
|
|
5100
|
-
Object.hasOwnProperty.call(message, "float_value"))
|
|
5101
|
-
writer
|
|
5102
|
-
.uint32(/* id 3, wireType 5 =*/ 29)
|
|
5103
|
-
.float(message.float_value);
|
|
5104
5392
|
if (message.int32_value != null &&
|
|
5105
5393
|
Object.hasOwnProperty.call(message, "int32_value"))
|
|
5106
5394
|
writer
|
|
5107
|
-
.uint32(/* id
|
|
5395
|
+
.uint32(/* id 2, wireType 0 =*/ 16)
|
|
5108
5396
|
.int32(message.int32_value);
|
|
5109
5397
|
if (message.int64_value != null &&
|
|
5110
5398
|
Object.hasOwnProperty.call(message, "int64_value"))
|
|
5111
5399
|
writer
|
|
5112
|
-
.uint32(/* id
|
|
5400
|
+
.uint32(/* id 3, wireType 0 =*/ 24)
|
|
5113
5401
|
.int64(message.int64_value);
|
|
5114
5402
|
if (message.uint32_value != null &&
|
|
5115
5403
|
Object.hasOwnProperty.call(message, "uint32_value"))
|
|
5116
5404
|
writer
|
|
5117
|
-
.uint32(/* id
|
|
5405
|
+
.uint32(/* id 4, wireType 0 =*/ 32)
|
|
5118
5406
|
.uint32(message.uint32_value);
|
|
5119
5407
|
if (message.uint64_value != null &&
|
|
5120
5408
|
Object.hasOwnProperty.call(message, "uint64_value"))
|
|
5121
5409
|
writer
|
|
5122
|
-
.uint32(/* id
|
|
5410
|
+
.uint32(/* id 5, wireType 0 =*/ 40)
|
|
5123
5411
|
.uint64(message.uint64_value);
|
|
5124
5412
|
if (message.sint32_value != null &&
|
|
5125
5413
|
Object.hasOwnProperty.call(message, "sint32_value"))
|
|
5126
5414
|
writer
|
|
5127
|
-
.uint32(/* id
|
|
5415
|
+
.uint32(/* id 6, wireType 0 =*/ 48)
|
|
5128
5416
|
.sint32(message.sint32_value);
|
|
5129
5417
|
if (message.sint64_value != null &&
|
|
5130
5418
|
Object.hasOwnProperty.call(message, "sint64_value"))
|
|
5131
5419
|
writer
|
|
5132
|
-
.uint32(/* id
|
|
5420
|
+
.uint32(/* id 7, wireType 0 =*/ 56)
|
|
5133
5421
|
.sint64(message.sint64_value);
|
|
5134
5422
|
if (message.fixed32_value != null &&
|
|
5135
5423
|
Object.hasOwnProperty.call(message, "fixed32_value"))
|
|
5136
5424
|
writer
|
|
5137
|
-
.uint32(/* id
|
|
5425
|
+
.uint32(/* id 8, wireType 5 =*/ 69)
|
|
5138
5426
|
.fixed32(message.fixed32_value);
|
|
5139
5427
|
if (message.fixed64_value != null &&
|
|
5140
5428
|
Object.hasOwnProperty.call(message, "fixed64_value"))
|
|
5141
5429
|
writer
|
|
5142
|
-
.uint32(/* id
|
|
5430
|
+
.uint32(/* id 9, wireType 1 =*/ 73)
|
|
5143
5431
|
.fixed64(message.fixed64_value);
|
|
5144
5432
|
if (message.sfixed32_value != null &&
|
|
5145
5433
|
Object.hasOwnProperty.call(message, "sfixed32_value"))
|
|
5146
5434
|
writer
|
|
5147
|
-
.uint32(/* id
|
|
5435
|
+
.uint32(/* id 10, wireType 5 =*/ 85)
|
|
5148
5436
|
.sfixed32(message.sfixed32_value);
|
|
5149
5437
|
if (message.sfixed64_value != null &&
|
|
5150
5438
|
Object.hasOwnProperty.call(message, "sfixed64_value"))
|
|
5151
5439
|
writer
|
|
5152
|
-
.uint32(/* id
|
|
5440
|
+
.uint32(/* id 11, wireType 1 =*/ 89)
|
|
5153
5441
|
.sfixed64(message.sfixed64_value);
|
|
5154
5442
|
if (message.bool_value != null &&
|
|
5155
5443
|
Object.hasOwnProperty.call(message, "bool_value"))
|
|
5156
|
-
writer
|
|
5157
|
-
.uint32(/* id 14, wireType 0 =*/ 112)
|
|
5158
|
-
.bool(message.bool_value);
|
|
5444
|
+
writer.uint32(/* id 12, wireType 0 =*/ 96).bool(message.bool_value);
|
|
5159
5445
|
if (message.string_value != null &&
|
|
5160
5446
|
Object.hasOwnProperty.call(message, "string_value"))
|
|
5161
5447
|
writer
|
|
5162
|
-
.uint32(/* id
|
|
5448
|
+
.uint32(/* id 13, wireType 2 =*/ 106)
|
|
5163
5449
|
.string(message.string_value);
|
|
5164
5450
|
if (message.bytes_value != null &&
|
|
5165
5451
|
Object.hasOwnProperty.call(message, "bytes_value"))
|
|
5166
5452
|
writer
|
|
5167
|
-
.uint32(/* id
|
|
5453
|
+
.uint32(/* id 14, wireType 2 =*/ 114)
|
|
5168
5454
|
.bytes(message.bytes_value);
|
|
5169
5455
|
return writer;
|
|
5170
5456
|
};
|
|
@@ -5198,54 +5484,62 @@
|
|
|
5198
5484
|
while (reader.pos < end) {
|
|
5199
5485
|
var tag = reader.uint32();
|
|
5200
5486
|
switch (tag >>> 3) {
|
|
5201
|
-
case 1:
|
|
5487
|
+
case 1: {
|
|
5202
5488
|
message.message_value = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
|
5203
5489
|
break;
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
break;
|
|
5207
|
-
case 3:
|
|
5208
|
-
message.float_value = reader.float();
|
|
5209
|
-
break;
|
|
5210
|
-
case 4:
|
|
5490
|
+
}
|
|
5491
|
+
case 2: {
|
|
5211
5492
|
message.int32_value = reader.int32();
|
|
5212
5493
|
break;
|
|
5213
|
-
|
|
5494
|
+
}
|
|
5495
|
+
case 3: {
|
|
5214
5496
|
message.int64_value = reader.int64();
|
|
5215
5497
|
break;
|
|
5216
|
-
|
|
5498
|
+
}
|
|
5499
|
+
case 4: {
|
|
5217
5500
|
message.uint32_value = reader.uint32();
|
|
5218
5501
|
break;
|
|
5219
|
-
|
|
5502
|
+
}
|
|
5503
|
+
case 5: {
|
|
5220
5504
|
message.uint64_value = reader.uint64();
|
|
5221
5505
|
break;
|
|
5222
|
-
|
|
5506
|
+
}
|
|
5507
|
+
case 6: {
|
|
5223
5508
|
message.sint32_value = reader.sint32();
|
|
5224
5509
|
break;
|
|
5225
|
-
|
|
5510
|
+
}
|
|
5511
|
+
case 7: {
|
|
5226
5512
|
message.sint64_value = reader.sint64();
|
|
5227
5513
|
break;
|
|
5228
|
-
|
|
5514
|
+
}
|
|
5515
|
+
case 8: {
|
|
5229
5516
|
message.fixed32_value = reader.fixed32();
|
|
5230
5517
|
break;
|
|
5231
|
-
|
|
5518
|
+
}
|
|
5519
|
+
case 9: {
|
|
5232
5520
|
message.fixed64_value = reader.fixed64();
|
|
5233
5521
|
break;
|
|
5234
|
-
|
|
5522
|
+
}
|
|
5523
|
+
case 10: {
|
|
5235
5524
|
message.sfixed32_value = reader.sfixed32();
|
|
5236
5525
|
break;
|
|
5237
|
-
|
|
5526
|
+
}
|
|
5527
|
+
case 11: {
|
|
5238
5528
|
message.sfixed64_value = reader.sfixed64();
|
|
5239
5529
|
break;
|
|
5240
|
-
|
|
5530
|
+
}
|
|
5531
|
+
case 12: {
|
|
5241
5532
|
message.bool_value = reader.bool();
|
|
5242
5533
|
break;
|
|
5243
|
-
|
|
5534
|
+
}
|
|
5535
|
+
case 13: {
|
|
5244
5536
|
message.string_value = reader.string();
|
|
5245
5537
|
break;
|
|
5246
|
-
|
|
5538
|
+
}
|
|
5539
|
+
case 14: {
|
|
5247
5540
|
message.bytes_value = reader.bytes();
|
|
5248
5541
|
break;
|
|
5542
|
+
}
|
|
5249
5543
|
default:
|
|
5250
5544
|
reader.skipType(tag & 7);
|
|
5251
5545
|
break;
|
|
@@ -5289,22 +5583,6 @@
|
|
|
5289
5583
|
return "message_value." + error;
|
|
5290
5584
|
}
|
|
5291
5585
|
}
|
|
5292
|
-
if (message.double_value != null &&
|
|
5293
|
-
message.hasOwnProperty("double_value")) {
|
|
5294
|
-
if (properties.kind === 1)
|
|
5295
|
-
return "kind: multiple values";
|
|
5296
|
-
properties.kind = 1;
|
|
5297
|
-
if (typeof message.double_value !== "number")
|
|
5298
|
-
return "double_value: number expected";
|
|
5299
|
-
}
|
|
5300
|
-
if (message.float_value != null &&
|
|
5301
|
-
message.hasOwnProperty("float_value")) {
|
|
5302
|
-
if (properties.kind === 1)
|
|
5303
|
-
return "kind: multiple values";
|
|
5304
|
-
properties.kind = 1;
|
|
5305
|
-
if (typeof message.float_value !== "number")
|
|
5306
|
-
return "float_value: number expected";
|
|
5307
|
-
}
|
|
5308
5586
|
if (message.int32_value != null &&
|
|
5309
5587
|
message.hasOwnProperty("int32_value")) {
|
|
5310
5588
|
if (properties.kind === 1)
|
|
@@ -5445,10 +5723,6 @@
|
|
|
5445
5723
|
throw TypeError(".koinos.chain.value_type.message_value: object expected");
|
|
5446
5724
|
message.message_value = $root.google.protobuf.Any.fromObject(object.message_value);
|
|
5447
5725
|
}
|
|
5448
|
-
if (object.double_value != null)
|
|
5449
|
-
message.double_value = Number(object.double_value);
|
|
5450
|
-
if (object.float_value != null)
|
|
5451
|
-
message.float_value = Number(object.float_value);
|
|
5452
5726
|
if (object.int32_value != null)
|
|
5453
5727
|
message.int32_value = object.int32_value | 0;
|
|
5454
5728
|
if (object.int64_value != null)
|
|
@@ -5511,7 +5785,7 @@
|
|
|
5511
5785
|
if (object.bytes_value != null)
|
|
5512
5786
|
if (typeof object.bytes_value === "string")
|
|
5513
5787
|
$util.base64.decode(object.bytes_value, (message.bytes_value = $util.newBuffer($util.base64.length(object.bytes_value))), 0);
|
|
5514
|
-
else if (object.bytes_value.length)
|
|
5788
|
+
else if (object.bytes_value.length >= 0)
|
|
5515
5789
|
message.bytes_value = object.bytes_value;
|
|
5516
5790
|
return message;
|
|
5517
5791
|
};
|
|
@@ -5534,24 +5808,6 @@
|
|
|
5534
5808
|
if (options.oneofs)
|
|
5535
5809
|
object.kind = "message_value";
|
|
5536
5810
|
}
|
|
5537
|
-
if (message.double_value != null &&
|
|
5538
|
-
message.hasOwnProperty("double_value")) {
|
|
5539
|
-
object.double_value =
|
|
5540
|
-
options.json && !isFinite(message.double_value)
|
|
5541
|
-
? String(message.double_value)
|
|
5542
|
-
: message.double_value;
|
|
5543
|
-
if (options.oneofs)
|
|
5544
|
-
object.kind = "double_value";
|
|
5545
|
-
}
|
|
5546
|
-
if (message.float_value != null &&
|
|
5547
|
-
message.hasOwnProperty("float_value")) {
|
|
5548
|
-
object.float_value =
|
|
5549
|
-
options.json && !isFinite(message.float_value)
|
|
5550
|
-
? String(message.float_value)
|
|
5551
|
-
: message.float_value;
|
|
5552
|
-
if (options.oneofs)
|
|
5553
|
-
object.kind = "float_value";
|
|
5554
|
-
}
|
|
5555
5811
|
if (message.int32_value != null &&
|
|
5556
5812
|
message.hasOwnProperty("int32_value")) {
|
|
5557
5813
|
object.int32_value = message.int32_value;
|
|
@@ -5702,6 +5958,20 @@
|
|
|
5702
5958
|
value_type.prototype.toJSON = function toJSON() {
|
|
5703
5959
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5704
5960
|
};
|
|
5961
|
+
/**
|
|
5962
|
+
* Gets the default type url for value_type
|
|
5963
|
+
* @function getTypeUrl
|
|
5964
|
+
* @memberof koinos.chain.value_type
|
|
5965
|
+
* @static
|
|
5966
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
5967
|
+
* @returns {string} The default type url
|
|
5968
|
+
*/
|
|
5969
|
+
value_type.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5970
|
+
if (typeUrlPrefix === undefined) {
|
|
5971
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5972
|
+
}
|
|
5973
|
+
return typeUrlPrefix + "/koinos.chain.value_type";
|
|
5974
|
+
};
|
|
5705
5975
|
return value_type;
|
|
5706
5976
|
})();
|
|
5707
5977
|
chain.enum_type = (function () {
|
|
@@ -5801,12 +6071,14 @@
|
|
|
5801
6071
|
while (reader.pos < end) {
|
|
5802
6072
|
var tag = reader.uint32();
|
|
5803
6073
|
switch (tag >>> 3) {
|
|
5804
|
-
case 1:
|
|
6074
|
+
case 1: {
|
|
5805
6075
|
message.name = reader.string();
|
|
5806
6076
|
break;
|
|
5807
|
-
|
|
6077
|
+
}
|
|
6078
|
+
case 2: {
|
|
5808
6079
|
message.number = reader.int32();
|
|
5809
6080
|
break;
|
|
6081
|
+
}
|
|
5810
6082
|
default:
|
|
5811
6083
|
reader.skipType(tag & 7);
|
|
5812
6084
|
break;
|
|
@@ -5899,6 +6171,20 @@
|
|
|
5899
6171
|
enum_type.prototype.toJSON = function toJSON() {
|
|
5900
6172
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5901
6173
|
};
|
|
6174
|
+
/**
|
|
6175
|
+
* Gets the default type url for enum_type
|
|
6176
|
+
* @function getTypeUrl
|
|
6177
|
+
* @memberof koinos.chain.enum_type
|
|
6178
|
+
* @static
|
|
6179
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6180
|
+
* @returns {string} The default type url
|
|
6181
|
+
*/
|
|
6182
|
+
enum_type.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6183
|
+
if (typeUrlPrefix === undefined) {
|
|
6184
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6185
|
+
}
|
|
6186
|
+
return typeUrlPrefix + "/koinos.chain.enum_type";
|
|
6187
|
+
};
|
|
5902
6188
|
return enum_type;
|
|
5903
6189
|
})();
|
|
5904
6190
|
chain.list_type = (function () {
|
|
@@ -5990,11 +6276,12 @@
|
|
|
5990
6276
|
while (reader.pos < end) {
|
|
5991
6277
|
var tag = reader.uint32();
|
|
5992
6278
|
switch (tag >>> 3) {
|
|
5993
|
-
case 1:
|
|
6279
|
+
case 1: {
|
|
5994
6280
|
if (!(message.values && message.values.length))
|
|
5995
6281
|
message.values = [];
|
|
5996
6282
|
message.values.push($root.koinos.chain.value_type.decode(reader, reader.uint32()));
|
|
5997
6283
|
break;
|
|
6284
|
+
}
|
|
5998
6285
|
default:
|
|
5999
6286
|
reader.skipType(tag & 7);
|
|
6000
6287
|
break;
|
|
@@ -6095,6 +6382,20 @@
|
|
|
6095
6382
|
list_type.prototype.toJSON = function toJSON() {
|
|
6096
6383
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6097
6384
|
};
|
|
6385
|
+
/**
|
|
6386
|
+
* Gets the default type url for list_type
|
|
6387
|
+
* @function getTypeUrl
|
|
6388
|
+
* @memberof koinos.chain.list_type
|
|
6389
|
+
* @static
|
|
6390
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6391
|
+
* @returns {string} The default type url
|
|
6392
|
+
*/
|
|
6393
|
+
list_type.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6394
|
+
if (typeUrlPrefix === undefined) {
|
|
6395
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6396
|
+
}
|
|
6397
|
+
return typeUrlPrefix + "/koinos.chain.list_type";
|
|
6398
|
+
};
|
|
6098
6399
|
return list_type;
|
|
6099
6400
|
})();
|
|
6100
6401
|
return chain;
|
|
@@ -6212,12 +6513,14 @@
|
|
|
6212
6513
|
while (reader.pos < end) {
|
|
6213
6514
|
var tag = reader.uint32();
|
|
6214
6515
|
switch (tag >>> 3) {
|
|
6215
|
-
case 1:
|
|
6516
|
+
case 1: {
|
|
6216
6517
|
message.type_url = reader.string();
|
|
6217
6518
|
break;
|
|
6218
|
-
|
|
6519
|
+
}
|
|
6520
|
+
case 2: {
|
|
6219
6521
|
message.value = reader.bytes();
|
|
6220
6522
|
break;
|
|
6523
|
+
}
|
|
6221
6524
|
default:
|
|
6222
6525
|
reader.skipType(tag & 7);
|
|
6223
6526
|
break;
|
|
@@ -6277,7 +6580,7 @@
|
|
|
6277
6580
|
if (object.value != null)
|
|
6278
6581
|
if (typeof object.value === "string")
|
|
6279
6582
|
$util.base64.decode(object.value, (message.value = $util.newBuffer($util.base64.length(object.value))), 0);
|
|
6280
|
-
else if (object.value.length)
|
|
6583
|
+
else if (object.value.length >= 0)
|
|
6281
6584
|
message.value = object.value;
|
|
6282
6585
|
return message;
|
|
6283
6586
|
};
|
|
@@ -6325,6 +6628,20 @@
|
|
|
6325
6628
|
Any.prototype.toJSON = function toJSON() {
|
|
6326
6629
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6327
6630
|
};
|
|
6631
|
+
/**
|
|
6632
|
+
* Gets the default type url for Any
|
|
6633
|
+
* @function getTypeUrl
|
|
6634
|
+
* @memberof google.protobuf.Any
|
|
6635
|
+
* @static
|
|
6636
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6637
|
+
* @returns {string} The default type url
|
|
6638
|
+
*/
|
|
6639
|
+
Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6640
|
+
if (typeUrlPrefix === undefined) {
|
|
6641
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6642
|
+
}
|
|
6643
|
+
return typeUrlPrefix + "/google.protobuf.Any";
|
|
6644
|
+
};
|
|
6328
6645
|
return Any;
|
|
6329
6646
|
})();
|
|
6330
6647
|
return protobuf;
|