@ocap/proto 1.21.3 → 1.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,7 @@ goog.exportSymbol('proto.ocap.BlockInfo', null, root);
38
38
  goog.exportSymbol('proto.ocap.BlockInfoSimple', null, root);
39
39
  goog.exportSymbol('proto.ocap.ChainInfo', null, root);
40
40
  goog.exportSymbol('proto.ocap.ConsensusParams', null, root);
41
+ goog.exportSymbol('proto.ocap.CurveConfig', null, root);
41
42
  goog.exportSymbol('proto.ocap.DelegateConfig', null, root);
42
43
  goog.exportSymbol('proto.ocap.DelegateLimit', null, root);
43
44
  goog.exportSymbol('proto.ocap.Evidence', null, root);
@@ -1239,6 +1240,27 @@ if (goog.DEBUG && !COMPILED) {
1239
1240
  */
1240
1241
  proto.ocap.DelegateLimit.displayName = 'proto.ocap.DelegateLimit';
1241
1242
  }
1243
+ /**
1244
+ * Generated by JsPbCodeGenerator.
1245
+ * @param {Array=} opt_data Optional initial data array, typically from a
1246
+ * server response, or constructed directly in Javascript. The array is used
1247
+ * in place and becomes part of the constructed object. It is not cloned.
1248
+ * If no data is provided, the constructed object will be empty, but still
1249
+ * valid.
1250
+ * @extends {jspb.Message}
1251
+ * @constructor
1252
+ */
1253
+ proto.ocap.CurveConfig = function(opt_data) {
1254
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1255
+ };
1256
+ goog.inherits(proto.ocap.CurveConfig, jspb.Message);
1257
+ if (goog.DEBUG && !COMPILED) {
1258
+ /**
1259
+ * @public
1260
+ * @override
1261
+ */
1262
+ proto.ocap.CurveConfig.displayName = 'proto.ocap.CurveConfig';
1263
+ }
1242
1264
 
1243
1265
 
1244
1266
 
@@ -1612,7 +1634,10 @@ proto.ocap.TokenSymbol.toObject = function(includeInstance, msg) {
1612
1634
  address: jspb.Message.getFieldWithDefault(msg, 1, ""),
1613
1635
  symbol: jspb.Message.getFieldWithDefault(msg, 2, ""),
1614
1636
  decimal: jspb.Message.getFieldWithDefault(msg, 3, 0),
1615
- unit: jspb.Message.getFieldWithDefault(msg, 4, "")
1637
+ unit: jspb.Message.getFieldWithDefault(msg, 4, ""),
1638
+ name: jspb.Message.getFieldWithDefault(msg, 5, ""),
1639
+ description: jspb.Message.getFieldWithDefault(msg, 6, ""),
1640
+ icon: jspb.Message.getFieldWithDefault(msg, 7, "")
1616
1641
  };
1617
1642
 
1618
1643
  if (includeInstance) {
@@ -1665,6 +1690,18 @@ proto.ocap.TokenSymbol.deserializeBinaryFromReader = function(msg, reader) {
1665
1690
  var value = /** @type {string} */ (reader.readString());
1666
1691
  msg.setUnit(value);
1667
1692
  break;
1693
+ case 5:
1694
+ var value = /** @type {string} */ (reader.readString());
1695
+ msg.setName(value);
1696
+ break;
1697
+ case 6:
1698
+ var value = /** @type {string} */ (reader.readString());
1699
+ msg.setDescription(value);
1700
+ break;
1701
+ case 7:
1702
+ var value = /** @type {string} */ (reader.readString());
1703
+ msg.setIcon(value);
1704
+ break;
1668
1705
  default:
1669
1706
  reader.skipField();
1670
1707
  break;
@@ -1722,6 +1759,27 @@ proto.ocap.TokenSymbol.serializeBinaryToWriter = function(message, writer) {
1722
1759
  f
1723
1760
  );
1724
1761
  }
1762
+ f = message.getName();
1763
+ if (f.length > 0) {
1764
+ writer.writeString(
1765
+ 5,
1766
+ f
1767
+ );
1768
+ }
1769
+ f = message.getDescription();
1770
+ if (f.length > 0) {
1771
+ writer.writeString(
1772
+ 6,
1773
+ f
1774
+ );
1775
+ }
1776
+ f = message.getIcon();
1777
+ if (f.length > 0) {
1778
+ writer.writeString(
1779
+ 7,
1780
+ f
1781
+ );
1782
+ }
1725
1783
  };
