@ocap/proto 1.22.3 → 1.23.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/lib/gen/spec.json +6 -4
- package/lib/gen/tx_pb.js +88 -28
- package/lib/provider.js +2 -0
- package/package.json +1 -1
package/lib/gen/spec.json
CHANGED
|
@@ -4744,8 +4744,9 @@
|
|
|
4744
4744
|
"type": "string",
|
|
4745
4745
|
"id": 2
|
|
4746
4746
|
},
|
|
4747
|
-
"
|
|
4748
|
-
"
|
|
4747
|
+
"inputs": {
|
|
4748
|
+
"rule": "repeated",
|
|
4749
|
+
"type": "TransactionInput",
|
|
4749
4750
|
"id": 3
|
|
4750
4751
|
},
|
|
4751
4752
|
"receiver": {
|
|
@@ -4764,8 +4765,9 @@
|
|
|
4764
4765
|
"type": "string",
|
|
4765
4766
|
"id": 1
|
|
4766
4767
|
},
|
|
4767
|
-
"
|
|
4768
|
-
"
|
|
4768
|
+
"inputs": {
|
|
4769
|
+
"rule": "repeated",
|
|
4770
|
+
"type": "TransactionInput",
|
|
4769
4771
|
"id": 2
|
|
4770
4772
|
},
|
|
4771
4773
|
"minReserve": {
|
package/lib/gen/tx_pb.js
CHANGED
|
@@ -944,7 +944,7 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
944
944
|
* @constructor
|
|
945
945
|
*/
|
|
946
946
|
proto.ocap.MintTokenTx = function(opt_data) {
|
|
947
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
947
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.ocap.MintTokenTx.repeatedFields_, null);
|
|
948
948
|
};
|
|
949
949
|
goog.inherits(proto.ocap.MintTokenTx, jspb.Message);
|
|
950
950
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -965,7 +965,7 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
965
965
|
* @constructor
|
|
966
966
|
*/
|
|
967
967
|
proto.ocap.BurnTokenTx = function(opt_data) {
|
|
968
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
968
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.ocap.BurnTokenTx.repeatedFields_, null);
|
|
969
969
|
};
|
|
970
970
|
goog.inherits(proto.ocap.BurnTokenTx, jspb.Message);
|
|
971
971
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -14907,6 +14907,13 @@ proto.ocap.UpdateTokenFactoryTx.prototype.hasData = function() {
|
|
|
14907
14907
|
|
|
14908
14908
|
|
|
14909
14909
|
|
|
14910
|
+
/**
|
|
14911
|
+
* List of repeated fields within this message type.
|
|
14912
|
+
* @private {!Array<number>}
|
|
14913
|
+
* @const
|
|
14914
|
+
*/
|
|
14915
|
+
proto.ocap.MintTokenTx.repeatedFields_ = [3];
|
|
14916
|
+
|
|
14910
14917
|
|
|
14911
14918
|
|
|
14912
14919
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -14940,7 +14947,8 @@ proto.ocap.MintTokenTx.toObject = function(includeInstance, msg) {
|
|
|
14940
14947
|
var f, obj = {
|
|
14941
14948
|
tokenFactory: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
14942
14949
|
amount: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
14943
|
-
|
|
14950
|
+
inputsList: jspb.Message.toObjectList(msg.getInputsList(),
|
|
14951
|
+
type_pb.TransactionInput.toObject, includeInstance),
|
|
14944
14952
|
receiver: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
14945
14953
|
data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f)
|
|
14946
14954
|
};
|
|
@@ -14988,8 +14996,9 @@ proto.ocap.MintTokenTx.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
14988
14996
|
msg.setAmount(value);
|
|
14989
14997
|
break;
|
|
14990
14998
|
case 3:
|
|
14991
|
-
var value =
|
|
14992
|
-
|
|
14999
|
+
var value = new type_pb.TransactionInput;
|
|
15000
|
+
reader.readMessage(value,type_pb.TransactionInput.deserializeBinaryFromReader);
|
|
15001
|
+
msg.addInputs(value);
|
|
14993
15002
|
break;
|
|
14994
15003
|
case 4:
|
|
14995
15004
|
var value = /** @type {string} */ (reader.readString());
|
|
@@ -15043,11 +15052,12 @@ proto.ocap.MintTokenTx.serializeBinaryToWriter = function(message, writer) {
|
|
|
15043
15052
|
f
|
|
15044
15053
|
);
|
|
15045
15054
|
}
|
|
15046
|
-
f = message.
|
|
15055
|
+
f = message.getInputsList();
|
|
15047
15056
|
if (f.length > 0) {
|
|
15048
|
-
writer.
|
|
15057
|
+
writer.writeRepeatedMessage(
|
|
15049
15058
|
3,
|
|
15050
|
-
f
|
|
15059
|
+
f,
|
|
15060
|
+
type_pb.TransactionInput.serializeBinaryToWriter
|
|
15051
15061
|
);
|
|
15052
15062
|
}
|
|
15053
15063
|
f = message.getReceiver();
|
|
@@ -15105,20 +15115,40 @@ proto.ocap.MintTokenTx.prototype.setAmount = function(value) {
|
|
|
15105
15115
|
|
|
15106
15116
|
|
|
15107
15117
|
/**
|
|
15108
|
-
*
|
|
15109
|
-
* @return {
|
|
15118
|
+
* repeated TransactionInput inputs = 3;
|
|
15119
|
+
* @return {!Array<!proto.ocap.TransactionInput>}
|
|
15110
15120
|
*/
|
|
15111
|
-
proto.ocap.MintTokenTx.prototype.
|
|
15112
|
-
return /** @type
|
|
15121
|
+
proto.ocap.MintTokenTx.prototype.getInputsList = function() {
|
|
15122
|
+
return /** @type{!Array<!proto.ocap.TransactionInput>} */ (
|
|
15123
|
+
jspb.Message.getRepeatedWrapperField(this, type_pb.TransactionInput, 3));
|
|
15113
15124
|
};
|
|
15114
15125
|
|
|
15115
15126
|
|
|
15116
15127
|
/**
|
|
15117
|
-
* @param {
|
|
15128
|
+
* @param {!Array<!proto.ocap.TransactionInput>} value
|
|
15129
|
+
* @return {!proto.ocap.MintTokenTx} returns this
|
|
15130
|
+
*/
|
|
15131
|
+
proto.ocap.MintTokenTx.prototype.setInputsList = function(value) {
|
|
15132
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
15133
|
+
};
|
|
15134
|
+
|
|
15135
|
+
|
|
15136
|
+
/**
|
|
15137
|
+
* @param {!proto.ocap.TransactionInput=} opt_value
|
|
15138
|
+
* @param {number=} opt_index
|
|
15139
|
+
* @return {!proto.ocap.TransactionInput}
|
|
15140
|
+
*/
|
|
15141
|
+
proto.ocap.MintTokenTx.prototype.addInputs = function(opt_value, opt_index) {
|
|
15142
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ocap.TransactionInput, opt_index);
|
|
15143
|
+
};
|
|
15144
|
+
|
|
15145
|
+
|
|
15146
|
+
/**
|
|
15147
|
+
* Clears the list making it empty but non-null.
|
|
15118
15148
|
* @return {!proto.ocap.MintTokenTx} returns this
|
|
15119
15149
|
*/
|
|
15120
|
-
proto.ocap.MintTokenTx.prototype.
|
|
15121
|
-
return
|
|
15150
|
+
proto.ocap.MintTokenTx.prototype.clearInputsList = function() {
|
|
15151
|
+
return this.setInputsList([]);
|
|
15122
15152
|
};
|
|
15123
15153
|
|
|
15124
15154
|
|
|
@@ -15178,6 +15208,13 @@ proto.ocap.MintTokenTx.prototype.hasData = function() {
|
|
|
15178
15208
|
|
|
15179
15209
|
|
|
15180
15210
|
|
|
15211
|
+
/**
|
|
15212
|
+
* List of repeated fields within this message type.
|
|
15213
|
+
* @private {!Array<number>}
|
|
15214
|
+
* @const
|
|
15215
|
+
*/
|
|
15216
|
+
proto.ocap.BurnTokenTx.repeatedFields_ = [2];
|
|
15217
|
+
|
|
15181
15218
|
|
|
15182
15219
|
|
|
15183
15220
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -15210,7 +15247,8 @@ proto.ocap.BurnTokenTx.prototype.toObject = function(opt_includeInstance) {
|
|
|
15210
15247
|
proto.ocap.BurnTokenTx.toObject = function(includeInstance, msg) {
|
|
15211
15248
|
var f, obj = {
|
|
15212
15249
|
tokenFactory: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
15213
|
-
|
|
15250
|
+
inputsList: jspb.Message.toObjectList(msg.getInputsList(),
|
|
15251
|
+
type_pb.TransactionInput.toObject, includeInstance),
|
|
15214
15252
|
minReserve: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
15215
15253
|
receiver: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
15216
15254
|
data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f)
|
|
@@ -15255,8 +15293,9 @@ proto.ocap.BurnTokenTx.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
15255
15293
|
msg.setTokenFactory(value);
|
|
15256
15294
|
break;
|
|
15257
15295
|
case 2:
|
|
15258
|
-
var value =
|
|
15259
|
-
|
|
15296
|
+
var value = new type_pb.TransactionInput;
|
|
15297
|
+
reader.readMessage(value,type_pb.TransactionInput.deserializeBinaryFromReader);
|
|
15298
|
+
msg.addInputs(value);
|
|
15260
15299
|
break;
|
|
15261
15300
|
case 3:
|
|
15262
15301
|
var value = /** @type {string} */ (reader.readString());
|
|
@@ -15307,11 +15346,12 @@ proto.ocap.BurnTokenTx.serializeBinaryToWriter = function(message, writer) {
|
|
|
15307
15346
|
f
|
|
15308
15347
|
);
|
|
15309
15348
|
}
|
|
15310
|
-
f = message.
|
|
15349
|
+
f = message.getInputsList();
|
|
15311
15350
|
if (f.length > 0) {
|
|
15312
|
-
writer.
|
|
15351
|
+
writer.writeRepeatedMessage(
|
|
15313
15352
|
2,
|
|
15314
|
-
f
|
|
15353
|
+
f,
|
|
15354
|
+
type_pb.TransactionInput.serializeBinaryToWriter
|
|
15315
15355
|
);
|
|
15316
15356
|
}
|
|
15317
15357
|
f = message.getMinReserve();
|
|
@@ -15358,20 +15398,40 @@ proto.ocap.BurnTokenTx.prototype.setTokenFactory = function(value) {
|
|
|
15358
15398
|
|
|
15359
15399
|
|
|
15360
15400
|
/**
|
|
15361
|
-
*
|
|
15362
|
-
* @return {
|
|
15401
|
+
* repeated TransactionInput inputs = 2;
|
|
15402
|
+
* @return {!Array<!proto.ocap.TransactionInput>}
|
|
15363
15403
|
*/
|
|
15364
|
-
proto.ocap.BurnTokenTx.prototype.
|
|
15365
|
-
return /** @type
|
|
15404
|
+
proto.ocap.BurnTokenTx.prototype.getInputsList = function() {
|
|
15405
|
+
return /** @type{!Array<!proto.ocap.TransactionInput>} */ (
|
|
15406
|
+
jspb.Message.getRepeatedWrapperField(this, type_pb.TransactionInput, 2));
|
|
15366
15407
|
};
|
|
15367
15408
|
|
|
15368
15409
|
|
|
15369
15410
|
/**
|
|
15370
|
-
* @param {
|
|
15411
|
+
* @param {!Array<!proto.ocap.TransactionInput>} value
|
|
15371
15412
|
* @return {!proto.ocap.BurnTokenTx} returns this
|
|
15413
|
+
*/
|
|
15414
|
+
proto.ocap.BurnTokenTx.prototype.setInputsList = function(value) {
|
|
15415
|
+
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
15416
|
+
};
|
|
15417
|
+
|
|
15418
|
+
|
|
15419
|
+
/**
|
|
15420
|
+
* @param {!proto.ocap.TransactionInput=} opt_value
|
|
15421
|
+
* @param {number=} opt_index
|
|
15422
|
+
* @return {!proto.ocap.TransactionInput}
|
|
15372
15423
|
*/
|
|
15373
|
-
proto.ocap.BurnTokenTx.prototype.
|
|
15374
|
-
return jspb.Message.
|
|
15424
|
+
proto.ocap.BurnTokenTx.prototype.addInputs = function(opt_value, opt_index) {
|
|
15425
|
+
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ocap.TransactionInput, opt_index);
|
|
15426
|
+
};
|
|
15427
|
+
|
|
15428
|
+
|
|
15429
|
+
/**
|
|
15430
|
+
* Clears the list making it empty but non-null.
|
|
15431
|
+
* @return {!proto.ocap.BurnTokenTx} returns this
|
|
15432
|
+
*/
|
|
15433
|
+
proto.ocap.BurnTokenTx.prototype.clearInputsList = function() {
|
|
15434
|
+
return this.setInputsList([]);
|
|
15375
15435
|
};
|
|
15376
15436
|
|
|
15377
15437
|
|
package/lib/provider.js
CHANGED
|
@@ -207,6 +207,8 @@ module.exports = function createProvider(proto, json, urls = {}) {
|
|
|
207
207
|
'ClaimBlockRewardTx',
|
|
208
208
|
'CreateAssetTx',
|
|
209
209
|
'ConsumeAssetTx',
|
|
210
|
+
'MintTokenTx',
|
|
211
|
+
'BurnTokenTx',
|
|
210
212
|
].filter((x) => enums.SupportedTxs.includes(x)),
|
|
211
213
|
|
|
212
214
|
stakes: enums.SupportedStakes,
|