@ocap/proto 1.14.3 → 1.14.7

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.
@@ -34,9 +34,6 @@ goog.exportSymbol('proto.ocap.RollupBlock', null, global);
34
34
  goog.exportSymbol('proto.ocap.RollupState', null, global);
35
35
  goog.exportSymbol('proto.ocap.RootState', null, global);
36
36
  goog.exportSymbol('proto.ocap.StakeState', null, global);
37
- goog.exportSymbol('proto.ocap.StatisticsState', null, global);
38
- goog.exportSymbol('proto.ocap.SwapState', null, global);
39
- goog.exportSymbol('proto.ocap.SwapStatistics', null, global);
40
37
  goog.exportSymbol('proto.ocap.TokenState', null, global);
41
38
  /**
42
39
  * Generated by JsPbCodeGenerator.
@@ -70,7 +67,7 @@ if (goog.DEBUG && !COMPILED) {
70
67
  * @constructor
71
68
  */
72
69
  proto.ocap.AssetState = function(opt_data) {
73
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
70
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.ocap.AssetState.repeatedFields_, null);
74
71
  };
75
72
  goog.inherits(proto.ocap.AssetState, jspb.Message);
76
73
  if (goog.DEBUG && !COMPILED) {
@@ -122,69 +119,6 @@ if (goog.DEBUG && !COMPILED) {
122
119
  */
123
120
  proto.ocap.RootState.displayName = 'proto.ocap.RootState';
124
121
  }
125
- /**
126
- * Generated by JsPbCodeGenerator.
127
- * @param {Array=} opt_data Optional initial data array, typically from a
128
- * server response, or constructed directly in Javascript. The array is used
129
- * in place and becomes part of the constructed object. It is not cloned.
130
- * If no data is provided, the constructed object will be empty, but still
131
- * valid.
132
- * @extends {jspb.Message}
133
- * @constructor
134
- */
135
- proto.ocap.StatisticsState = function(opt_data) {
136
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
137
- };
138
- goog.inherits(proto.ocap.StatisticsState, jspb.Message);
139
- if (goog.DEBUG && !COMPILED) {
140
- /**
141
- * @public
142
- * @override
143
- */
144
- proto.ocap.StatisticsState.displayName = 'proto.ocap.StatisticsState';
145
- }
146
- /**
147
- * Generated by JsPbCodeGenerator.
148
- * @param {Array=} opt_data Optional initial data array, typically from a
149
- * server response, or constructed directly in Javascript. The array is used
150
- * in place and becomes part of the constructed object. It is not cloned.
151
- * If no data is provided, the constructed object will be empty, but still
152
- * valid.
153
- * @extends {jspb.Message}
154
- * @constructor
155
- */
156
- proto.ocap.SwapState = function(opt_data) {
157
- jspb.Message.initialize(this, opt_data, 0, -1, proto.ocap.SwapState.repeatedFields_, null);
158
- };
159
- goog.inherits(proto.ocap.SwapState, jspb.Message);
160
- if (goog.DEBUG && !COMPILED) {
161
- /**
162
- * @public
163
- * @override
164
- */
165
- proto.ocap.SwapState.displayName = 'proto.ocap.SwapState';
166
- }
167
- /**
168
- * Generated by JsPbCodeGenerator.
169
- * @param {Array=} opt_data Optional initial data array, typically from a
170
- * server response, or constructed directly in Javascript. The array is used
171
- * in place and becomes part of the constructed object. It is not cloned.
172
- * If no data is provided, the constructed object will be empty, but still
173
- * valid.
174
- * @extends {jspb.Message}
175
- * @constructor
176
- */
177
- proto.ocap.SwapStatistics = function(opt_data) {
178
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
179
- };
180
- goog.inherits(proto.ocap.SwapStatistics, jspb.Message);
181
- if (goog.DEBUG && !COMPILED) {
182
- /**
183
- * @public
184
- * @override
185
- */
186
- proto.ocap.SwapStatistics.displayName = 'proto.ocap.SwapStatistics';
187
- }
188
122
  /**
189
123
  * Generated by JsPbCodeGenerator.
190
124
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -405,10 +339,6 @@ proto.ocap.AccountState.toObject = function(includeInstance, msg) {
405
339
  migratedToList: (f = jspb.Message.getRepeatedField(msg, 13)) == null ? undefined : f,
406
340
  migratedFromList: (f = jspb.Message.getRepeatedField(msg, 14)) == null ? undefined : f,
407
341
  numAssets: jspb.Message.getFieldWithDefault(msg, 15, ""),
408
- stake: (f = msg.getStake()) && type_pb.StakeContext.toObject(includeInstance, f),
409
- pinnedFiles: (f = msg.getPinnedFiles()) && type_pb.CircularQueue.toObject(includeInstance, f),
410
- depositReceived: (f = msg.getDepositReceived()) && type_pb.BigUint.toObject(includeInstance, f),
411
- withdrawItems: (f = msg.getWithdrawItems()) && type_pb.CircularQueue.toObject(includeInstance, f),
412
342
  tokensList: jspb.Message.toObjectList(msg.getTokensList(),
413
343
  type_pb.IndexedTokenInput.toObject, includeInstance),
414
344
  data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f)
@@ -504,26 +434,6 @@ proto.ocap.AccountState.deserializeBinaryFromReader = function(msg, reader) {
504
434
  var value = /** @type {string} */ (reader.readString());
505
435
  msg.setNumAssets(value);
506
436
  break;
507
- case 16:
508
- var value = new type_pb.StakeContext;
509
- reader.readMessage(value,type_pb.StakeContext.deserializeBinaryFromReader);
510
- msg.setStake(value);
511
- break;
512
- case 17:
513
- var value = new type_pb.CircularQueue;
514
- reader.readMessage(value,type_pb.CircularQueue.deserializeBinaryFromReader);
515
- msg.setPinnedFiles(value);
516
- break;
517
- case 19:
518
- var value = new type_pb.BigUint;
519
- reader.readMessage(value,type_pb.BigUint.deserializeBinaryFromReader);
520
- msg.setDepositReceived(value);
521
- break;
522
- case 20:
523
- var value = new type_pb.CircularQueue;
524
- reader.readMessage(value,type_pb.CircularQueue.deserializeBinaryFromReader);
525
- msg.setWithdrawItems(value);
526
- break;
527
437
  case 21:
528
438
  var value = new type_pb.IndexedTokenInput;
529
439
  reader.readMessage(value,type_pb.IndexedTokenInput.deserializeBinaryFromReader);
@@ -658,38 +568,6 @@ proto.ocap.AccountState.serializeBinaryToWriter = function(message, writer) {
658
568
  f
659
569
  );
660
570
  }
661
- f = message.getStake();
662
- if (f != null) {
663
- writer.writeMessage(
664
- 16,
665
- f,
666
- type_pb.StakeContext.serializeBinaryToWriter
667
- );
668
- }
669
- f = message.getPinnedFiles();
670
- if (f != null) {
671
- writer.writeMessage(
672
- 17,
673
- f,
674
- type_pb.CircularQueue.serializeBinaryToWriter
675
- );
676
- }
677
- f = message.getDepositReceived();
678
- if (f != null) {
679
- writer.writeMessage(
680
- 19,
681
- f,
682
- type_pb.BigUint.serializeBinaryToWriter
683
- );
684
- }
685
- f = message.getWithdrawItems();
686
- if (f != null) {
687
- writer.writeMessage(
688
- 20,
689
- f,
690
- type_pb.CircularQueue.serializeBinaryToWriter
691
- );
692
- }
693
571
  f = message.getTokensList();