1726
1784
 
1727
1785
 
@@ -1797,6 +1855,60 @@ proto.ocap.TokenSymbol.prototype.setUnit = function(value) {
1797
1855
  };
1798
1856
 
1799
1857
 
1858
+ /**
1859
+ * optional string name = 5;
1860
+ * @return {string}
1861
+ */
1862
+ proto.ocap.TokenSymbol.prototype.getName = function() {
1863
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1864
+ };
1865
+
1866
+
1867
+ /**
1868
+ * @param {string} value
1869
+ * @return {!proto.ocap.TokenSymbol} returns this
1870
+ */
1871
+ proto.ocap.TokenSymbol.prototype.setName = function(value) {
1872
+ return jspb.Message.setProto3StringField(this, 5, value);
1873
+ };
1874
+
1875
+
1876
+ /**
1877
+ * optional string description = 6;
1878
+ * @return {string}
1879
+ */
1880
+ proto.ocap.TokenSymbol.prototype.getDescription = function() {
1881
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1882
+ };
1883
+
1884
+
1885
+ /**
1886
+ * @param {string} value
1887
+ * @return {!proto.ocap.TokenSymbol} returns this
1888
+ */
1889
+ proto.ocap.TokenSymbol.prototype.setDescription = function(value) {
1890
+ return jspb.Message.setProto3StringField(this, 6, value);
1891
+ };
1892
+
1893
+
1894
+ /**
1895
+ * optional string icon = 7;
1896
+ * @return {string}
1897
+ */
1898
+ proto.ocap.TokenSymbol.prototype.getIcon = function() {
1899
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1900
+ };
1901
+
1902
+
1903
+ /**
1904
+ * @param {string} value
1905
+ * @return {!proto.ocap.TokenSymbol} returns this
1906
+ */
1907
+ proto.ocap.TokenSymbol.prototype.setIcon = function(value) {
1908
+ return jspb.Message.setProto3StringField(this, 7, value);
1909
+ };
1910
+
1911
+
1800
1912
 
1801
1913
 
1802
1914
 
@@ -17823,4 +17935,254 @@ proto.ocap.DelegateLimit.prototype.clearAssetsList = function() {
17823
17935
  };
17824
17936
 
17825
17937
 
17938
+
17939
+
17940
+
17941
+ if (jspb.Message.GENERATE_TO_OBJECT) {
17942
+ /**
17943
+ * Creates an object representation of this proto.
17944
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
17945
+ * Optional fields that are not set will be set to undefined.
17946
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
17947
+ * For the list of reserved names please see:
17948
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
17949
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
17950
+ * JSPB instance for transitional soy proto support:
17951
+ * http://goto/soy-param-migration
17952
+ * @return {!Object}
17953
+ */
17954
+ proto.ocap.CurveConfig.prototype.toObject = function(opt_includeInstance) {
17955
+ return proto.ocap.CurveConfig.toObject(opt_includeInstance, this);
17956
+ };
17957
+
17958
+
17959
+ /**
17960
+ * Static version of the {@see toObject} method.
17961
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
17962
+ * the JSPB instance for transitional soy proto support:
17963
+ * http://goto/soy-param-migration
17964
+ * @param {!proto.ocap.CurveConfig} msg The msg instance to transform.
17965
+ * @return {!Object}
17966
+ * @suppress {unusedLocalVariables} f is only used for nested messages
17967
+ */
17968
+ proto.ocap.CurveConfig.toObject = function(includeInstance, msg) {
17969
+ var f, obj = {
17970
+ type: jspb.Message.getFieldWithDefault(msg, 1, ""),
17971
+ basePrice: jspb.Message.getFieldWithDefault(msg, 2, ""),
17972
+ slope: jspb.Message.getFieldWithDefault(msg, 3, ""),
17973
+ fixedPrice: jspb.Message.getFieldWithDefault(msg, 4, ""),
17974
+ constant: jspb.Message.getFieldWithDefault(msg, 5, 0)
17975
+ };
17976
+
17977
+ if (includeInstance) {
17978
+ obj.$jspbMessageInstance = msg;
17979
+ }
17980
+ return obj;
17981
+ };
17982
+ }
17983
+
17984
+
17985
+ /**
17986
+ * Deserializes binary data (in protobuf wire format).
17987
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
17988
+ * @return {!proto.ocap.CurveConfig}
17989
+ */
17990
+ proto.ocap.CurveConfig.deserializeBinary = function(bytes) {
17991
+ var reader = new jspb.BinaryReader(bytes);
17992
+ var msg = new proto.ocap.CurveConfig;
17993
+ return proto.ocap.CurveConfig.deserializeBinaryFromReader(msg, reader);
17994
+ };
17995
+
17996
+
17997
+ /**
17998
+ * Deserializes binary data (in protobuf wire format) from the
17999
+ * given reader into the given message object.
18000
+ * @param {!proto.ocap.CurveConfig} msg The message object to deserialize into.
18001
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
18002
+ * @return {!proto.ocap.CurveConfig}
18003
+ */
18004
+ proto.ocap.CurveConfig.deserializeBinaryFromReader = function(msg, reader) {
18005
+ while (reader.nextField()) {
18006
+ if (reader.isEndGroup()) {
18007
+ break;
18008
+ }
18009
+ var field = reader.getFieldNumber();
18010
+ switch (field) {
18011
+ case 1:
18012
+ var value = /** @type {string} */ (reader.readString());
18013
+ msg.setType(value);
18014
+ break;
18015
+ case 2:
18016
+ var value = /** @type {string} */ (reader.readString());
18017
+ msg.setBasePrice(value);
18018
+ break;
18019
+ case 3:
18020
+ var value = /** @type {string} */ (reader.readString());
18021
+ msg.setSlope(value);
18022
+ break;
18023
+ case 4:
18024
+ var value = /** @type {string} */ (reader.readString());
18025
+ msg.setFixedPrice(value);
18026
+ break;
18027
+ case 5:
18028
+ var value = /** @type {number} */ (reader.readUint32());
18029
+ msg.setConstant(value);
18030
+ break;
18031
+ default:
18032
+ reader.skipField();
18033
+ break;
18034
+ }
18035
+ }
18036
+ return msg;
18037
+ };
18038
+
18039
+
18040
+ /**
18041
+ * Serializes the message to binary data (in protobuf wire format).
18042
+ * @return {!Uint8Array}
18043
+ */
18044
+ proto.ocap.CurveConfig.prototype.serializeBinary = function() {
18045
+ var writer = new jspb.BinaryWriter();
18046
+ proto.ocap.CurveConfig.serializeBinaryToWriter(this, writer);
18047
+ return writer.getResultBuffer();
18048
+ };
18049
+
18050
+
18051
+ /**
18052
+ * Serializes the given message to binary data (in protobuf wire
18053
+ * format), writing to the given BinaryWriter.
18054
+ * @param {!proto.ocap.CurveConfig} message
18055
+ * @param {!jspb.BinaryWriter} writer
18056
+ * @suppress {unusedLocalVariables} f is only used for nested messages
18057
+ */
18058
+ proto.ocap.CurveConfig.serializeBinaryToWriter = function(message, writer) {
18059
+ var f = undefined;
18060
+ f = message.getType();
18061
+ if (f.length > 0) {
18062
+ writer.writeString(
18063
+ 1,
18064
+ f
18065
+ );
18066
+ }
18067
+ f = message.getBasePrice();
18068
+ if (f.length > 0) {
18069
+ writer.writeString(
18070
+ 2,
18071
+ f
18072
+ );
18073
+ }
18074
+ f = message.getSlope();
18075
+ if (f.length > 0) {
18076
+ writer.writeString(
18077
+ 3,
18078
+ f
18079
+ );
18080
+ }
18081
+ f = message.getFixedPrice();
18082
+ if (f.length > 0) {
18083
+ writer.writeString(
18084
+ 4,
18085
+ f
18086
+ );
18087
+ }
18088
+ f = message.getConstant();
18089
+ if (f !== 0) {
18090
+ writer.writeUint32(
18091
+ 5,
18092
+ f
18093
+ );
18094
+ }
18095
+ };
18096
+
18097
+
18098
+ /**
18099
+ * optional string type = 1;
18100
+ * @return {string}
18101
+ */
18102
+ proto.ocap.CurveConfig.prototype.getType = function() {
18103
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
18104
+ };
18105
+
18106
+
18107
+ /**
18108
+ * @param {string} value
18109
+ * @return {!proto.ocap.CurveConfig} returns this
18110
+ */
18111
+ proto.ocap.CurveConfig.prototype.setType = function(value) {
18112
+ return jspb.Message.setProto3StringField(this, 1, value);
18113
+ };
18114
+
18115
+
18116
+ /**
18117
+ * optional string base_price = 2;
18118
+ * @return {string}
18119
+ */
18120
+ proto.ocap.CurveConfig.prototype.getBasePrice = function() {
18121
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
18122
+ };
18123
+
18124
+
18125
+ /**
18126
+ * @param {string} value
18127
+ * @return {!proto.ocap.CurveConfig} returns this
18128
+ */
18129
+ proto.ocap.CurveConfig.prototype.setBasePrice = function(value) {
18130
+ return jspb.Message.setProto3StringField(this, 2, value);
18131
+ };
18132
+
18133
+
18134
+ /**
18135
+ * optional string slope = 3;
18136
+ * @return {string}
18137
+ */
18138
+ proto.ocap.CurveConfig.prototype.getSlope = function() {
18139
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
18140
+ };
18141
+
18142
+
18143
+ /**
18144
+ * @param {string} value
18145
+ * @return {!proto.ocap.CurveConfig} returns this
18146
+ */
18147
+ proto.ocap.CurveConfig.prototype.setSlope = function(value) {
18148
+ return jspb.Message.setProto3StringField(this, 3, value);
18149
+ };
18150
+
18151
+
18152
+ /**
18153
+ * optional string fixed_price = 4;
18154
+ * @return {string}
18155
+ */
18156
+ proto.ocap.CurveConfig.prototype.getFixedPrice = function() {
18157
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
18158
+ };
18159
+
18160
+
18161
+ /**
18162
+ * @param {string} value
18163
+ * @return {!proto.ocap.CurveConfig} returns this
18164
+ */
18165
+ proto.ocap.CurveConfig.prototype.setFixedPrice = function(value) {
18166
+ return jspb.Message.setProto3StringField(this, 4, value);
18167
+ };
18168
+
18169
+
18170
+ /**
18171
+ * optional uint32 constant = 5;
18172
+ * @return {number}
18173
+ */
18174
+ proto.ocap.CurveConfig.prototype.getConstant = function() {
18175
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
18176
+ };
18177
+
18178
+
18179
+ /**
18180
+ * @param {number} value
18181
+ * @return {!proto.ocap.CurveConfig} returns this
18182
+ */
18183
+ proto.ocap.CurveConfig.prototype.setConstant = function(value) {
18184
+ return jspb.Message.setProto3IntField(this, 5, value);
18185
+ };
18186
+
18187
+
17826
18188
  goog.object.extend(exports, proto.ocap);