694
572
  if (f.length > 0) {
695
573
  writer.writeRepeatedMessage(
@@ -1081,154 +959,6 @@ proto.ocap.AccountState.prototype.setNumAssets = function(value) {
1081
959
  };
1082
960
 
1083
961
 
1084
- /**
1085
- * optional StakeContext stake = 16;
1086
- * @return {?proto.ocap.StakeContext}
1087
- */
1088
- proto.ocap.AccountState.prototype.getStake = function() {
1089
- return /** @type{?proto.ocap.StakeContext} */ (
1090
- jspb.Message.getWrapperField(this, type_pb.StakeContext, 16));
1091
- };
1092
-
1093
-
1094
- /**
1095
- * @param {?proto.ocap.StakeContext|undefined} value
1096
- * @return {!proto.ocap.AccountState} returns this
1097
- */
1098
- proto.ocap.AccountState.prototype.setStake = function(value) {
1099
- return jspb.Message.setWrapperField(this, 16, value);
1100
- };
1101
-
1102
-
1103
- /**
1104
- * Clears the message field making it undefined.
1105
- * @return {!proto.ocap.AccountState} returns this
1106
- */
1107
- proto.ocap.AccountState.prototype.clearStake = function() {
1108
- return this.setStake(undefined);
1109
- };
1110
-
1111
-
1112
- /**
1113
- * Returns whether this field is set.
1114
- * @return {boolean}
1115
- */
1116
- proto.ocap.AccountState.prototype.hasStake = function() {
1117
- return jspb.Message.getField(this, 16) != null;
1118
- };
1119
-
1120
-
1121
- /**
1122
- * optional CircularQueue pinned_files = 17;
1123
- * @return {?proto.ocap.CircularQueue}
1124
- */
1125
- proto.ocap.AccountState.prototype.getPinnedFiles = function() {
1126
- return /** @type{?proto.ocap.CircularQueue} */ (
1127
- jspb.Message.getWrapperField(this, type_pb.CircularQueue, 17));
1128
- };
1129
-
1130
-
1131
- /**
1132
- * @param {?proto.ocap.CircularQueue|undefined} value
1133
- * @return {!proto.ocap.AccountState} returns this
1134
- */
1135
- proto.ocap.AccountState.prototype.setPinnedFiles = function(value) {
1136
- return jspb.Message.setWrapperField(this, 17, value);
1137
- };
1138
-
1139
-
1140
- /**
1141
- * Clears the message field making it undefined.
1142
- * @return {!proto.ocap.AccountState} returns this
1143
- */
1144
- proto.ocap.AccountState.prototype.clearPinnedFiles = function() {
1145
- return this.setPinnedFiles(undefined);
1146
- };
1147
-
1148
-
1149
- /**
1150
- * Returns whether this field is set.
1151
- * @return {boolean}
1152
- */
1153
- proto.ocap.AccountState.prototype.hasPinnedFiles = function() {
1154
- return jspb.Message.getField(this, 17) != null;
1155
- };
1156
-
1157
-
1158
- /**
1159
- * optional BigUint deposit_received = 19;
1160
- * @return {?proto.ocap.BigUint}
1161
- */
1162
- proto.ocap.AccountState.prototype.getDepositReceived = function() {
1163
- return /** @type{?proto.ocap.BigUint} */ (
1164
- jspb.Message.getWrapperField(this, type_pb.BigUint, 19));
1165
- };
1166
-
1167
-
1168
- /**
1169
- * @param {?proto.ocap.BigUint|undefined} value
1170
- * @return {!proto.ocap.AccountState} returns this
1171
- */
1172
- proto.ocap.AccountState.prototype.setDepositReceived = function(value) {
1173
- return jspb.Message.setWrapperField(this, 19, value);
1174
- };
1175
-
1176
-
1177
- /**
1178
- * Clears the message field making it undefined.
1179
- * @return {!proto.ocap.AccountState} returns this
1180
- */
1181
- proto.ocap.AccountState.prototype.clearDepositReceived = function() {
1182
- return this.setDepositReceived(undefined);
1183
- };
1184
-
1185
-
1186
- /**
1187
- * Returns whether this field is set.
1188
- * @return {boolean}
1189
- */
1190
- proto.ocap.AccountState.prototype.hasDepositReceived = function() {
1191
- return jspb.Message.getField(this, 19) != null;
1192
- };
1193
-
1194
-
1195
- /**
1196
- * optional CircularQueue withdraw_items = 20;
1197
- * @return {?proto.ocap.CircularQueue}
1198
- */
1199
- proto.ocap.AccountState.prototype.getWithdrawItems = function() {
1200
- return /** @type{?proto.ocap.CircularQueue} */ (
1201
- jspb.Message.getWrapperField(this, type_pb.CircularQueue, 20));
1202
- };
1203
-
1204
-
1205
- /**
1206
- * @param {?proto.ocap.CircularQueue|undefined} value
1207
- * @return {!proto.ocap.AccountState} returns this
1208
- */
1209
- proto.ocap.AccountState.prototype.setWithdrawItems = function(value) {
1210
- return jspb.Message.setWrapperField(this, 20, value);
1211
- };
1212
-
1213
-
1214
- /**
1215
- * Clears the message field making it undefined.
1216
- * @return {!proto.ocap.AccountState} returns this
1217
- */
1218
- proto.ocap.AccountState.prototype.clearWithdrawItems = function() {
1219
- return this.setWithdrawItems(undefined);
1220
- };
1221
-
1222
-
1223
- /**
1224
- * Returns whether this field is set.
1225
- * @return {boolean}
1226
- */
1227
- proto.ocap.AccountState.prototype.hasWithdrawItems = function() {
1228
- return jspb.Message.getField(this, 20) != null;
1229
- };
1230
-
1231
-
1232
962
  /**
1233
963
  * repeated IndexedTokenInput tokens = 21;
1234
964
  * @return {!Array<!proto.ocap.IndexedTokenInput>}
@@ -1305,6 +1035,13 @@ proto.ocap.AccountState.prototype.hasData = function() {
1305
1035
 
1306
1036
 
1307
1037
 
1038
+ /**
1039
+ * List of repeated fields within this message type.
1040
+ * @private {!Array<number>}
1041
+ * @const
1042
+ */
1043
+ proto.ocap.AssetState.repeatedFields_ = [12];
1044
+
1308
1045
 
1309
1046
 
1310
1047
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -1345,7 +1082,9 @@ proto.ocap.AssetState.toObject = function(includeInstance, msg) {
1345
1082
  consumedTime: (f = msg.getConsumedTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1346
1083
  issuer: jspb.Message.getFieldWithDefault(msg, 8, ""),
1347
1084
  parent: jspb.Message.getFieldWithDefault(msg, 9, ""),
1348
- stake: (f = msg.getStake()) && type_pb.StakeContext.toObject(includeInstance, f),
1085
+ endpoint: (f = msg.getEndpoint()) && type_pb.NFTEndpoint.toObject(includeInstance, f),
1086
+ display: (f = msg.getDisplay()) && type_pb.NFTDisplay.toObject(includeInstance, f),
1087
+ tagsList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f,
1349
1088
  context: (f = msg.getContext()) && type_pb.StateContext.toObject(includeInstance, f),
1350
1089
  data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f)
1351
1090
  };
@@ -1421,10 +1160,19 @@ proto.ocap.AssetState.deserializeBinaryFromReader = function(msg, reader) {
1421
1160
  var value = /** @type {string} */ (reader.readString());
1422
1161
  msg.setParent(value);
1423
1162
  break;
1424
- case 13:
1425
- var value = new type_pb.StakeContext;
1426
- reader.readMessage(value,type_pb.StakeContext.deserializeBinaryFromReader);
1427
- msg.setStake(value);
1163
+ case 10:
1164
+ var value = new type_pb.NFTEndpoint;
1165
+ reader.readMessage(value,type_pb.NFTEndpoint.deserializeBinaryFromReader);
1166
+ msg.setEndpoint(value);
1167
+ break;
1168
+ case 11:
1169
+ var value = new type_pb.NFTDisplay;
1170
+ reader.readMessage(value,type_pb.NFTDisplay.deserializeBinaryFromReader);
1171
+ msg.setDisplay(value);
1172
+ break;
1173
+ case 12:
1174
+ var value = /** @type {string} */ (reader.readString());
1175
+ msg.addTags(value);
1428
1176
  break;
1429
1177
  case 14:
1430
1178
  var value = new type_pb.StateContext;
@@ -1529,12 +1277,27 @@ proto.ocap.AssetState.serializeBinaryToWriter = function(message, writer) {
1529
1277
  f
1530
1278
  );
1531
1279
  }
1532
- f = message.getStake();
1280
+ f = message.getEndpoint();
1533
1281
  if (f != null) {
1534
1282
  writer.writeMessage(
1535
- 13,
1283
+ 10,
1284
+ f,
1285
+ type_pb.NFTEndpoint.serializeBinaryToWriter
1286
+ );
1287
+ }
1288
+ f = message.getDisplay();
1289
+ if (f != null) {
1290
+ writer.writeMessage(
1291
+ 11,
1536
1292
  f,
1537
- type_pb.StakeContext.serializeBinaryToWriter
1293
+ type_pb.NFTDisplay.serializeBinaryToWriter
1294
+ );
1295
+ }
1296
+ f = message.getTagsList();
1297
+ if (f.length > 0) {
1298
+ writer.writeRepeatedString(
1299
+ 12,
1300
+ f
1538
1301
  );
1539
1302
  }
1540
1303
  f = message.getContext();
@@ -1738,21 +1501,21 @@ proto.ocap.AssetState.prototype.setParent = function(value) {
1738
1501
 
1739
1502
 
1740
1503
  /**
1741
- * optional StakeContext stake = 13;
1742
- * @return {?proto.ocap.StakeContext}
1504
+ * optional NFTEndpoint endpoint = 10;
1505
+ * @return {?proto.ocap.NFTEndpoint}
1743
1506
  */
1744
- proto.ocap.AssetState.prototype.getStake = function() {
1745
- return /** @type{?proto.ocap.StakeContext} */ (
1746
- jspb.Message.getWrapperField(this, type_pb.StakeContext, 13));
1507
+ proto.ocap.AssetState.prototype.getEndpoint = function() {
1508
+ return /** @type{?proto.ocap.NFTEndpoint} */ (
1509
+ jspb.Message.getWrapperField(this, type_pb.NFTEndpoint, 10));
1747
1510
  };
1748
1511
 
1749
1512
 
1750
1513
  /**
1751
- * @param {?proto.ocap.StakeContext|undefined} value
1514
+ * @param {?proto.ocap.NFTEndpoint|undefined} value
1752
1515
  * @return {!proto.ocap.AssetState} returns this
1753
1516
  */
1754
- proto.ocap.AssetState.prototype.setStake = function(value) {
1755
- return jspb.Message.setWrapperField(this, 13, value);
1517
+ proto.ocap.AssetState.prototype.setEndpoint = function(value) {
1518
+ return jspb.Message.setWrapperField(this, 10, value);
1756
1519
  };
1757
1520
 
1758
1521
 
@@ -1760,8 +1523,8 @@ proto.ocap.AssetState.prototype.setStake = function(value) {
1760
1523
  * Clears the message field making it undefined.
1761
1524
  * @return {!proto.ocap.AssetState} returns this
1762
1525
  */
1763
- proto.ocap.AssetState.prototype.clearStake = function() {
1764
- return this.setStake(undefined);
1526
+ proto.ocap.AssetState.prototype.clearEndpoint = function() {
1527
+ return this.setEndpoint(undefined);
1765
1528
  };
1766
1529
 
1767
1530
 
@@ -1769,27 +1532,27 @@ proto.ocap.AssetState.prototype.clearStake = function() {
1769
1532
  * Returns whether this field is set.
1770
1533
  * @return {boolean}
1771
1534
  */
1772
- proto.ocap.AssetState.prototype.hasStake = function() {
1773
- return jspb.Message.getField(this, 13) != null;
1535
+ proto.ocap.AssetState.prototype.hasEndpoint = function() {
1536
+ return jspb.Message.getField(this, 10) != null;
1774
1537
  };
1775
1538
 
1776
1539
 
1777
1540
  /**
1778
- * optional StateContext context = 14;
1779
- * @return {?proto.ocap.StateContext}
1541
+ * optional NFTDisplay display = 11;
1542
+ * @return {?proto.ocap.NFTDisplay}
1780
1543
  */
1781
- proto.ocap.AssetState.prototype.getContext = function() {
1782
- return /** @type{?proto.ocap.StateContext} */ (
1783
- jspb.Message.getWrapperField(this, type_pb.StateContext, 14));
1544
+ proto.ocap.AssetState.prototype.getDisplay = function() {
1545
+ return /** @type{?proto.ocap.NFTDisplay} */ (
1546
+ jspb.Message.getWrapperField(this, type_pb.NFTDisplay, 11));
1784
1547
  };
1785
1548
 
1786
1549
 
1787
1550
  /**
1788
- * @param {?proto.ocap.StateContext|undefined} value
1551
+ * @param {?proto.ocap.NFTDisplay|undefined} value
1789
1552
  * @return {!proto.ocap.AssetState} returns this
1790
1553
  */
1791
- proto.ocap.AssetState.prototype.setContext = function(value) {
1792
- return jspb.Message.setWrapperField(this, 14, value);
1554
+ proto.ocap.AssetState.prototype.setDisplay = function(value) {
1555
+ return jspb.Message.setWrapperField(this, 11, value);
1793
1556
  };
1794
1557
 
1795
1558
 
@@ -1797,8 +1560,8 @@ proto.ocap.AssetState.prototype.setContext = function(value) {
1797
1560
  * Clears the message field making it undefined.
1798
1561
  * @return {!proto.ocap.AssetState} returns this
1799
1562
  */
1800
- proto.ocap.AssetState.prototype.clearContext = function() {
1801
- return this.setContext(undefined);
1563
+ proto.ocap.AssetState.prototype.clearDisplay = function() {
1564
+ return this.setDisplay(undefined);
1802
1565
  };
1803
1566
 
1804
1567
 
@@ -1806,26 +1569,100 @@ proto.ocap.AssetState.prototype.clearContext = function() {
1806
1569
  * Returns whether this field is set.
1807
1570
  * @return {boolean}
1808
1571
  */
1809
- proto.ocap.AssetState.prototype.hasContext = function() {
1810
- return jspb.Message.getField(this, 14) != null;
1572
+ proto.ocap.AssetState.prototype.hasDisplay = function() {
1573
+ return jspb.Message.getField(this, 11) != null;
1811
1574
  };
1812
1575
 
1813
1576
 
1814
1577
  /**
1815
- * optional google.protobuf.Any data = 50;
1816
- * @return {?proto.google.protobuf.Any}
1578
+ * repeated string tags = 12;
1579
+ * @return {!Array<string>}
1817
1580
  */
1818
- proto.ocap.AssetState.prototype.getData = function() {
1819
- return /** @type{?proto.google.protobuf.Any} */ (
1820
- jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 50));
1581
+ proto.ocap.AssetState.prototype.getTagsList = function() {
1582
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 12));
1821
1583
  };
1822
1584
 
1823
1585
 
1824
1586
  /**
1825
- * @param {?proto.google.protobuf.Any|undefined} value
1587
+ * @param {!Array<string>} value
1826
1588
  * @return {!proto.ocap.AssetState} returns this
1827
- */
1828
- proto.ocap.AssetState.prototype.setData = function(value) {
1589
+ */
1590
+ proto.ocap.AssetState.prototype.setTagsList = function(value) {
1591
+ return jspb.Message.setField(this, 12, value || []);
1592
+ };
1593
+
1594
+
1595
+ /**
1596
+ * @param {string} value
1597
+ * @param {number=} opt_index
1598
+ * @return {!proto.ocap.AssetState} returns this
1599
+ */
1600
+ proto.ocap.AssetState.prototype.addTags = function(value, opt_index) {
1601
+ return jspb.Message.addToRepeatedField(this, 12, value, opt_index);
1602
+ };
1603
+
1604
+
1605
+ /**
1606
+ * Clears the list making it empty but non-null.
1607
+ * @return {!proto.ocap.AssetState} returns this
1608
+ */
1609
+ proto.ocap.AssetState.prototype.clearTagsList = function() {
1610
+ return this.setTagsList([]);
1611
+ };
1612
+
1613
+
1614
+ /**
1615
+ * optional StateContext context = 14;
1616
+ * @return {?proto.ocap.StateContext}
1617
+ */
1618
+ proto.ocap.AssetState.prototype.getContext = function() {
1619
+ return /** @type{?proto.ocap.StateContext} */ (
1620
+ jspb.Message.getWrapperField(this, type_pb.StateContext, 14));
1621
+ };
1622
+
1623
+
1624
+ /**
1625
+ * @param {?proto.ocap.StateContext|undefined} value
1626
+ * @return {!proto.ocap.AssetState} returns this
1627
+ */
1628
+ proto.ocap.AssetState.prototype.setContext = function(value) {
1629
+ return jspb.Message.setWrapperField(this, 14, value);
1630
+ };
1631
+
1632
+
1633
+ /**
1634
+ * Clears the message field making it undefined.
1635
+ * @return {!proto.ocap.AssetState} returns this
1636
+ */
1637
+ proto.ocap.AssetState.prototype.clearContext = function() {
1638
+ return this.setContext(undefined);
1639
+ };
1640
+
1641
+
1642
+ /**
1643
+ * Returns whether this field is set.
1644
+ * @return {boolean}
1645
+ */
1646
+ proto.ocap.AssetState.prototype.hasContext = function() {
1647
+ return jspb.Message.getField(this, 14) != null;
1648
+ };
1649
+
1650
+
1651
+ /**
1652
+ * optional google.protobuf.Any data = 50;
1653
+ * @return {?proto.google.protobuf.Any}
1654
+ */
1655
+ proto.ocap.AssetState.prototype.getData = function() {
1656
+ return /** @type{?proto.google.protobuf.Any} */ (
1657
+ jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 50));
1658
+ };
1659
+
1660
+
1661
+ /**
1662
+ * @param {?proto.google.protobuf.Any|undefined} value
1663
+ * @return {!proto.ocap.AssetState} returns this
1664
+ */
1665
+ proto.ocap.AssetState.prototype.setData = function(value) {
1829
1666
  return jspb.Message.setWrapperField(this, 50, value);
1830
1667
  };
1831
1668
 
@@ -2813,1136 +2650,6 @@ proto.ocap.RootState.prototype.setCustom = function(value) {
2813
2650
 
2814
2651
 
2815
2652
 
2816
- if (jspb.Message.GENERATE_TO_OBJECT) {
2817
- /**
2818
- * Creates an object representation of this proto.
2819
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2820
- * Optional fields that are not set will be set to undefined.
2821
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2822
- * For the list of reserved names please see:
2823
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2824
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2825
- * JSPB instance for transitional soy proto support:
2826
- * http://goto/soy-param-migration
2827
- * @return {!Object}
2828
- */
2829
- proto.ocap.StatisticsState.prototype.toObject = function(opt_includeInstance) {
2830
- return proto.ocap.StatisticsState.toObject(opt_includeInstance, this);
2831
- };
2832
-
2833
-
2834
- /**
2835
- * Static version of the {@see toObject} method.
2836
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2837
- * the JSPB instance for transitional soy proto support:
2838
- * http://goto/soy-param-migration
2839
- * @param {!proto.ocap.StatisticsState} msg The msg instance to transform.
2840
- * @return {!Object}
2841
- * @suppress {unusedLocalVariables} f is only used for nested messages
2842
- */
2843
- proto.ocap.StatisticsState.toObject = function(includeInstance, msg) {
2844
- var f, obj = {
2845
- address: jspb.Message.getFieldWithDefault(msg, 1, ""),
2846
- numBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0),
2847
- numTxs: jspb.Message.getFieldWithDefault(msg, 3, 0),
2848
- numStakes: (f = msg.getNumStakes()) && type_pb.BigUint.toObject(includeInstance, f),
2849
- numValidators: jspb.Message.getFieldWithDefault(msg, 5, 0),
2850
- txStatistics: (f = msg.getTxStatistics()) && type_pb.TxStatistics.toObject(includeInstance, f)
2851
- };
2852
-
2853
- if (includeInstance) {
2854
- obj.$jspbMessageInstance = msg;
2855
- }
2856
- return obj;
2857
- };
2858
- }
2859
-
2860
-
2861
- /**
2862
- * Deserializes binary data (in protobuf wire format).
2863
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2864
- * @return {!proto.ocap.StatisticsState}
2865
- */
2866
- proto.ocap.StatisticsState.deserializeBinary = function(bytes) {
2867
- var reader = new jspb.BinaryReader(bytes);
2868
- var msg = new proto.ocap.StatisticsState;
2869
- return proto.ocap.StatisticsState.deserializeBinaryFromReader(msg, reader);
2870
- };
2871
-
2872
-
2873
- /**
2874
- * Deserializes binary data (in protobuf wire format) from the
2875
- * given reader into the given message object.
2876
- * @param {!proto.ocap.StatisticsState} msg The message object to deserialize into.
2877
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2878
- * @return {!proto.ocap.StatisticsState}
2879
- */
2880
- proto.ocap.StatisticsState.deserializeBinaryFromReader = function(msg, reader) {
2881
- while (reader.nextField()) {
2882
- if (reader.isEndGroup()) {
2883
- break;
2884
- }
2885
- var field = reader.getFieldNumber();
2886
- switch (field) {
2887
- case 1:
2888
- var value = /** @type {string} */ (reader.readString());
2889
- msg.setAddress(value);
2890
- break;
2891
- case 2:
2892
- var value = /** @type {number} */ (reader.readUint64());
2893
- msg.setNumBlocks(value);
2894
- break;
2895
- case 3:
2896
- var value = /** @type {number} */ (reader.readUint64());
2897
- msg.setNumTxs(value);
2898
- break;
2899
- case 4:
2900
- var value = new type_pb.BigUint;
2901
- reader.readMessage(value,type_pb.BigUint.deserializeBinaryFromReader);
2902
- msg.setNumStakes(value);
2903
- break;
2904
- case 5:
2905
- var value = /** @type {number} */ (reader.readUint32());
2906
- msg.setNumValidators(value);
2907
- break;
2908
- case 6:
2909
- var value = new type_pb.TxStatistics;
2910
- reader.readMessage(value,type_pb.TxStatistics.deserializeBinaryFromReader);
2911
- msg.setTxStatistics(value);
2912
- break;
2913
- default:
2914
- reader.skipField();
2915
- break;
2916
- }
2917
- }
2918
- return msg;
2919
- };
2920
-
2921
-
2922
- /**
2923
- * Serializes the message to binary data (in protobuf wire format).
2924
- * @return {!Uint8Array}
2925
- */
2926
- proto.ocap.StatisticsState.prototype.serializeBinary = function() {
2927
- var writer = new jspb.BinaryWriter();
2928
- proto.ocap.StatisticsState.serializeBinaryToWriter(this, writer);
2929
- return writer.getResultBuffer();
2930
- };
2931
-
2932
-
2933
- /**
2934
- * Serializes the given message to binary data (in protobuf wire
2935
- * format), writing to the given BinaryWriter.
2936
- * @param {!proto.ocap.StatisticsState} message
2937
- * @param {!jspb.BinaryWriter} writer
2938
- * @suppress {unusedLocalVariables} f is only used for nested messages
2939
- */
2940
- proto.ocap.StatisticsState.serializeBinaryToWriter = function(message, writer) {
2941
- var f = undefined;
2942
- f = message.getAddress();
2943
- if (f.length > 0) {
2944
- writer.writeString(
2945
- 1,
2946
- f
2947
- );
2948
- }
2949
- f = message.getNumBlocks();
2950
- if (f !== 0) {
2951
- writer.writeUint64(
2952
- 2,
2953
- f
2954
- );
2955
- }
2956
- f = message.getNumTxs();
2957
- if (f !== 0) {
2958
- writer.writeUint64(
2959
- 3,
2960
- f
2961
- );
2962
- }
2963
- f = message.getNumStakes();
2964
- if (f != null) {
2965
- writer.writeMessage(
2966
- 4,
2967
- f,
2968
- type_pb.BigUint.serializeBinaryToWriter
2969
- );
2970
- }
2971
- f = message.getNumValidators();
2972
- if (f !== 0) {
2973
- writer.writeUint32(
2974
- 5,
2975
- f
2976
- );
2977
- }
2978
- f = message.getTxStatistics();
2979
- if (f != null) {
2980
- writer.writeMessage(
2981
- 6,
2982
- f,
2983
- type_pb.TxStatistics.serializeBinaryToWriter
2984
- );
2985
- }
2986
- };
2987
-
2988
-
2989
- /**
2990
- * optional string address = 1;
2991
- * @return {string}
2992
- */
2993
- proto.ocap.StatisticsState.prototype.getAddress = function() {
2994
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2995
- };
2996
-
2997
-
2998
- /**
2999
- * @param {string} value
3000
- * @return {!proto.ocap.StatisticsState} returns this
3001
- */
3002
- proto.ocap.StatisticsState.prototype.setAddress = function(value) {
3003
- return jspb.Message.setProto3StringField(this, 1, value);
3004
- };
3005
-
3006
-
3007
- /**
3008
- * optional uint64 num_blocks = 2;
3009
- * @return {number}
3010
- */
3011
- proto.ocap.StatisticsState.prototype.getNumBlocks = function() {
3012
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3013
- };
3014
-
3015
-
3016
- /**
3017
- * @param {number} value
3018
- * @return {!proto.ocap.StatisticsState} returns this
3019
- */
3020
- proto.ocap.StatisticsState.prototype.setNumBlocks = function(value) {
3021
- return jspb.Message.setProto3IntField(this, 2, value);
3022
- };
3023
-
3024
-
3025
- /**
3026
- * optional uint64 num_txs = 3;
3027
- * @return {number}
3028
- */
3029
- proto.ocap.StatisticsState.prototype.getNumTxs = function() {
3030
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3031
- };
3032
-
3033
-
3034
- /**
3035
- * @param {number} value
3036
- * @return {!proto.ocap.StatisticsState} returns this
3037
- */
3038
- proto.ocap.StatisticsState.prototype.setNumTxs = function(value) {
3039
- return jspb.Message.setProto3IntField(this, 3, value);
3040
- };
3041
-
3042
-
3043
- /**
3044
- * optional BigUint num_stakes = 4;
3045
- * @return {?proto.ocap.BigUint}
3046
- */
3047
- proto.ocap.StatisticsState.prototype.getNumStakes = function() {
3048
- return /** @type{?proto.ocap.BigUint} */ (
3049
- jspb.Message.getWrapperField(this, type_pb.BigUint, 4));
3050
- };
3051
-
3052
-
3053
- /**
3054
- * @param {?proto.ocap.BigUint|undefined} value
3055
- * @return {!proto.ocap.StatisticsState} returns this
3056
- */
3057
- proto.ocap.StatisticsState.prototype.setNumStakes = function(value) {
3058
- return jspb.Message.setWrapperField(this, 4, value);
3059
- };
3060
-
3061
-
3062
- /**
3063
- * Clears the message field making it undefined.
3064
- * @return {!proto.ocap.StatisticsState} returns this
3065
- */
3066
- proto.ocap.StatisticsState.prototype.clearNumStakes = function() {
3067
- return this.setNumStakes(undefined);
3068
- };
3069
-
3070
-
3071
- /**
3072
- * Returns whether this field is set.
3073
- * @return {boolean}
3074
- */
3075
- proto.ocap.StatisticsState.prototype.hasNumStakes = function() {
3076
- return jspb.Message.getField(this, 4) != null;
3077
- };
3078
-
3079
-
3080
- /**
3081
- * optional uint32 num_validators = 5;
3082
- * @return {number}
3083
- */
3084
- proto.ocap.StatisticsState.prototype.getNumValidators = function() {
3085
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
3086
- };
3087
-
3088
-
3089
- /**
3090
- * @param {number} value
3091
- * @return {!proto.ocap.StatisticsState} returns this
3092
- */
3093
- proto.ocap.StatisticsState.prototype.setNumValidators = function(value) {
3094
- return jspb.Message.setProto3IntField(this, 5, value);
3095
- };
3096
-
3097
-
3098
- /**
3099
- * optional TxStatistics tx_statistics = 6;
3100
- * @return {?proto.ocap.TxStatistics}
3101
- */
3102
- proto.ocap.StatisticsState.prototype.getTxStatistics = function() {
3103
- return /** @type{?proto.ocap.TxStatistics} */ (
3104
- jspb.Message.getWrapperField(this, type_pb.TxStatistics, 6));
3105
- };
3106
-
3107
-
3108
- /**
3109
- * @param {?proto.ocap.TxStatistics|undefined} value
3110
- * @return {!proto.ocap.StatisticsState} returns this
3111
- */
3112
- proto.ocap.StatisticsState.prototype.setTxStatistics = function(value) {
3113
- return jspb.Message.setWrapperField(this, 6, value);
3114
- };
3115
-
3116
-
3117
- /**
3118
- * Clears the message field making it undefined.
3119
- * @return {!proto.ocap.StatisticsState} returns this
3120
- */
3121
- proto.ocap.StatisticsState.prototype.clearTxStatistics = function() {
3122
- return this.setTxStatistics(undefined);
3123
- };
3124
-
3125
-
3126
- /**
3127
- * Returns whether this field is set.
3128
- * @return {boolean}
3129
- */
3130
- proto.ocap.StatisticsState.prototype.hasTxStatistics = function() {
3131
- return jspb.Message.getField(this, 6) != null;
3132
- };
3133
-
3134
-
3135
-
3136
- /**
3137
- * List of repeated fields within this message type.
3138
- * @private {!Array<number>}
3139
- * @const
3140
- */
3141
- proto.ocap.SwapState.repeatedFields_ = [7];
3142
-
3143
-
3144
-
3145
- if (jspb.Message.GENERATE_TO_OBJECT) {
3146
- /**
3147
- * Creates an object representation of this proto.
3148
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3149
- * Optional fields that are not set will be set to undefined.
3150
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3151
- * For the list of reserved names please see:
3152
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3153
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3154
- * JSPB instance for transitional soy proto support:
3155
- * http://goto/soy-param-migration
3156
- * @return {!Object}
3157
- */
3158
- proto.ocap.SwapState.prototype.toObject = function(opt_includeInstance) {
3159
- return proto.ocap.SwapState.toObject(opt_includeInstance, this);
3160
- };
3161
-
3162
-
3163
- /**
3164
- * Static version of the {@see toObject} method.
3165
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3166
- * the JSPB instance for transitional soy proto support:
3167
- * http://goto/soy-param-migration
3168
- * @param {!proto.ocap.SwapState} msg The msg instance to transform.
3169
- * @return {!Object}
3170
- * @suppress {unusedLocalVariables} f is only used for nested messages
3171
- */
3172
- proto.ocap.SwapState.toObject = function(includeInstance, msg) {
3173
- var f, obj = {
3174
- hash: jspb.Message.getFieldWithDefault(msg, 1, ""),
3175
- address: jspb.Message.getFieldWithDefault(msg, 2, ""),
3176
- hashkey: msg.getHashkey(),
3177
- sender: jspb.Message.getFieldWithDefault(msg, 4, ""),
3178
- receiver: jspb.Message.getFieldWithDefault(msg, 5, ""),
3179
- value: (f = msg.getValue()) && type_pb.BigUint.toObject(includeInstance, f),
3180
- assetsList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f,
3181
- locktime: jspb.Message.getFieldWithDefault(msg, 8, 0),
3182
- hashlock: msg.getHashlock(),
3183
- context: (f = msg.getContext()) && type_pb.StateContext.toObject(includeInstance, f)
3184
- };
3185
-
3186
- if (includeInstance) {
3187
- obj.$jspbMessageInstance = msg;
3188
- }
3189
- return obj;
3190
- };
3191
- }
3192
-
3193
-
3194
- /**
3195
- * Deserializes binary data (in protobuf wire format).
3196
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3197
- * @return {!proto.ocap.SwapState}
3198
- */
3199
- proto.ocap.SwapState.deserializeBinary = function(bytes) {
3200
- var reader = new jspb.BinaryReader(bytes);
3201
- var msg = new proto.ocap.SwapState;
3202
- return proto.ocap.SwapState.deserializeBinaryFromReader(msg, reader);
3203
- };
3204
-
3205
-
3206
- /**
3207
- * Deserializes binary data (in protobuf wire format) from the
3208
- * given reader into the given message object.
3209
- * @param {!proto.ocap.SwapState} msg The message object to deserialize into.
3210
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3211
- * @return {!proto.ocap.SwapState}
3212
- */
3213
- proto.ocap.SwapState.deserializeBinaryFromReader = function(msg, reader) {
3214
- while (reader.nextField()) {
3215
- if (reader.isEndGroup()) {
3216
- break;
3217
- }
3218
- var field = reader.getFieldNumber();
3219
- switch (field) {
3220
- case 1:
3221
- var value = /** @type {string} */ (reader.readString());
3222
- msg.setHash(value);
3223
- break;
3224
- case 2:
3225
- var value = /** @type {string} */ (reader.readString());
3226
- msg.setAddress(value);
3227
- break;
3228
- case 3:
3229
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
3230
- msg.setHashkey(value);
3231
- break;
3232
- case 4:
3233
- var value = /** @type {string} */ (reader.readString());
3234
- msg.setSender(value);
3235
- break;
3236
- case 5:
3237
- var value = /** @type {string} */ (reader.readString());
3238
- msg.setReceiver(value);
3239
- break;
3240
- case 6:
3241
- var value = new type_pb.BigUint;
3242
- reader.readMessage(value,type_pb.BigUint.deserializeBinaryFromReader);
3243
- msg.setValue(value);
3244
- break;
3245
- case 7:
3246
- var value = /** @type {string} */ (reader.readString());
3247
- msg.addAssets(value);
3248
- break;
3249
- case 8:
3250
- var value = /** @type {number} */ (reader.readUint32());
3251
- msg.setLocktime(value);
3252
- break;
3253
- case 9:
3254
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
3255
- msg.setHashlock(value);
3256
- break;
3257
- case 10:
3258
- var value = new type_pb.StateContext;
3259
- reader.readMessage(value,type_pb.StateContext.deserializeBinaryFromReader);
3260
- msg.setContext(value);
3261
- break;
3262
- default:
3263
- reader.skipField();
3264
- break;
3265
- }
3266
- }
3267
- return msg;
3268
- };
3269
-
3270
-
3271
- /**
3272
- * Serializes the message to binary data (in protobuf wire format).
3273
- * @return {!Uint8Array}
3274
- */
3275
- proto.ocap.SwapState.prototype.serializeBinary = function() {
3276
- var writer = new jspb.BinaryWriter();
3277
- proto.ocap.SwapState.serializeBinaryToWriter(this, writer);
3278
- return writer.getResultBuffer();
3279
- };
3280
-
3281
-
3282
- /**
3283
- * Serializes the given message to binary data (in protobuf wire
3284
- * format), writing to the given BinaryWriter.
3285
- * @param {!proto.ocap.SwapState} message
3286
- * @param {!jspb.BinaryWriter} writer
3287
- * @suppress {unusedLocalVariables} f is only used for nested messages
3288
- */
3289
- proto.ocap.SwapState.serializeBinaryToWriter = function(message, writer) {
3290
- var f = undefined;
3291
- f = message.getHash();
3292
- if (f.length > 0) {
3293
- writer.writeString(
3294
- 1,
3295
- f
3296
- );
3297
- }
3298
- f = message.getAddress();
3299
- if (f.length > 0) {
3300
- writer.writeString(
3301
- 2,
3302
- f
3303
- );
3304
- }
3305
- f = message.getHashkey_asU8();
3306
- if (f.length > 0) {
3307
- writer.writeBytes(
3308
- 3,
3309
- f
3310
- );
3311
- }
3312
- f = message.getSender();
3313
- if (f.length > 0) {
3314
- writer.writeString(
3315
- 4,
3316
- f
3317
- );
3318
- }
3319
- f = message.getReceiver();
3320
- if (f.length > 0) {
3321
- writer.writeString(
3322
- 5,
3323
- f
3324
- );
3325
- }
3326
- f = message.getValue();
3327
- if (f != null) {
3328
- writer.writeMessage(
3329
- 6,
3330
- f,
3331
- type_pb.BigUint.serializeBinaryToWriter
3332
- );
3333
- }
3334
- f = message.getAssetsList();
3335
- if (f.length > 0) {
3336
- writer.writeRepeatedString(
3337
- 7,
3338
- f
3339
- );
3340
- }
3341
- f = message.getLocktime();
3342
- if (f !== 0) {
3343
- writer.writeUint32(
3344
- 8,
3345
- f
3346
- );
3347
- }
3348
- f = message.getHashlock_asU8();
3349
- if (f.length > 0) {
3350
- writer.writeBytes(
3351
- 9,
3352
- f
3353
- );
3354
- }
3355
- f = message.getContext();
3356
- if (f != null) {
3357
- writer.writeMessage(
3358
- 10,
3359
- f,
3360
- type_pb.StateContext.serializeBinaryToWriter
3361
- );
3362
- }
3363
- };
3364
-
3365
-
3366
- /**
3367
- * optional string hash = 1;
3368
- * @return {string}
3369
- */
3370
- proto.ocap.SwapState.prototype.getHash = function() {
3371
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3372
- };
3373
-
3374
-
3375
- /**
3376
- * @param {string} value
3377
- * @return {!proto.ocap.SwapState} returns this
3378
- */
3379
- proto.ocap.SwapState.prototype.setHash = function(value) {
3380
- return jspb.Message.setProto3StringField(this, 1, value);
3381
- };
3382
-
3383
-
3384
- /**
3385
- * optional string address = 2;
3386
- * @return {string}
3387
- */
3388
- proto.ocap.SwapState.prototype.getAddress = function() {
3389
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3390
- };
3391
-
3392
-
3393
- /**
3394
- * @param {string} value
3395
- * @return {!proto.ocap.SwapState} returns this
3396
- */
3397
- proto.ocap.SwapState.prototype.setAddress = function(value) {
3398
- return jspb.Message.setProto3StringField(this, 2, value);
3399
- };
3400
-
3401
-
3402
- /**
3403
- * optional bytes hashkey = 3;
3404
- * @return {!(string|Uint8Array)}
3405
- */
3406
- proto.ocap.SwapState.prototype.getHashkey = function() {
3407
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3408
- };
3409
-
3410
-
3411
- /**
3412
- * optional bytes hashkey = 3;
3413
- * This is a type-conversion wrapper around `getHashkey()`
3414
- * @return {string}
3415
- */
3416
- proto.ocap.SwapState.prototype.getHashkey_asB64 = function() {
3417
- return /** @type {string} */ (jspb.Message.bytesAsB64(
3418
- this.getHashkey()));
3419
- };
3420
-
3421
-
3422
- /**
3423
- * optional bytes hashkey = 3;
3424
- * Note that Uint8Array is not supported on all browsers.
3425
- * @see http://caniuse.com/Uint8Array
3426
- * This is a type-conversion wrapper around `getHashkey()`
3427
- * @return {!Uint8Array}
3428
- */
3429
- proto.ocap.SwapState.prototype.getHashkey_asU8 = function() {
3430
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
3431
- this.getHashkey()));
3432
- };
3433
-
3434
-
3435
- /**
3436
- * @param {!(string|Uint8Array)} value
3437
- * @return {!proto.ocap.SwapState} returns this
3438
- */
3439
- proto.ocap.SwapState.prototype.setHashkey = function(value) {
3440
- return jspb.Message.setProto3BytesField(this, 3, value);
3441
- };
3442
-
3443
-
3444
- /**
3445
- * optional string sender = 4;
3446
- * @return {string}
3447
- */
3448
- proto.ocap.SwapState.prototype.getSender = function() {
3449
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3450
- };
3451
-
3452
-
3453
- /**
3454
- * @param {string} value
3455
- * @return {!proto.ocap.SwapState} returns this
3456
- */
3457
- proto.ocap.SwapState.prototype.setSender = function(value) {
3458
- return jspb.Message.setProto3StringField(this, 4, value);
3459
- };
3460
-
3461
-
3462
- /**
3463
- * optional string receiver = 5;
3464
- * @return {string}
3465
- */
3466
- proto.ocap.SwapState.prototype.getReceiver = function() {
3467
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3468
- };
3469
-
3470
-
3471
- /**
3472
- * @param {string} value
3473
- * @return {!proto.ocap.SwapState} returns this
3474
- */
3475
- proto.ocap.SwapState.prototype.setReceiver = function(value) {
3476
- return jspb.Message.setProto3StringField(this, 5, value);
3477
- };
3478
-
3479
-
3480
- /**
3481
- * optional BigUint value = 6;
3482
- * @return {?proto.ocap.BigUint}
3483
- */
3484
- proto.ocap.SwapState.prototype.getValue = function() {
3485
- return /** @type{?proto.ocap.BigUint} */ (
3486
- jspb.Message.getWrapperField(this, type_pb.BigUint, 6));
3487
- };
3488
-
3489
-
3490
- /**
3491
- * @param {?proto.ocap.BigUint|undefined} value
3492
- * @return {!proto.ocap.SwapState} returns this
3493
- */
3494
- proto.ocap.SwapState.prototype.setValue = function(value) {
3495
- return jspb.Message.setWrapperField(this, 6, value);
3496
- };
3497
-
3498
-
3499
- /**
3500
- * Clears the message field making it undefined.
3501
- * @return {!proto.ocap.SwapState} returns this
3502
- */
3503
- proto.ocap.SwapState.prototype.clearValue = function() {
3504
- return this.setValue(undefined);
3505
- };
3506
-
3507
-
3508
- /**
3509
- * Returns whether this field is set.
3510
- * @return {boolean}
3511
- */
3512
- proto.ocap.SwapState.prototype.hasValue = function() {
3513
- return jspb.Message.getField(this, 6) != null;
3514
- };
3515
-
3516
-
3517
- /**
3518
- * repeated string assets = 7;
3519
- * @return {!Array<string>}
3520
- */
3521
- proto.ocap.SwapState.prototype.getAssetsList = function() {
3522
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 7));
3523
- };
3524
-
3525
-
3526
- /**
3527
- * @param {!Array<string>} value
3528
- * @return {!proto.ocap.SwapState} returns this
3529
- */
3530
- proto.ocap.SwapState.prototype.setAssetsList = function(value) {
3531
- return jspb.Message.setField(this, 7, value || []);
3532
- };
3533
-
3534
-
3535
- /**
3536
- * @param {string} value
3537
- * @param {number=} opt_index
3538
- * @return {!proto.ocap.SwapState} returns this
3539
- */
3540
- proto.ocap.SwapState.prototype.addAssets = function(value, opt_index) {
3541
- return jspb.Message.addToRepeatedField(this, 7, value, opt_index);
3542
- };
3543
-
3544
-
3545
- /**
3546
- * Clears the list making it empty but non-null.
3547
- * @return {!proto.ocap.SwapState} returns this
3548
- */
3549
- proto.ocap.SwapState.prototype.clearAssetsList = function() {
3550
- return this.setAssetsList([]);
3551
- };
3552
-
3553
-
3554
- /**
3555
- * optional uint32 locktime = 8;
3556
- * @return {number}
3557
- */
3558
- proto.ocap.SwapState.prototype.getLocktime = function() {
3559
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
3560
- };
3561
-
3562
-
3563
- /**
3564
- * @param {number} value
3565
- * @return {!proto.ocap.SwapState} returns this
3566
- */
3567
- proto.ocap.SwapState.prototype.setLocktime = function(value) {
3568
- return jspb.Message.setProto3IntField(this, 8, value);
3569
- };
3570
-
3571
-
3572
- /**
3573
- * optional bytes hashlock = 9;
3574
- * @return {!(string|Uint8Array)}
3575
- */
3576
- proto.ocap.SwapState.prototype.getHashlock = function() {
3577
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
3578
- };
3579
-
3580
-
3581
- /**
3582
- * optional bytes hashlock = 9;
3583
- * This is a type-conversion wrapper around `getHashlock()`
3584
- * @return {string}
3585
- */
3586
- proto.ocap.SwapState.prototype.getHashlock_asB64 = function() {
3587
- return /** @type {string} */ (jspb.Message.bytesAsB64(
3588
- this.getHashlock()));
3589
- };
3590
-
3591
-
3592
- /**
3593
- * optional bytes hashlock = 9;
3594
- * Note that Uint8Array is not supported on all browsers.
3595
- * @see http://caniuse.com/Uint8Array
3596
- * This is a type-conversion wrapper around `getHashlock()`
3597
- * @return {!Uint8Array}
3598
- */
3599
- proto.ocap.SwapState.prototype.getHashlock_asU8 = function() {
3600
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
3601
- this.getHashlock()));
3602
- };
3603
-
3604
-
3605
- /**
3606
- * @param {!(string|Uint8Array)} value
3607
- * @return {!proto.ocap.SwapState} returns this
3608
- */
3609
- proto.ocap.SwapState.prototype.setHashlock = function(value) {
3610
- return jspb.Message.setProto3BytesField(this, 9, value);
3611
- };
3612
-
3613
-
3614
- /**
3615
- * optional StateContext context = 10;
3616
- * @return {?proto.ocap.StateContext}
3617
- */
3618
- proto.ocap.SwapState.prototype.getContext = function() {
3619
- return /** @type{?proto.ocap.StateContext} */ (
3620
- jspb.Message.getWrapperField(this, type_pb.StateContext, 10));
3621
- };
3622
-
3623
-
3624
- /**
3625
- * @param {?proto.ocap.StateContext|undefined} value
3626
- * @return {!proto.ocap.SwapState} returns this
3627
- */
3628
- proto.ocap.SwapState.prototype.setContext = function(value) {
3629
- return jspb.Message.setWrapperField(this, 10, value);
3630
- };
3631
-
3632
-
3633
- /**
3634
- * Clears the message field making it undefined.
3635
- * @return {!proto.ocap.SwapState} returns this
3636
- */
3637
- proto.ocap.SwapState.prototype.clearContext = function() {
3638
- return this.setContext(undefined);
3639
- };
3640
-
3641
-
3642
- /**
3643
- * Returns whether this field is set.
3644
- * @return {boolean}
3645
- */
3646
- proto.ocap.SwapState.prototype.hasContext = function() {
3647
- return jspb.Message.getField(this, 10) != null;
3648
- };
3649
-
3650
-
3651
-
3652
-
3653
-
3654
- if (jspb.Message.GENERATE_TO_OBJECT) {
3655
- /**
3656
- * Creates an object representation of this proto.
3657
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3658
- * Optional fields that are not set will be set to undefined.
3659
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3660
- * For the list of reserved names please see:
3661
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3662
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3663
- * JSPB instance for transitional soy proto support:
3664
- * http://goto/soy-param-migration
3665
- * @return {!Object}
3666
- */
3667
- proto.ocap.SwapStatistics.prototype.toObject = function(opt_includeInstance) {
3668
- return proto.ocap.SwapStatistics.toObject(opt_includeInstance, this);
3669
- };
3670
-
3671
-
3672
- /**
3673
- * Static version of the {@see toObject} method.
3674
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3675
- * the JSPB instance for transitional soy proto support:
3676
- * http://goto/soy-param-migration
3677
- * @param {!proto.ocap.SwapStatistics} msg The msg instance to transform.
3678
- * @return {!Object}
3679
- * @suppress {unusedLocalVariables} f is only used for nested messages
3680
- */
3681
- proto.ocap.SwapStatistics.toObject = function(includeInstance, msg) {
3682
- var f, obj = {
3683
- address: jspb.Message.getFieldWithDefault(msg, 1, ""),
3684
- lockedValueOut: (f = msg.getLockedValueOut()) && type_pb.BigUint.toObject(includeInstance, f),
3685
- lockedValueIn: (f = msg.getLockedValueIn()) && type_pb.BigUint.toObject(includeInstance, f),
3686
- lockedAssetsOut: jspb.Message.getFieldWithDefault(msg, 4, 0),
3687
- lockedAssetsIn: jspb.Message.getFieldWithDefault(msg, 5, 0)
3688
- };
3689
-
3690
- if (includeInstance) {
3691
- obj.$jspbMessageInstance = msg;
3692
- }
3693
- return obj;
3694
- };
3695
- }
3696
-
3697
-
3698
- /**
3699
- * Deserializes binary data (in protobuf wire format).
3700
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3701
- * @return {!proto.ocap.SwapStatistics}
3702
- */
3703
- proto.ocap.SwapStatistics.deserializeBinary = function(bytes) {
3704
- var reader = new jspb.BinaryReader(bytes);
3705
- var msg = new proto.ocap.SwapStatistics;
3706
- return proto.ocap.SwapStatistics.deserializeBinaryFromReader(msg, reader);
3707
- };
3708
-
3709
-
3710
- /**
3711
- * Deserializes binary data (in protobuf wire format) from the
3712
- * given reader into the given message object.
3713
- * @param {!proto.ocap.SwapStatistics} msg The message object to deserialize into.
3714
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3715
- * @return {!proto.ocap.SwapStatistics}
3716
- */
3717
- proto.ocap.SwapStatistics.deserializeBinaryFromReader = function(msg, reader) {
3718
- while (reader.nextField()) {
3719
- if (reader.isEndGroup()) {
3720
- break;
3721
- }
3722
- var field = reader.getFieldNumber();
3723
- switch (field) {
3724
- case 1:
3725
- var value = /** @type {string} */ (reader.readString());
3726
- msg.setAddress(value);
3727
- break;
3728
- case 2:
3729
- var value = new type_pb.BigUint;
3730
- reader.readMessage(value,type_pb.BigUint.deserializeBinaryFromReader);
3731
- msg.setLockedValueOut(value);
3732
- break;
3733
- case 3:
3734
- var value = new type_pb.BigUint;
3735
- reader.readMessage(value,type_pb.BigUint.deserializeBinaryFromReader);
3736
- msg.setLockedValueIn(value);
3737
- break;
3738
- case 4:
3739
- var value = /** @type {number} */ (reader.readUint32());
3740
- msg.setLockedAssetsOut(value);
3741
- break;
3742
- case 5:
3743
- var value = /** @type {number} */ (reader.readUint32());
3744
- msg.setLockedAssetsIn(value);
3745
- break;
3746
- default:
3747
- reader.skipField();
3748
- break;
3749
- }
3750
- }
3751
- return msg;
3752
- };
3753
-
3754
-
3755
- /**
3756
- * Serializes the message to binary data (in protobuf wire format).
3757
- * @return {!Uint8Array}
3758
- */
3759
- proto.ocap.SwapStatistics.prototype.serializeBinary = function() {
3760
- var writer = new jspb.BinaryWriter();
3761
- proto.ocap.SwapStatistics.serializeBinaryToWriter(this, writer);
3762
- return writer.getResultBuffer();
3763
- };
3764
-
3765
-
3766
- /**
3767
- * Serializes the given message to binary data (in protobuf wire
3768
- * format), writing to the given BinaryWriter.
3769
- * @param {!proto.ocap.SwapStatistics} message
3770
- * @param {!jspb.BinaryWriter} writer
3771
- * @suppress {unusedLocalVariables} f is only used for nested messages
3772
- */
3773
- proto.ocap.SwapStatistics.serializeBinaryToWriter = function(message, writer) {
3774
- var f = undefined;
3775
- f = message.getAddress();
3776
- if (f.length > 0) {
3777
- writer.writeString(
3778
- 1,
3779
- f
3780
- );
3781
- }
3782
- f = message.getLockedValueOut();
3783
- if (f != null) {
3784
- writer.writeMessage(
3785
- 2,
3786
- f,
3787
- type_pb.BigUint.serializeBinaryToWriter
3788
- );
3789
- }
3790
- f = message.getLockedValueIn();
3791
- if (f != null) {
3792
- writer.writeMessage(
3793
- 3,
3794
- f,
3795
- type_pb.BigUint.serializeBinaryToWriter
3796
- );
3797
- }
3798
- f = message.getLockedAssetsOut();
3799
- if (f !== 0) {
3800
- writer.writeUint32(
3801
- 4,
3802
- f
3803
- );
3804
- }
3805
- f = message.getLockedAssetsIn();
3806
- if (f !== 0) {
3807
- writer.writeUint32(
3808
- 5,
3809
- f
3810
- );
3811
- }
3812
- };
3813
-
3814
-
3815
- /**
3816
- * optional string address = 1;
3817
- * @return {string}
3818
- */
3819
- proto.ocap.SwapStatistics.prototype.getAddress = function() {
3820
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3821
- };
3822
-
3823
-
3824
- /**
3825
- * @param {string} value
3826
- * @return {!proto.ocap.SwapStatistics} returns this
3827
- */
3828
- proto.ocap.SwapStatistics.prototype.setAddress = function(value) {
3829
- return jspb.Message.setProto3StringField(this, 1, value);
3830
- };
3831
-
3832
-
3833
- /**
3834
- * optional BigUint locked_value_out = 2;
3835
- * @return {?proto.ocap.BigUint}
3836
- */
3837
- proto.ocap.SwapStatistics.prototype.getLockedValueOut = function() {
3838
- return /** @type{?proto.ocap.BigUint} */ (
3839
- jspb.Message.getWrapperField(this, type_pb.BigUint, 2));
3840
- };
3841
-
3842
-
3843
- /**
3844
- * @param {?proto.ocap.BigUint|undefined} value
3845
- * @return {!proto.ocap.SwapStatistics} returns this
3846
- */
3847
- proto.ocap.SwapStatistics.prototype.setLockedValueOut = function(value) {
3848
- return jspb.Message.setWrapperField(this, 2, value);
3849
- };
3850
-
3851
-
3852
- /**
3853
- * Clears the message field making it undefined.
3854
- * @return {!proto.ocap.SwapStatistics} returns this
3855
- */
3856
- proto.ocap.SwapStatistics.prototype.clearLockedValueOut = function() {
3857
- return this.setLockedValueOut(undefined);
3858
- };
3859
-
3860
-
3861
- /**
3862
- * Returns whether this field is set.
3863
- * @return {boolean}
3864
- */
3865
- proto.ocap.SwapStatistics.prototype.hasLockedValueOut = function() {
3866
- return jspb.Message.getField(this, 2) != null;
3867
- };
3868
-
3869
-
3870
- /**
3871
- * optional BigUint locked_value_in = 3;
3872
- * @return {?proto.ocap.BigUint}
3873
- */
3874
- proto.ocap.SwapStatistics.prototype.getLockedValueIn = function() {
3875
- return /** @type{?proto.ocap.BigUint} */ (
3876
- jspb.Message.getWrapperField(this, type_pb.BigUint, 3));
3877
- };
3878
-
3879
-
3880
- /**
3881
- * @param {?proto.ocap.BigUint|undefined} value
3882
- * @return {!proto.ocap.SwapStatistics} returns this
3883
- */
3884
- proto.ocap.SwapStatistics.prototype.setLockedValueIn = function(value) {
3885
- return jspb.Message.setWrapperField(this, 3, value);
3886
- };
3887
-
3888
-
3889
- /**
3890
- * Clears the message field making it undefined.
3891
- * @return {!proto.ocap.SwapStatistics} returns this
3892
- */
3893
- proto.ocap.SwapStatistics.prototype.clearLockedValueIn = function() {
3894
- return this.setLockedValueIn(undefined);
3895
- };
3896
-
3897
-
3898
- /**
3899
- * Returns whether this field is set.
3900
- * @return {boolean}
3901
- */
3902
- proto.ocap.SwapStatistics.prototype.hasLockedValueIn = function() {
3903
- return jspb.Message.getField(this, 3) != null;
3904
- };
3905
-
3906
-
3907
- /**
3908
- * optional uint32 locked_assets_out = 4;
3909
- * @return {number}
3910
- */
3911
- proto.ocap.SwapStatistics.prototype.getLockedAssetsOut = function() {
3912
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
3913
- };
3914
-
3915
-
3916
- /**
3917
- * @param {number} value
3918
- * @return {!proto.ocap.SwapStatistics} returns this
3919
- */
3920
- proto.ocap.SwapStatistics.prototype.setLockedAssetsOut = function(value) {
3921
- return jspb.Message.setProto3IntField(this, 4, value);
3922
- };
3923
-
3924
-
3925
- /**
3926
- * optional uint32 locked_assets_in = 5;
3927
- * @return {number}
3928
- */
3929
- proto.ocap.SwapStatistics.prototype.getLockedAssetsIn = function() {
3930
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
3931
- };
3932
-
3933
-
3934
- /**
3935
- * @param {number} value
3936
- * @return {!proto.ocap.SwapStatistics} returns this
3937
- */
3938
- proto.ocap.SwapStatistics.prototype.setLockedAssetsIn = function(value) {
3939
- return jspb.Message.setProto3IntField(this, 5, value);
3940
- };
3941
-
3942
-
3943
-
3944
-
3945
-
3946
2653
  if (jspb.Message.GENERATE_TO_OBJECT) {
3947
2654
  /**
3948
2655
  * Creates an object representation of this proto.
@@ -5076,7 +3783,7 @@ proto.ocap.AssetFactoryState.toObject = function(includeInstance, msg) {
5076
3783
  tokensList: jspb.Message.toObjectList(msg.getTokensList(),
5077
3784
  type_pb.IndexedTokenInput.toObject, includeInstance),
5078
3785
  numMinted: jspb.Message.getFieldWithDefault(msg, 15, 0),
5079
- display: (f = msg.getDisplay()) && type_pb.AssetDisplay.toObject(includeInstance, f),
3786
+ display: (f = msg.getDisplay()) && type_pb.NFTDisplay.toObject(includeInstance, f),
5080
3787
  lastSettlement: (f = msg.getLastSettlement()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
5081
3788
  };
5082
3789
 
@@ -5182,8 +3889,8 @@ proto.ocap.AssetFactoryState.deserializeBinaryFromReader = function(msg, reader)
5182
3889
  msg.setNumMinted(value);
5183
3890
  break;
5184
3891
  case 16:
5185
- var value = new type_pb.AssetDisplay;
5186
- reader.readMessage(value,type_pb.AssetDisplay.deserializeBinaryFromReader);
3892
+ var value = new type_pb.NFTDisplay;
3893
+ reader.readMessage(value,type_pb.NFTDisplay.deserializeBinaryFromReader);
5187
3894
  msg.setDisplay(value);
5188
3895
  break;
5189
3896
  case 17:
@@ -5337,7 +4044,7 @@ proto.ocap.AssetFactoryState.serializeBinaryToWriter = function(message, writer)
5337
4044
  writer.writeMessage(
5338
4045
  16,
5339
4046
  f,
5340
- type_pb.AssetDisplay.serializeBinaryToWriter
4047
+ type_pb.NFTDisplay.serializeBinaryToWriter
5341
4048
  );
5342
4049
  }
5343
4050
  f = message.getLastSettlement();
@@ -5776,17 +4483,17 @@ proto.ocap.AssetFactoryState.prototype.setNumMinted = function(value) {
5776
4483
 
5777
4484
 
5778
4485
  /**
5779
- * optional AssetDisplay display = 16;
5780
- * @return {?proto.ocap.AssetDisplay}
4486
+ * optional NFTDisplay display = 16;
4487
+ * @return {?proto.ocap.NFTDisplay}
5781
4488
  */
5782
4489
  proto.ocap.AssetFactoryState.prototype.getDisplay = function() {
5783
- return /** @type{?proto.ocap.AssetDisplay} */ (
5784
- jspb.Message.getWrapperField(this, type_pb.AssetDisplay, 16));
4490
+ return /** @type{?proto.ocap.NFTDisplay} */ (
4491
+ jspb.Message.getWrapperField(this, type_pb.NFTDisplay, 16));
5785
4492
  };
5786
4493
 
5787
4494
 
5788
4495
  /**
5789
- * @param {?proto.ocap.AssetDisplay|undefined} value
4496
+ * @param {?proto.ocap.NFTDisplay|undefined} value
5790
4497
  * @return {!proto.ocap.AssetFactoryState} returns this
5791
4498
  */
5792
4499
  proto.ocap.AssetFactoryState.prototype.setDisplay = function(value) {