package/lib/index.d.ts CHANGED
@@ -177,6 +177,11 @@ declare namespace Enums {
177
177
  TERMINATED = 2,
178
178
  }
179
179
 
180
+ export enum TokenFactoryStatus {
181
+ TOKEN_FACTORY_ACTIVE = 0,
182
+ TOKEN_FACTORY_PAUSED = 1,
183
+ }
184
+
180
185
  export enum Direction {
181
186
  MUTUAL = 0,
182
187
  ONE_WAY = 1,
@@ -198,38 +203,42 @@ declare namespace Enums {
198
203
  0 = AccountMigrateTx,
199
204
  1 = AcquireAssetV2Tx,
200
205
  2 = AcquireAssetV3Tx,
201
- 3 = ClaimBlockRewardTx,
202
- 4 = ClaimStakeTx,
203
- 5 = CloseRollupTx,
204
- 6 = ConsumeAssetTx,
205
- 7 = CreateAssetTx,
206
- 8 = CreateFactoryTx,
207
- 9 = CreateRollupBlockTx,
208
- 10 = CreateRollupTx,
209
- 11 = CreateTokenTx,
210
- 12 = DeclareTx,
211
- 13 = DelegateTx,
212
- 14 = DepositTokenV2Tx,
213
- 15 = ExchangeTx,
214
- 16 = ExchangeV2Tx,
215
- 17 = JoinRollupTx,
216
- 18 = LeaveRollupTx,
217
- 19 = MigrateRollupTx,
218
- 20 = MintAssetTx,
219
- 21 = PauseRollupTx,
220
- 22 = ResumeRollupTx,
221
- 23 = ReturnStakeTx,
222
- 24 = RevokeDelegateTx,
223
- 25 = RevokeStakeTx,
224
- 26 = SlashStakeTx,
225
- 27 = StakeTx,
226
- 28 = TransferTx,
227
- 29 = TransferV2Tx,
228
- 30 = TransferV3Tx,
229
- 31 = UpdateAssetTx,
230
- 32 = UpdateRollupTx,
231
- 33 = UpgradeNodeTx,
232
- 34 = WithdrawTokenV2Tx,
206
+ 3 = BurnTokenTx,
207
+ 4 = ClaimBlockRewardTx,
208
+ 5 = ClaimStakeTx,
209
+ 6 = CloseRollupTx,
210
+ 7 = ConsumeAssetTx,
211
+ 8 = CreateAssetTx,
212
+ 9 = CreateFactoryTx,
213
+ 10 = CreateRollupBlockTx,
214
+ 11 = CreateRollupTx,
215
+ 12 = CreateTokenFactoryTx,
216
+ 13 = CreateTokenTx,
217
+ 14 = DeclareTx,
218
+ 15 = DelegateTx,
219
+ 16 = DepositTokenV2Tx,
220
+ 17 = ExchangeTx,
221
+ 18 = ExchangeV2Tx,
222
+ 19 = JoinRollupTx,
223
+ 20 = LeaveRollupTx,
224
+ 21 = MigrateRollupTx,
225
+ 22 = MintAssetTx,
226
+ 23 = MintTokenTx,
227
+ 24 = PauseRollupTx,
228
+ 25 = ResumeRollupTx,
229
+ 26 = ReturnStakeTx,
230
+ 27 = RevokeDelegateTx,
231
+ 28 = RevokeStakeTx,
232
+ 29 = SlashStakeTx,
233
+ 30 = StakeTx,
234
+ 31 = TransferTx,
235
+ 32 = TransferV2Tx,
236
+ 33 = TransferV3Tx,
237
+ 34 = UpdateAssetTx,
238
+ 35 = UpdateRollupTx,
239
+ 36 = UpdateTokenFactoryTx,
240
+ 37 = UpgradeNodeTx,
241
+ 38 = WithdrawTokenV2Tx,
233
242
  }
234
243
 
235
244
  export enum SupportedStakes {}
@@ -245,6 +254,7 @@ declare namespace Enums {
245
254
  StateType: typeof Enums.StateType;
246
255
  StakeType: typeof Enums.StakeType;
247
256
  ProtocolStatus: typeof Enums.ProtocolStatus;
257
+ TokenFactoryStatus: typeof Enums.TokenFactoryStatus;
248
258
  Direction: typeof Enums.Direction;
249
259
  Validity: typeof Enums.Validity;
250
260
  TokenFlowDirection: typeof Enums.TokenFlowDirection;
@@ -426,6 +436,11 @@ declare namespace Messages {
426
436
  2 = TERMINATED,
427
437
  }
428
438
 
439
+ export enum TokenFactoryStatus {
440
+ 0 = TOKEN_FACTORY_ACTIVE,
441
+ 1 = TOKEN_FACTORY_PAUSED,
442
+ }
443
+
429
444
  export enum Direction {
430
445
  0 = MUTUAL,
431
446
  1 = ONE_WAY,
@@ -454,6 +469,7 @@ declare namespace Messages {
454
469
  StateType: typeof Messages.StateType;
455
470
  StakeType: typeof Messages.StakeType;
456
471
  ProtocolStatus: typeof Messages.ProtocolStatus;
472
+ TokenFactoryStatus: typeof Messages.TokenFactoryStatus;
457
473
  Direction: typeof Messages.Direction;
458
474
  Validity: typeof Messages.Validity;
459
475
  TokenFlowDirection: typeof Messages.TokenFlowDirection;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/proto",
3
3
  "description": "Static modules generated from forge-sdk protobuf files",
4
- "version": "1.21.3",
4
+ "version": "1.22.1",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",