@trustwallet/wallet-core 4.0.34 → 4.0.36
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.
@@ -13468,6 +13468,294 @@
|
|
13468
13468
|
return SideChainUndelegate;
|
13469
13469
|
})();
|
13470
13470
|
|
13471
|
+
Proto.SideChainStakeMigration = (function() {
|
13472
|
+
|
13473
|
+
/**
|
13474
|
+
* Properties of a SideChainStakeMigration.
|
13475
|
+
* @memberof TW.Binance.Proto
|
13476
|
+
* @interface ISideChainStakeMigration
|
13477
|
+
* @property {Uint8Array|null} [validatorSrcAddr] SideChainStakeMigration validatorSrcAddr
|
13478
|
+
* @property {Uint8Array|null} [validatorDstAddr] SideChainStakeMigration validatorDstAddr
|
13479
|
+
* @property {Uint8Array|null} [delegatorAddr] SideChainStakeMigration delegatorAddr
|
13480
|
+
* @property {Uint8Array|null} [refundAddr] SideChainStakeMigration refundAddr
|
13481
|
+
* @property {TW.Binance.Proto.SendOrder.IToken|null} [amount] SideChainStakeMigration amount
|
13482
|
+
*/
|
13483
|
+
|
13484
|
+
/**
|
13485
|
+
* Constructs a new SideChainStakeMigration.
|
13486
|
+
* @memberof TW.Binance.Proto
|
13487
|
+
* @classdesc Represents a SideChainStakeMigration.
|
13488
|
+
* @implements ISideChainStakeMigration
|
13489
|
+
* @constructor
|
13490
|
+
* @param {TW.Binance.Proto.ISideChainStakeMigration=} [properties] Properties to set
|
13491
|
+
*/
|
13492
|
+
function SideChainStakeMigration(properties) {
|
13493
|
+
if (properties)
|
13494
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
13495
|
+
if (properties[keys[i]] != null)
|
13496
|
+
this[keys[i]] = properties[keys[i]];
|
13497
|
+
}
|
13498
|
+
|
13499
|
+
/**
|
13500
|
+
* SideChainStakeMigration validatorSrcAddr.
|
13501
|
+
* @member {Uint8Array} validatorSrcAddr
|
13502
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13503
|
+
* @instance
|
13504
|
+
*/
|
13505
|
+
SideChainStakeMigration.prototype.validatorSrcAddr = $util.newBuffer([]);
|
13506
|
+
|
13507
|
+
/**
|
13508
|
+
* SideChainStakeMigration validatorDstAddr.
|
13509
|
+
* @member {Uint8Array} validatorDstAddr
|
13510
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13511
|
+
* @instance
|
13512
|
+
*/
|
13513
|
+
SideChainStakeMigration.prototype.validatorDstAddr = $util.newBuffer([]);
|
13514
|
+
|
13515
|
+
/**
|
13516
|
+
* SideChainStakeMigration delegatorAddr.
|
13517
|
+
* @member {Uint8Array} delegatorAddr
|
13518
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13519
|
+
* @instance
|
13520
|
+
*/
|
13521
|
+
SideChainStakeMigration.prototype.delegatorAddr = $util.newBuffer([]);
|
13522
|
+
|
13523
|
+
/**
|
13524
|
+
* SideChainStakeMigration refundAddr.
|
13525
|
+
* @member {Uint8Array} refundAddr
|
13526
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13527
|
+
* @instance
|
13528
|
+
*/
|
13529
|
+
SideChainStakeMigration.prototype.refundAddr = $util.newBuffer([]);
|
13530
|
+
|
13531
|
+
/**
|
13532
|
+
* SideChainStakeMigration amount.
|
13533
|
+
* @member {TW.Binance.Proto.SendOrder.IToken|null|undefined} amount
|
13534
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13535
|
+
* @instance
|
13536
|
+
*/
|
13537
|
+
SideChainStakeMigration.prototype.amount = null;
|
13538
|
+
|
13539
|
+
/**
|
13540
|
+
* Creates a new SideChainStakeMigration instance using the specified properties.
|
13541
|
+
* @function create
|
13542
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13543
|
+
* @static
|
13544
|
+
* @param {TW.Binance.Proto.ISideChainStakeMigration=} [properties] Properties to set
|
13545
|
+
* @returns {TW.Binance.Proto.SideChainStakeMigration} SideChainStakeMigration instance
|
13546
|
+
*/
|
13547
|
+
SideChainStakeMigration.create = function create(properties) {
|
13548
|
+
return new SideChainStakeMigration(properties);
|
13549
|
+
};
|
13550
|
+
|
13551
|
+
/**
|
13552
|
+
* Encodes the specified SideChainStakeMigration message. Does not implicitly {@link TW.Binance.Proto.SideChainStakeMigration.verify|verify} messages.
|
13553
|
+
* @function encode
|
13554
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13555
|
+
* @static
|
13556
|
+
* @param {TW.Binance.Proto.ISideChainStakeMigration} message SideChainStakeMigration message or plain object to encode
|
13557
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
13558
|
+
* @returns {$protobuf.Writer} Writer
|
13559
|
+
*/
|
13560
|
+
SideChainStakeMigration.encode = function encode(message, writer) {
|
13561
|
+
if (!writer)
|
13562
|
+
writer = $Writer.create();
|
13563
|
+
if (message.validatorSrcAddr != null && Object.hasOwnProperty.call(message, "validatorSrcAddr"))
|
13564
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.validatorSrcAddr);
|
13565
|
+
if (message.validatorDstAddr != null && Object.hasOwnProperty.call(message, "validatorDstAddr"))
|
13566
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorDstAddr);
|
13567
|
+
if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr"))
|
13568
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.delegatorAddr);
|
13569
|
+
if (message.refundAddr != null && Object.hasOwnProperty.call(message, "refundAddr"))
|
13570
|
+
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.refundAddr);
|
13571
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
13572
|
+
$root.TW.Binance.Proto.SendOrder.Token.encode(message.amount, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
13573
|
+
return writer;
|
13574
|
+
};
|
13575
|
+
|
13576
|
+
/**
|
13577
|
+
* Decodes a SideChainStakeMigration message from the specified reader or buffer.
|
13578
|
+
* @function decode
|
13579
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13580
|
+
* @static
|
13581
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
13582
|
+
* @param {number} [length] Message length if known beforehand
|
13583
|
+
* @returns {TW.Binance.Proto.SideChainStakeMigration} SideChainStakeMigration
|
13584
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
13585
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
13586
|
+
*/
|
13587
|
+
SideChainStakeMigration.decode = function decode(reader, length) {
|
13588
|
+
if (!(reader instanceof $Reader))
|
13589
|
+
reader = $Reader.create(reader);
|
13590
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Binance.Proto.SideChainStakeMigration();
|
13591
|
+
while (reader.pos < end) {
|
13592
|
+
var tag = reader.uint32();
|
13593
|
+
switch (tag >>> 3) {
|
13594
|
+
case 1:
|
13595
|
+
message.validatorSrcAddr = reader.bytes();
|
13596
|
+
break;
|
13597
|
+
case 2:
|
13598
|
+
message.validatorDstAddr = reader.bytes();
|
13599
|
+
break;
|
13600
|
+
case 3:
|
13601
|
+
message.delegatorAddr = reader.bytes();
|
13602
|
+
break;
|
13603
|
+
case 4:
|
13604
|
+
message.refundAddr = reader.bytes();
|
13605
|
+
break;
|
13606
|
+
case 5:
|
13607
|
+
message.amount = $root.TW.Binance.Proto.SendOrder.Token.decode(reader, reader.uint32());
|
13608
|
+
break;
|
13609
|
+
default:
|
13610
|
+
reader.skipType(tag & 7);
|
13611
|
+
break;
|
13612
|
+
}
|
13613
|
+
}
|
13614
|
+
return message;
|
13615
|
+
};
|
13616
|
+
|
13617
|
+
/**
|
13618
|
+
* Verifies a SideChainStakeMigration message.
|
13619
|
+
* @function verify
|
13620
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13621
|
+
* @static
|
13622
|
+
* @param {Object.<string,*>} message Plain object to verify
|
13623
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
13624
|
+
*/
|
13625
|
+
SideChainStakeMigration.verify = function verify(message) {
|
13626
|
+
if (typeof message !== "object" || message === null)
|
13627
|
+
return "object expected";
|
13628
|
+
if (message.validatorSrcAddr != null && message.hasOwnProperty("validatorSrcAddr"))
|
13629
|
+
if (!(message.validatorSrcAddr && typeof message.validatorSrcAddr.length === "number" || $util.isString(message.validatorSrcAddr)))
|
13630
|
+
return "validatorSrcAddr: buffer expected";
|
13631
|
+
if (message.validatorDstAddr != null && message.hasOwnProperty("validatorDstAddr"))
|
13632
|
+
if (!(message.validatorDstAddr && typeof message.validatorDstAddr.length === "number" || $util.isString(message.validatorDstAddr)))
|
13633
|
+
return "validatorDstAddr: buffer expected";
|
13634
|
+
if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr"))
|
13635
|
+
if (!(message.delegatorAddr && typeof message.delegatorAddr.length === "number" || $util.isString(message.delegatorAddr)))
|
13636
|
+
return "delegatorAddr: buffer expected";
|
13637
|
+
if (message.refundAddr != null && message.hasOwnProperty("refundAddr"))
|
13638
|
+
if (!(message.refundAddr && typeof message.refundAddr.length === "number" || $util.isString(message.refundAddr)))
|
13639
|
+
return "refundAddr: buffer expected";
|
13640
|
+
if (message.amount != null && message.hasOwnProperty("amount")) {
|
13641
|
+
var error = $root.TW.Binance.Proto.SendOrder.Token.verify(message.amount);
|
13642
|
+
if (error)
|
13643
|
+
return "amount." + error;
|
13644
|
+
}
|
13645
|
+
return null;
|
13646
|
+
};
|
13647
|
+
|
13648
|
+
/**
|
13649
|
+
* Creates a SideChainStakeMigration message from a plain object. Also converts values to their respective internal types.
|
13650
|
+
* @function fromObject
|
13651
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13652
|
+
* @static
|
13653
|
+
* @param {Object.<string,*>} object Plain object
|
13654
|
+
* @returns {TW.Binance.Proto.SideChainStakeMigration} SideChainStakeMigration
|
13655
|
+
*/
|
13656
|
+
SideChainStakeMigration.fromObject = function fromObject(object) {
|
13657
|
+
if (object instanceof $root.TW.Binance.Proto.SideChainStakeMigration)
|
13658
|
+
return object;
|
13659
|
+
var message = new $root.TW.Binance.Proto.SideChainStakeMigration();
|
13660
|
+
if (object.validatorSrcAddr != null)
|
13661
|
+
if (typeof object.validatorSrcAddr === "string")
|
13662
|
+
$util.base64.decode(object.validatorSrcAddr, message.validatorSrcAddr = $util.newBuffer($util.base64.length(object.validatorSrcAddr)), 0);
|
13663
|
+
else if (object.validatorSrcAddr.length)
|
13664
|
+
message.validatorSrcAddr = object.validatorSrcAddr;
|
13665
|
+
if (object.validatorDstAddr != null)
|
13666
|
+
if (typeof object.validatorDstAddr === "string")
|
13667
|
+
$util.base64.decode(object.validatorDstAddr, message.validatorDstAddr = $util.newBuffer($util.base64.length(object.validatorDstAddr)), 0);
|
13668
|
+
else if (object.validatorDstAddr.length)
|
13669
|
+
message.validatorDstAddr = object.validatorDstAddr;
|
13670
|
+
if (object.delegatorAddr != null)
|
13671
|
+
if (typeof object.delegatorAddr === "string")
|
13672
|
+
$util.base64.decode(object.delegatorAddr, message.delegatorAddr = $util.newBuffer($util.base64.length(object.delegatorAddr)), 0);
|
13673
|
+
else if (object.delegatorAddr.length)
|
13674
|
+
message.delegatorAddr = object.delegatorAddr;
|
13675
|
+
if (object.refundAddr != null)
|
13676
|
+
if (typeof object.refundAddr === "string")
|
13677
|
+
$util.base64.decode(object.refundAddr, message.refundAddr = $util.newBuffer($util.base64.length(object.refundAddr)), 0);
|
13678
|
+
else if (object.refundAddr.length)
|
13679
|
+
message.refundAddr = object.refundAddr;
|
13680
|
+
if (object.amount != null) {
|
13681
|
+
if (typeof object.amount !== "object")
|
13682
|
+
throw TypeError(".TW.Binance.Proto.SideChainStakeMigration.amount: object expected");
|
13683
|
+
message.amount = $root.TW.Binance.Proto.SendOrder.Token.fromObject(object.amount);
|
13684
|
+
}
|
13685
|
+
return message;
|
13686
|
+
};
|
13687
|
+
|
13688
|
+
/**
|
13689
|
+
* Creates a plain object from a SideChainStakeMigration message. Also converts values to other types if specified.
|
13690
|
+
* @function toObject
|
13691
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13692
|
+
* @static
|
13693
|
+
* @param {TW.Binance.Proto.SideChainStakeMigration} message SideChainStakeMigration
|
13694
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
13695
|
+
* @returns {Object.<string,*>} Plain object
|
13696
|
+
*/
|
13697
|
+
SideChainStakeMigration.toObject = function toObject(message, options) {
|
13698
|
+
if (!options)
|
13699
|
+
options = {};
|
13700
|
+
var object = {};
|
13701
|
+
if (options.defaults) {
|
13702
|
+
if (options.bytes === String)
|
13703
|
+
object.validatorSrcAddr = "";
|
13704
|
+
else {
|
13705
|
+
object.validatorSrcAddr = [];
|
13706
|
+
if (options.bytes !== Array)
|
13707
|
+
object.validatorSrcAddr = $util.newBuffer(object.validatorSrcAddr);
|
13708
|
+
}
|
13709
|
+
if (options.bytes === String)
|
13710
|
+
object.validatorDstAddr = "";
|
13711
|
+
else {
|
13712
|
+
object.validatorDstAddr = [];
|
13713
|
+
if (options.bytes !== Array)
|
13714
|
+
object.validatorDstAddr = $util.newBuffer(object.validatorDstAddr);
|
13715
|
+
}
|
13716
|
+
if (options.bytes === String)
|
13717
|
+
object.delegatorAddr = "";
|
13718
|
+
else {
|
13719
|
+
object.delegatorAddr = [];
|
13720
|
+
if (options.bytes !== Array)
|
13721
|
+
object.delegatorAddr = $util.newBuffer(object.delegatorAddr);
|
13722
|
+
}
|
13723
|
+
if (options.bytes === String)
|
13724
|
+
object.refundAddr = "";
|
13725
|
+
else {
|
13726
|
+
object.refundAddr = [];
|
13727
|
+
if (options.bytes !== Array)
|
13728
|
+
object.refundAddr = $util.newBuffer(object.refundAddr);
|
13729
|
+
}
|
13730
|
+
object.amount = null;
|
13731
|
+
}
|
13732
|
+
if (message.validatorSrcAddr != null && message.hasOwnProperty("validatorSrcAddr"))
|
13733
|
+
object.validatorSrcAddr = options.bytes === String ? $util.base64.encode(message.validatorSrcAddr, 0, message.validatorSrcAddr.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddr) : message.validatorSrcAddr;
|
13734
|
+
if (message.validatorDstAddr != null && message.hasOwnProperty("validatorDstAddr"))
|
13735
|
+
object.validatorDstAddr = options.bytes === String ? $util.base64.encode(message.validatorDstAddr, 0, message.validatorDstAddr.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddr) : message.validatorDstAddr;
|
13736
|
+
if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr"))
|
13737
|
+
object.delegatorAddr = options.bytes === String ? $util.base64.encode(message.delegatorAddr, 0, message.delegatorAddr.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddr) : message.delegatorAddr;
|
13738
|
+
if (message.refundAddr != null && message.hasOwnProperty("refundAddr"))
|
13739
|
+
object.refundAddr = options.bytes === String ? $util.base64.encode(message.refundAddr, 0, message.refundAddr.length) : options.bytes === Array ? Array.prototype.slice.call(message.refundAddr) : message.refundAddr;
|
13740
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
13741
|
+
object.amount = $root.TW.Binance.Proto.SendOrder.Token.toObject(message.amount, options);
|
13742
|
+
return object;
|
13743
|
+
};
|
13744
|
+
|
13745
|
+
/**
|
13746
|
+
* Converts this SideChainStakeMigration to JSON.
|
13747
|
+
* @function toJSON
|
13748
|
+
* @memberof TW.Binance.Proto.SideChainStakeMigration
|
13749
|
+
* @instance
|
13750
|
+
* @returns {Object.<string,*>} JSON object
|
13751
|
+
*/
|
13752
|
+
SideChainStakeMigration.prototype.toJSON = function toJSON() {
|
13753
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
13754
|
+
};
|
13755
|
+
|
13756
|
+
return SideChainStakeMigration;
|
13757
|
+
})();
|
13758
|
+
|
13471
13759
|
Proto.TimeLockOrder = (function() {
|
13472
13760
|
|
13473
13761
|
/**
|
@@ -14279,6 +14567,7 @@
|
|
14279
14567
|
* @property {TW.Binance.Proto.ITimeLockOrder|null} [timeLockOrder] SigningInput timeLockOrder
|
14280
14568
|
* @property {TW.Binance.Proto.ITimeRelockOrder|null} [timeRelockOrder] SigningInput timeRelockOrder
|
14281
14569
|
* @property {TW.Binance.Proto.ITimeUnlockOrder|null} [timeUnlockOrder] SigningInput timeUnlockOrder
|
14570
|
+
* @property {TW.Binance.Proto.ISideChainStakeMigration|null} [sideStakeMigrationOrder] SigningInput sideStakeMigrationOrder
|
14282
14571
|
*/
|
14283
14572
|
|
14284
14573
|
/**
|
@@ -14496,17 +14785,25 @@
|
|
14496
14785
|
*/
|
14497
14786
|
SigningInput.prototype.timeUnlockOrder = null;
|
14498
14787
|
|
14788
|
+
/**
|
14789
|
+
* SigningInput sideStakeMigrationOrder.
|
14790
|
+
* @member {TW.Binance.Proto.ISideChainStakeMigration|null|undefined} sideStakeMigrationOrder
|
14791
|
+
* @memberof TW.Binance.Proto.SigningInput
|
14792
|
+
* @instance
|
14793
|
+
*/
|
14794
|
+
SigningInput.prototype.sideStakeMigrationOrder = null;
|
14795
|
+
|
14499
14796
|
// OneOf field names bound to virtual getters and setters
|
14500
14797
|
var $oneOfFields;
|
14501
14798
|
|
14502
14799
|
/**
|
14503
14800
|
* SigningInput orderOneof.
|
14504
|
-
* @member {"tradeOrder"|"cancelTradeOrder"|"sendOrder"|"freezeOrder"|"unfreezeOrder"|"htltOrder"|"depositHTLTOrder"|"claimHTLTOrder"|"refundHTLTOrder"|"issueOrder"|"mintOrder"|"burnOrder"|"transferOutOrder"|"sideDelegateOrder"|"sideRedelegateOrder"|"sideUndelegateOrder"|"timeLockOrder"|"timeRelockOrder"|"timeUnlockOrder"|undefined} orderOneof
|
14801
|
+
* @member {"tradeOrder"|"cancelTradeOrder"|"sendOrder"|"freezeOrder"|"unfreezeOrder"|"htltOrder"|"depositHTLTOrder"|"claimHTLTOrder"|"refundHTLTOrder"|"issueOrder"|"mintOrder"|"burnOrder"|"transferOutOrder"|"sideDelegateOrder"|"sideRedelegateOrder"|"sideUndelegateOrder"|"timeLockOrder"|"timeRelockOrder"|"timeUnlockOrder"|"sideStakeMigrationOrder"|undefined} orderOneof
|
14505
14802
|
* @memberof TW.Binance.Proto.SigningInput
|
14506
14803
|
* @instance
|
14507
14804
|
*/
|
14508
14805
|
Object.defineProperty(SigningInput.prototype, "orderOneof", {
|
14509
|
-
get: $util.oneOfGetter($oneOfFields = ["tradeOrder", "cancelTradeOrder", "sendOrder", "freezeOrder", "unfreezeOrder", "htltOrder", "depositHTLTOrder", "claimHTLTOrder", "refundHTLTOrder", "issueOrder", "mintOrder", "burnOrder", "transferOutOrder", "sideDelegateOrder", "sideRedelegateOrder", "sideUndelegateOrder", "timeLockOrder", "timeRelockOrder", "timeUnlockOrder"]),
|
14806
|
+
get: $util.oneOfGetter($oneOfFields = ["tradeOrder", "cancelTradeOrder", "sendOrder", "freezeOrder", "unfreezeOrder", "htltOrder", "depositHTLTOrder", "claimHTLTOrder", "refundHTLTOrder", "issueOrder", "mintOrder", "burnOrder", "transferOutOrder", "sideDelegateOrder", "sideRedelegateOrder", "sideUndelegateOrder", "timeLockOrder", "timeRelockOrder", "timeUnlockOrder", "sideStakeMigrationOrder"]),
|
14510
14807
|
set: $util.oneOfSetter($oneOfFields)
|
14511
14808
|
});
|
14512
14809
|
|
@@ -14584,6 +14881,8 @@
|
|
14584
14881
|
$root.TW.Binance.Proto.TimeRelockOrder.encode(message.timeRelockOrder, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
|
14585
14882
|
if (message.timeUnlockOrder != null && Object.hasOwnProperty.call(message, "timeUnlockOrder"))
|
14586
14883
|
$root.TW.Binance.Proto.TimeUnlockOrder.encode(message.timeUnlockOrder, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
|
14884
|
+
if (message.sideStakeMigrationOrder != null && Object.hasOwnProperty.call(message, "sideStakeMigrationOrder"))
|
14885
|
+
$root.TW.Binance.Proto.SideChainStakeMigration.encode(message.sideStakeMigrationOrder, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
|
14587
14886
|
return writer;
|
14588
14887
|
};
|
14589
14888
|
|
@@ -14680,6 +14979,9 @@
|
|
14680
14979
|
case 26:
|
14681
14980
|
message.timeUnlockOrder = $root.TW.Binance.Proto.TimeUnlockOrder.decode(reader, reader.uint32());
|
14682
14981
|
break;
|
14982
|
+
case 27:
|
14983
|
+
message.sideStakeMigrationOrder = $root.TW.Binance.Proto.SideChainStakeMigration.decode(reader, reader.uint32());
|
14984
|
+
break;
|
14683
14985
|
default:
|
14684
14986
|
reader.skipType(tag & 7);
|
14685
14987
|
break;
|
@@ -14906,6 +15208,16 @@
|
|
14906
15208
|
return "timeUnlockOrder." + error;
|
14907
15209
|
}
|
14908
15210
|
}
|
15211
|
+
if (message.sideStakeMigrationOrder != null && message.hasOwnProperty("sideStakeMigrationOrder")) {
|
15212
|
+
if (properties.orderOneof === 1)
|
15213
|
+
return "orderOneof: multiple values";
|
15214
|
+
properties.orderOneof = 1;
|
15215
|
+
{
|
15216
|
+
var error = $root.TW.Binance.Proto.SideChainStakeMigration.verify(message.sideStakeMigrationOrder);
|
15217
|
+
if (error)
|
15218
|
+
return "sideStakeMigrationOrder." + error;
|
15219
|
+
}
|
15220
|
+
}
|
14909
15221
|
return null;
|
14910
15222
|
};
|
14911
15223
|
|
@@ -15052,6 +15364,11 @@
|
|
15052
15364
|
throw TypeError(".TW.Binance.Proto.SigningInput.timeUnlockOrder: object expected");
|
15053
15365
|
message.timeUnlockOrder = $root.TW.Binance.Proto.TimeUnlockOrder.fromObject(object.timeUnlockOrder);
|
15054
15366
|
}
|
15367
|
+
if (object.sideStakeMigrationOrder != null) {
|
15368
|
+
if (typeof object.sideStakeMigrationOrder !== "object")
|
15369
|
+
throw TypeError(".TW.Binance.Proto.SigningInput.sideStakeMigrationOrder: object expected");
|
15370
|
+
message.sideStakeMigrationOrder = $root.TW.Binance.Proto.SideChainStakeMigration.fromObject(object.sideStakeMigrationOrder);
|
15371
|
+
}
|
15055
15372
|
return message;
|
15056
15373
|
};
|
15057
15374
|
|
@@ -15210,6 +15527,11 @@
|
|
15210
15527
|
if (options.oneofs)
|
15211
15528
|
object.orderOneof = "timeUnlockOrder";
|
15212
15529
|
}
|
15530
|
+
if (message.sideStakeMigrationOrder != null && message.hasOwnProperty("sideStakeMigrationOrder")) {
|
15531
|
+
object.sideStakeMigrationOrder = $root.TW.Binance.Proto.SideChainStakeMigration.toObject(message.sideStakeMigrationOrder, options);
|
15532
|
+
if (options.oneofs)
|
15533
|
+
object.orderOneof = "sideStakeMigrationOrder";
|
15534
|
+
}
|
15213
15535
|
return object;
|
15214
15536
|
};
|
15215
15537
|
|
@@ -58828,6 +59150,7 @@
|
|
58828
59150
|
* @property {TW.FIO.Proto.Action.ITransfer|null} [transferMessage] Action transferMessage
|
58829
59151
|
* @property {TW.FIO.Proto.Action.IRenewFioAddress|null} [renewFioAddressMessage] Action renewFioAddressMessage
|
58830
59152
|
* @property {TW.FIO.Proto.Action.INewFundsRequest|null} [newFundsRequestMessage] Action newFundsRequestMessage
|
59153
|
+
* @property {TW.FIO.Proto.Action.IRemovePubAddress|null} [removePubAddressMessage] Action removePubAddressMessage
|
58831
59154
|
*/
|
58832
59155
|
|
58833
59156
|
/**
|
@@ -58885,17 +59208,25 @@
|
|
58885
59208
|
*/
|
58886
59209
|
Action.prototype.newFundsRequestMessage = null;
|
58887
59210
|
|
59211
|
+
/**
|
59212
|
+
* Action removePubAddressMessage.
|
59213
|
+
* @member {TW.FIO.Proto.Action.IRemovePubAddress|null|undefined} removePubAddressMessage
|
59214
|
+
* @memberof TW.FIO.Proto.Action
|
59215
|
+
* @instance
|
59216
|
+
*/
|
59217
|
+
Action.prototype.removePubAddressMessage = null;
|
59218
|
+
|
58888
59219
|
// OneOf field names bound to virtual getters and setters
|
58889
59220
|
var $oneOfFields;
|
58890
59221
|
|
58891
59222
|
/**
|
58892
59223
|
* Action messageOneof.
|
58893
|
-
* @member {"registerFioAddressMessage"|"addPubAddressMessage"|"transferMessage"|"renewFioAddressMessage"|"newFundsRequestMessage"|undefined} messageOneof
|
59224
|
+
* @member {"registerFioAddressMessage"|"addPubAddressMessage"|"transferMessage"|"renewFioAddressMessage"|"newFundsRequestMessage"|"removePubAddressMessage"|undefined} messageOneof
|
58894
59225
|
* @memberof TW.FIO.Proto.Action
|
58895
59226
|
* @instance
|
58896
59227
|
*/
|
58897
59228
|
Object.defineProperty(Action.prototype, "messageOneof", {
|
58898
|
-
get: $util.oneOfGetter($oneOfFields = ["registerFioAddressMessage", "addPubAddressMessage", "transferMessage", "renewFioAddressMessage", "newFundsRequestMessage"]),
|
59229
|
+
get: $util.oneOfGetter($oneOfFields = ["registerFioAddressMessage", "addPubAddressMessage", "transferMessage", "renewFioAddressMessage", "newFundsRequestMessage", "removePubAddressMessage"]),
|
58899
59230
|
set: $util.oneOfSetter($oneOfFields)
|
58900
59231
|
});
|
58901
59232
|
|
@@ -58933,6 +59264,8 @@
|
|
58933
59264
|
$root.TW.FIO.Proto.Action.RenewFioAddress.encode(message.renewFioAddressMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
58934
59265
|
if (message.newFundsRequestMessage != null && Object.hasOwnProperty.call(message, "newFundsRequestMessage"))
|
58935
59266
|
$root.TW.FIO.Proto.Action.NewFundsRequest.encode(message.newFundsRequestMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
59267
|
+
if (message.removePubAddressMessage != null && Object.hasOwnProperty.call(message, "removePubAddressMessage"))
|
59268
|
+
$root.TW.FIO.Proto.Action.RemovePubAddress.encode(message.removePubAddressMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
58936
59269
|
return writer;
|
58937
59270
|
};
|
58938
59271
|
|
@@ -58969,6 +59302,9 @@
|
|
58969
59302
|
case 5:
|
58970
59303
|
message.newFundsRequestMessage = $root.TW.FIO.Proto.Action.NewFundsRequest.decode(reader, reader.uint32());
|
58971
59304
|
break;
|
59305
|
+
case 6:
|
59306
|
+
message.removePubAddressMessage = $root.TW.FIO.Proto.Action.RemovePubAddress.decode(reader, reader.uint32());
|
59307
|
+
break;
|
58972
59308
|
default:
|
58973
59309
|
reader.skipType(tag & 7);
|
58974
59310
|
break;
|
@@ -59037,6 +59373,16 @@
|
|
59037
59373
|
return "newFundsRequestMessage." + error;
|
59038
59374
|
}
|
59039
59375
|
}
|
59376
|
+
if (message.removePubAddressMessage != null && message.hasOwnProperty("removePubAddressMessage")) {
|
59377
|
+
if (properties.messageOneof === 1)
|
59378
|
+
return "messageOneof: multiple values";
|
59379
|
+
properties.messageOneof = 1;
|
59380
|
+
{
|
59381
|
+
var error = $root.TW.FIO.Proto.Action.RemovePubAddress.verify(message.removePubAddressMessage);
|
59382
|
+
if (error)
|
59383
|
+
return "removePubAddressMessage." + error;
|
59384
|
+
}
|
59385
|
+
}
|
59040
59386
|
return null;
|
59041
59387
|
};
|
59042
59388
|
|
@@ -59077,6 +59423,11 @@
|
|
59077
59423
|
throw TypeError(".TW.FIO.Proto.Action.newFundsRequestMessage: object expected");
|
59078
59424
|
message.newFundsRequestMessage = $root.TW.FIO.Proto.Action.NewFundsRequest.fromObject(object.newFundsRequestMessage);
|
59079
59425
|
}
|
59426
|
+
if (object.removePubAddressMessage != null) {
|
59427
|
+
if (typeof object.removePubAddressMessage !== "object")
|
59428
|
+
throw TypeError(".TW.FIO.Proto.Action.removePubAddressMessage: object expected");
|
59429
|
+
message.removePubAddressMessage = $root.TW.FIO.Proto.Action.RemovePubAddress.fromObject(object.removePubAddressMessage);
|
59430
|
+
}
|
59080
59431
|
return message;
|
59081
59432
|
};
|
59082
59433
|
|
@@ -59118,6 +59469,11 @@
|
|
59118
59469
|
if (options.oneofs)
|
59119
59470
|
object.messageOneof = "newFundsRequestMessage";
|
59120
59471
|
}
|
59472
|
+
if (message.removePubAddressMessage != null && message.hasOwnProperty("removePubAddressMessage")) {
|
59473
|
+
object.removePubAddressMessage = $root.TW.FIO.Proto.Action.RemovePubAddress.toObject(message.removePubAddressMessage, options);
|
59474
|
+
if (options.oneofs)
|
59475
|
+
object.messageOneof = "removePubAddressMessage";
|
59476
|
+
}
|
59121
59477
|
return object;
|
59122
59478
|
};
|
59123
59479
|
|
@@ -59588,6 +59944,245 @@
|
|
59588
59944
|
return AddPubAddress;
|
59589
59945
|
})();
|
59590
59946
|
|
59947
|
+
Action.RemovePubAddress = (function() {
|
59948
|
+
|
59949
|
+
/**
|
59950
|
+
* Properties of a RemovePubAddress.
|
59951
|
+
* @memberof TW.FIO.Proto.Action
|
59952
|
+
* @interface IRemovePubAddress
|
59953
|
+
* @property {string|null} [fioAddress] RemovePubAddress fioAddress
|
59954
|
+
* @property {Array.<TW.FIO.Proto.IPublicAddress>|null} [publicAddresses] RemovePubAddress publicAddresses
|
59955
|
+
* @property {Long|null} [fee] RemovePubAddress fee
|
59956
|
+
*/
|
59957
|
+
|
59958
|
+
/**
|
59959
|
+
* Constructs a new RemovePubAddress.
|
59960
|
+
* @memberof TW.FIO.Proto.Action
|
59961
|
+
* @classdesc Represents a RemovePubAddress.
|
59962
|
+
* @implements IRemovePubAddress
|
59963
|
+
* @constructor
|
59964
|
+
* @param {TW.FIO.Proto.Action.IRemovePubAddress=} [properties] Properties to set
|
59965
|
+
*/
|
59966
|
+
function RemovePubAddress(properties) {
|
59967
|
+
this.publicAddresses = [];
|
59968
|
+
if (properties)
|
59969
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
59970
|
+
if (properties[keys[i]] != null)
|
59971
|
+
this[keys[i]] = properties[keys[i]];
|
59972
|
+
}
|
59973
|
+
|
59974
|
+
/**
|
59975
|
+
* RemovePubAddress fioAddress.
|
59976
|
+
* @member {string} fioAddress
|
59977
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
59978
|
+
* @instance
|
59979
|
+
*/
|
59980
|
+
RemovePubAddress.prototype.fioAddress = "";
|
59981
|
+
|
59982
|
+
/**
|
59983
|
+
* RemovePubAddress publicAddresses.
|
59984
|
+
* @member {Array.<TW.FIO.Proto.IPublicAddress>} publicAddresses
|
59985
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
59986
|
+
* @instance
|
59987
|
+
*/
|
59988
|
+
RemovePubAddress.prototype.publicAddresses = $util.emptyArray;
|
59989
|
+
|
59990
|
+
/**
|
59991
|
+
* RemovePubAddress fee.
|
59992
|
+
* @member {Long} fee
|
59993
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
59994
|
+
* @instance
|
59995
|
+
*/
|
59996
|
+
RemovePubAddress.prototype.fee = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
59997
|
+
|
59998
|
+
/**
|
59999
|
+
* Creates a new RemovePubAddress instance using the specified properties.
|
60000
|
+
* @function create
|
60001
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60002
|
+
* @static
|
60003
|
+
* @param {TW.FIO.Proto.Action.IRemovePubAddress=} [properties] Properties to set
|
60004
|
+
* @returns {TW.FIO.Proto.Action.RemovePubAddress} RemovePubAddress instance
|
60005
|
+
*/
|
60006
|
+
RemovePubAddress.create = function create(properties) {
|
60007
|
+
return new RemovePubAddress(properties);
|
60008
|
+
};
|
60009
|
+
|
60010
|
+
/**
|
60011
|
+
* Encodes the specified RemovePubAddress message. Does not implicitly {@link TW.FIO.Proto.Action.RemovePubAddress.verify|verify} messages.
|
60012
|
+
* @function encode
|
60013
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60014
|
+
* @static
|
60015
|
+
* @param {TW.FIO.Proto.Action.IRemovePubAddress} message RemovePubAddress message or plain object to encode
|
60016
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
60017
|
+
* @returns {$protobuf.Writer} Writer
|
60018
|
+
*/
|
60019
|
+
RemovePubAddress.encode = function encode(message, writer) {
|
60020
|
+
if (!writer)
|
60021
|
+
writer = $Writer.create();
|
60022
|
+
if (message.fioAddress != null && Object.hasOwnProperty.call(message, "fioAddress"))
|
60023
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.fioAddress);
|
60024
|
+
if (message.publicAddresses != null && message.publicAddresses.length)
|
60025
|
+
for (var i = 0; i < message.publicAddresses.length; ++i)
|
60026
|
+
$root.TW.FIO.Proto.PublicAddress.encode(message.publicAddresses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
60027
|
+
if (message.fee != null && Object.hasOwnProperty.call(message, "fee"))
|
60028
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.fee);
|
60029
|
+
return writer;
|
60030
|
+
};
|
60031
|
+
|
60032
|
+
/**
|
60033
|
+
* Decodes a RemovePubAddress message from the specified reader or buffer.
|
60034
|
+
* @function decode
|
60035
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60036
|
+
* @static
|
60037
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
60038
|
+
* @param {number} [length] Message length if known beforehand
|
60039
|
+
* @returns {TW.FIO.Proto.Action.RemovePubAddress} RemovePubAddress
|
60040
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
60041
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
60042
|
+
*/
|
60043
|
+
RemovePubAddress.decode = function decode(reader, length) {
|
60044
|
+
if (!(reader instanceof $Reader))
|
60045
|
+
reader = $Reader.create(reader);
|
60046
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.FIO.Proto.Action.RemovePubAddress();
|
60047
|
+
while (reader.pos < end) {
|
60048
|
+
var tag = reader.uint32();
|
60049
|
+
switch (tag >>> 3) {
|
60050
|
+
case 1:
|
60051
|
+
message.fioAddress = reader.string();
|
60052
|
+
break;
|
60053
|
+
case 2:
|
60054
|
+
if (!(message.publicAddresses && message.publicAddresses.length))
|
60055
|
+
message.publicAddresses = [];
|
60056
|
+
message.publicAddresses.push($root.TW.FIO.Proto.PublicAddress.decode(reader, reader.uint32()));
|
60057
|
+
break;
|
60058
|
+
case 3:
|
60059
|
+
message.fee = reader.uint64();
|
60060
|
+
break;
|
60061
|
+
default:
|
60062
|
+
reader.skipType(tag & 7);
|
60063
|
+
break;
|
60064
|
+
}
|
60065
|
+
}
|
60066
|
+
return message;
|
60067
|
+
};
|
60068
|
+
|
60069
|
+
/**
|
60070
|
+
* Verifies a RemovePubAddress message.
|
60071
|
+
* @function verify
|
60072
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60073
|
+
* @static
|
60074
|
+
* @param {Object.<string,*>} message Plain object to verify
|
60075
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
60076
|
+
*/
|
60077
|
+
RemovePubAddress.verify = function verify(message) {
|
60078
|
+
if (typeof message !== "object" || message === null)
|
60079
|
+
return "object expected";
|
60080
|
+
if (message.fioAddress != null && message.hasOwnProperty("fioAddress"))
|
60081
|
+
if (!$util.isString(message.fioAddress))
|
60082
|
+
return "fioAddress: string expected";
|
60083
|
+
if (message.publicAddresses != null && message.hasOwnProperty("publicAddresses")) {
|
60084
|
+
if (!Array.isArray(message.publicAddresses))
|
60085
|
+
return "publicAddresses: array expected";
|
60086
|
+
for (var i = 0; i < message.publicAddresses.length; ++i) {
|
60087
|
+
var error = $root.TW.FIO.Proto.PublicAddress.verify(message.publicAddresses[i]);
|
60088
|
+
if (error)
|
60089
|
+
return "publicAddresses." + error;
|
60090
|
+
}
|
60091
|
+
}
|
60092
|
+
if (message.fee != null && message.hasOwnProperty("fee"))
|
60093
|
+
if (!$util.isInteger(message.fee) && !(message.fee && $util.isInteger(message.fee.low) && $util.isInteger(message.fee.high)))
|
60094
|
+
return "fee: integer|Long expected";
|
60095
|
+
return null;
|
60096
|
+
};
|
60097
|
+
|
60098
|
+
/**
|
60099
|
+
* Creates a RemovePubAddress message from a plain object. Also converts values to their respective internal types.
|
60100
|
+
* @function fromObject
|
60101
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60102
|
+
* @static
|
60103
|
+
* @param {Object.<string,*>} object Plain object
|
60104
|
+
* @returns {TW.FIO.Proto.Action.RemovePubAddress} RemovePubAddress
|
60105
|
+
*/
|
60106
|
+
RemovePubAddress.fromObject = function fromObject(object) {
|
60107
|
+
if (object instanceof $root.TW.FIO.Proto.Action.RemovePubAddress)
|
60108
|
+
return object;
|
60109
|
+
var message = new $root.TW.FIO.Proto.Action.RemovePubAddress();
|
60110
|
+
if (object.fioAddress != null)
|
60111
|
+
message.fioAddress = String(object.fioAddress);
|
60112
|
+
if (object.publicAddresses) {
|
60113
|
+
if (!Array.isArray(object.publicAddresses))
|
60114
|
+
throw TypeError(".TW.FIO.Proto.Action.RemovePubAddress.publicAddresses: array expected");
|
60115
|
+
message.publicAddresses = [];
|
60116
|
+
for (var i = 0; i < object.publicAddresses.length; ++i) {
|
60117
|
+
if (typeof object.publicAddresses[i] !== "object")
|
60118
|
+
throw TypeError(".TW.FIO.Proto.Action.RemovePubAddress.publicAddresses: object expected");
|
60119
|
+
message.publicAddresses[i] = $root.TW.FIO.Proto.PublicAddress.fromObject(object.publicAddresses[i]);
|
60120
|
+
}
|
60121
|
+
}
|
60122
|
+
if (object.fee != null)
|
60123
|
+
if ($util.Long)
|
60124
|
+
(message.fee = $util.Long.fromValue(object.fee)).unsigned = true;
|
60125
|
+
else if (typeof object.fee === "string")
|
60126
|
+
message.fee = parseInt(object.fee, 10);
|
60127
|
+
else if (typeof object.fee === "number")
|
60128
|
+
message.fee = object.fee;
|
60129
|
+
else if (typeof object.fee === "object")
|
60130
|
+
message.fee = new $util.LongBits(object.fee.low >>> 0, object.fee.high >>> 0).toNumber(true);
|
60131
|
+
return message;
|
60132
|
+
};
|
60133
|
+
|
60134
|
+
/**
|
60135
|
+
* Creates a plain object from a RemovePubAddress message. Also converts values to other types if specified.
|
60136
|
+
* @function toObject
|
60137
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60138
|
+
* @static
|
60139
|
+
* @param {TW.FIO.Proto.Action.RemovePubAddress} message RemovePubAddress
|
60140
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
60141
|
+
* @returns {Object.<string,*>} Plain object
|
60142
|
+
*/
|
60143
|
+
RemovePubAddress.toObject = function toObject(message, options) {
|
60144
|
+
if (!options)
|
60145
|
+
options = {};
|
60146
|
+
var object = {};
|
60147
|
+
if (options.arrays || options.defaults)
|
60148
|
+
object.publicAddresses = [];
|
60149
|
+
if (options.defaults) {
|
60150
|
+
object.fioAddress = "";
|
60151
|
+
if ($util.Long) {
|
60152
|
+
var long = new $util.Long(0, 0, true);
|
60153
|
+
object.fee = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
60154
|
+
} else
|
60155
|
+
object.fee = options.longs === String ? "0" : 0;
|
60156
|
+
}
|
60157
|
+
if (message.fioAddress != null && message.hasOwnProperty("fioAddress"))
|
60158
|
+
object.fioAddress = message.fioAddress;
|
60159
|
+
if (message.publicAddresses && message.publicAddresses.length) {
|
60160
|
+
object.publicAddresses = [];
|
60161
|
+
for (var j = 0; j < message.publicAddresses.length; ++j)
|
60162
|
+
object.publicAddresses[j] = $root.TW.FIO.Proto.PublicAddress.toObject(message.publicAddresses[j], options);
|
60163
|
+
}
|
60164
|
+
if (message.fee != null && message.hasOwnProperty("fee"))
|
60165
|
+
if (typeof message.fee === "number")
|
60166
|
+
object.fee = options.longs === String ? String(message.fee) : message.fee;
|
60167
|
+
else
|
60168
|
+
object.fee = options.longs === String ? $util.Long.prototype.toString.call(message.fee) : options.longs === Number ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber(true) : message.fee;
|
60169
|
+
return object;
|
60170
|
+
};
|
60171
|
+
|
60172
|
+
/**
|
60173
|
+
* Converts this RemovePubAddress to JSON.
|
60174
|
+
* @function toJSON
|
60175
|
+
* @memberof TW.FIO.Proto.Action.RemovePubAddress
|
60176
|
+
* @instance
|
60177
|
+
* @returns {Object.<string,*>} JSON object
|
60178
|
+
*/
|
60179
|
+
RemovePubAddress.prototype.toJSON = function toJSON() {
|
60180
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
60181
|
+
};
|
60182
|
+
|
60183
|
+
return RemovePubAddress;
|
60184
|
+
})();
|
60185
|
+
|
59591
60186
|
Action.Transfer = (function() {
|
59592
60187
|
|
59593
60188
|
/**
|
@@ -60842,6 +61437,7 @@
|
|
60842
61437
|
* @property {string|null} [json] SigningOutput json
|
60843
61438
|
* @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
|
60844
61439
|
* @property {string|null} [errorMessage] SigningOutput errorMessage
|
61440
|
+
* @property {string|null} [actionName] SigningOutput actionName
|
60845
61441
|
*/
|
60846
61442
|
|
60847
61443
|
/**
|
@@ -60883,6 +61479,14 @@
|
|
60883
61479
|
*/
|
60884
61480
|
SigningOutput.prototype.errorMessage = "";
|
60885
61481
|
|
61482
|
+
/**
|
61483
|
+
* SigningOutput actionName.
|
61484
|
+
* @member {string} actionName
|
61485
|
+
* @memberof TW.FIO.Proto.SigningOutput
|
61486
|
+
* @instance
|
61487
|
+
*/
|
61488
|
+
SigningOutput.prototype.actionName = "";
|
61489
|
+
|
60886
61490
|
/**
|
60887
61491
|
* Creates a new SigningOutput instance using the specified properties.
|
60888
61492
|
* @function create
|
@@ -60913,6 +61517,8 @@
|
|
60913
61517
|
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
|
60914
61518
|
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
|
60915
61519
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
|
61520
|
+
if (message.actionName != null && Object.hasOwnProperty.call(message, "actionName"))
|
61521
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.actionName);
|
60916
61522
|
return writer;
|
60917
61523
|
};
|
60918
61524
|
|
@@ -60943,6 +61549,9 @@
|
|
60943
61549
|
case 3:
|
60944
61550
|
message.errorMessage = reader.string();
|
60945
61551
|
break;
|
61552
|
+
case 4:
|
61553
|
+
message.actionName = reader.string();
|
61554
|
+
break;
|
60946
61555
|
default:
|
60947
61556
|
reader.skipType(tag & 7);
|
60948
61557
|
break;
|
@@ -61000,6 +61609,9 @@
|
|
61000
61609
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
61001
61610
|
if (!$util.isString(message.errorMessage))
|
61002
61611
|
return "errorMessage: string expected";
|
61612
|
+
if (message.actionName != null && message.hasOwnProperty("actionName"))
|
61613
|
+
if (!$util.isString(message.actionName))
|
61614
|
+
return "actionName: string expected";
|
61003
61615
|
return null;
|
61004
61616
|
};
|
61005
61617
|
|
@@ -61125,6 +61737,8 @@
|
|
61125
61737
|
}
|
61126
61738
|
if (object.errorMessage != null)
|
61127
61739
|
message.errorMessage = String(object.errorMessage);
|
61740
|
+
if (object.actionName != null)
|
61741
|
+
message.actionName = String(object.actionName);
|
61128
61742
|
return message;
|
61129
61743
|
};
|
61130
61744
|
|
@@ -61145,6 +61759,7 @@
|
|
61145
61759
|
object.json = "";
|
61146
61760
|
object.error = options.enums === String ? "OK" : 0;
|
61147
61761
|
object.errorMessage = "";
|
61762
|
+
object.actionName = "";
|
61148
61763
|
}
|
61149
61764
|
if (message.json != null && message.hasOwnProperty("json"))
|
61150
61765
|
object.json = message.json;
|
@@ -61152,6 +61767,8 @@
|
|
61152
61767
|
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
61153
61768
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
61154
61769
|
object.errorMessage = message.errorMessage;
|
61770
|
+
if (message.actionName != null && message.hasOwnProperty("actionName"))
|
61771
|
+
object.actionName = message.actionName;
|
61155
61772
|
return object;
|
61156
61773
|
};
|
61157
61774
|
|
@@ -69110,6 +69727,7 @@
|
|
69110
69727
|
* @property {Long|null} [amount] Transfer amount
|
69111
69728
|
* @property {Long|null} [memo] Transfer memo
|
69112
69729
|
* @property {Long|null} [currentTimestampNanos] Transfer currentTimestampNanos
|
69730
|
+
* @property {Long|null} [permittedDrift] Transfer permittedDrift
|
69113
69731
|
*/
|
69114
69732
|
|
69115
69733
|
/**
|
@@ -69159,6 +69777,14 @@
|
|
69159
69777
|
*/
|
69160
69778
|
Transfer.prototype.currentTimestampNanos = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
69161
69779
|
|
69780
|
+
/**
|
69781
|
+
* Transfer permittedDrift.
|
69782
|
+
* @member {Long} permittedDrift
|
69783
|
+
* @memberof TW.InternetComputer.Proto.Transaction.Transfer
|
69784
|
+
* @instance
|
69785
|
+
*/
|
69786
|
+
Transfer.prototype.permittedDrift = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
69787
|
+
|
69162
69788
|
/**
|
69163
69789
|
* Creates a new Transfer instance using the specified properties.
|
69164
69790
|
* @function create
|
@@ -69191,6 +69817,8 @@
|
|
69191
69817
|
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.memo);
|
69192
69818
|
if (message.currentTimestampNanos != null && Object.hasOwnProperty.call(message, "currentTimestampNanos"))
|
69193
69819
|
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.currentTimestampNanos);
|
69820
|
+
if (message.permittedDrift != null && Object.hasOwnProperty.call(message, "permittedDrift"))
|
69821
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.permittedDrift);
|
69194
69822
|
return writer;
|
69195
69823
|
};
|
69196
69824
|
|
@@ -69224,6 +69852,9 @@
|
|
69224
69852
|
case 4:
|
69225
69853
|
message.currentTimestampNanos = reader.uint64();
|
69226
69854
|
break;
|
69855
|
+
case 5:
|
69856
|
+
message.permittedDrift = reader.uint64();
|
69857
|
+
break;
|
69227
69858
|
default:
|
69228
69859
|
reader.skipType(tag & 7);
|
69229
69860
|
break;
|
@@ -69255,6 +69886,9 @@
|
|
69255
69886
|
if (message.currentTimestampNanos != null && message.hasOwnProperty("currentTimestampNanos"))
|
69256
69887
|
if (!$util.isInteger(message.currentTimestampNanos) && !(message.currentTimestampNanos && $util.isInteger(message.currentTimestampNanos.low) && $util.isInteger(message.currentTimestampNanos.high)))
|
69257
69888
|
return "currentTimestampNanos: integer|Long expected";
|
69889
|
+
if (message.permittedDrift != null && message.hasOwnProperty("permittedDrift"))
|
69890
|
+
if (!$util.isInteger(message.permittedDrift) && !(message.permittedDrift && $util.isInteger(message.permittedDrift.low) && $util.isInteger(message.permittedDrift.high)))
|
69891
|
+
return "permittedDrift: integer|Long expected";
|
69258
69892
|
return null;
|
69259
69893
|
};
|
69260
69894
|
|
@@ -69299,6 +69933,15 @@
|
|
69299
69933
|
message.currentTimestampNanos = object.currentTimestampNanos;
|
69300
69934
|
else if (typeof object.currentTimestampNanos === "object")
|
69301
69935
|
message.currentTimestampNanos = new $util.LongBits(object.currentTimestampNanos.low >>> 0, object.currentTimestampNanos.high >>> 0).toNumber(true);
|
69936
|
+
if (object.permittedDrift != null)
|
69937
|
+
if ($util.Long)
|
69938
|
+
(message.permittedDrift = $util.Long.fromValue(object.permittedDrift)).unsigned = true;
|
69939
|
+
else if (typeof object.permittedDrift === "string")
|
69940
|
+
message.permittedDrift = parseInt(object.permittedDrift, 10);
|
69941
|
+
else if (typeof object.permittedDrift === "number")
|
69942
|
+
message.permittedDrift = object.permittedDrift;
|
69943
|
+
else if (typeof object.permittedDrift === "object")
|
69944
|
+
message.permittedDrift = new $util.LongBits(object.permittedDrift.low >>> 0, object.permittedDrift.high >>> 0).toNumber(true);
|
69302
69945
|
return message;
|
69303
69946
|
};
|
69304
69947
|
|
@@ -69332,6 +69975,11 @@
|
|
69332
69975
|
object.currentTimestampNanos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
69333
69976
|
} else
|
69334
69977
|
object.currentTimestampNanos = options.longs === String ? "0" : 0;
|
69978
|
+
if ($util.Long) {
|
69979
|
+
var long = new $util.Long(0, 0, true);
|
69980
|
+
object.permittedDrift = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
69981
|
+
} else
|
69982
|
+
object.permittedDrift = options.longs === String ? "0" : 0;
|
69335
69983
|
}
|
69336
69984
|
if (message.toAccountIdentifier != null && message.hasOwnProperty("toAccountIdentifier"))
|
69337
69985
|
object.toAccountIdentifier = message.toAccountIdentifier;
|
@@ -69350,6 +69998,11 @@
|
|
69350
69998
|
object.currentTimestampNanos = options.longs === String ? String(message.currentTimestampNanos) : message.currentTimestampNanos;
|
69351
69999
|
else
|
69352
70000
|
object.currentTimestampNanos = options.longs === String ? $util.Long.prototype.toString.call(message.currentTimestampNanos) : options.longs === Number ? new $util.LongBits(message.currentTimestampNanos.low >>> 0, message.currentTimestampNanos.high >>> 0).toNumber(true) : message.currentTimestampNanos;
|
70001
|
+
if (message.permittedDrift != null && message.hasOwnProperty("permittedDrift"))
|
70002
|
+
if (typeof message.permittedDrift === "number")
|
70003
|
+
object.permittedDrift = options.longs === String ? String(message.permittedDrift) : message.permittedDrift;
|
70004
|
+
else
|
70005
|
+
object.permittedDrift = options.longs === String ? $util.Long.prototype.toString.call(message.permittedDrift) : options.longs === Number ? new $util.LongBits(message.permittedDrift.low >>> 0, message.permittedDrift.high >>> 0).toNumber(true) : message.permittedDrift;
|
69353
70006
|
return object;
|
69354
70007
|
};
|
69355
70008
|
|
@@ -117564,6 +118217,395 @@
|
|
117564
118217
|
*/
|
117565
118218
|
var Proto = {};
|
117566
118219
|
|
118220
|
+
Proto.ObjectRef = (function() {
|
118221
|
+
|
118222
|
+
/**
|
118223
|
+
* Properties of an ObjectRef.
|
118224
|
+
* @memberof TW.Sui.Proto
|
118225
|
+
* @interface IObjectRef
|
118226
|
+
* @property {string|null} [objectId] ObjectRef objectId
|
118227
|
+
* @property {Long|null} [version] ObjectRef version
|
118228
|
+
* @property {string|null} [objectDigest] ObjectRef objectDigest
|
118229
|
+
*/
|
118230
|
+
|
118231
|
+
/**
|
118232
|
+
* Constructs a new ObjectRef.
|
118233
|
+
* @memberof TW.Sui.Proto
|
118234
|
+
* @classdesc Represents an ObjectRef.
|
118235
|
+
* @implements IObjectRef
|
118236
|
+
* @constructor
|
118237
|
+
* @param {TW.Sui.Proto.IObjectRef=} [properties] Properties to set
|
118238
|
+
*/
|
118239
|
+
function ObjectRef(properties) {
|
118240
|
+
if (properties)
|
118241
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
118242
|
+
if (properties[keys[i]] != null)
|
118243
|
+
this[keys[i]] = properties[keys[i]];
|
118244
|
+
}
|
118245
|
+
|
118246
|
+
/**
|
118247
|
+
* ObjectRef objectId.
|
118248
|
+
* @member {string} objectId
|
118249
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118250
|
+
* @instance
|
118251
|
+
*/
|
118252
|
+
ObjectRef.prototype.objectId = "";
|
118253
|
+
|
118254
|
+
/**
|
118255
|
+
* ObjectRef version.
|
118256
|
+
* @member {Long} version
|
118257
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118258
|
+
* @instance
|
118259
|
+
*/
|
118260
|
+
ObjectRef.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
118261
|
+
|
118262
|
+
/**
|
118263
|
+
* ObjectRef objectDigest.
|
118264
|
+
* @member {string} objectDigest
|
118265
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118266
|
+
* @instance
|
118267
|
+
*/
|
118268
|
+
ObjectRef.prototype.objectDigest = "";
|
118269
|
+
|
118270
|
+
/**
|
118271
|
+
* Creates a new ObjectRef instance using the specified properties.
|
118272
|
+
* @function create
|
118273
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118274
|
+
* @static
|
118275
|
+
* @param {TW.Sui.Proto.IObjectRef=} [properties] Properties to set
|
118276
|
+
* @returns {TW.Sui.Proto.ObjectRef} ObjectRef instance
|
118277
|
+
*/
|
118278
|
+
ObjectRef.create = function create(properties) {
|
118279
|
+
return new ObjectRef(properties);
|
118280
|
+
};
|
118281
|
+
|
118282
|
+
/**
|
118283
|
+
* Encodes the specified ObjectRef message. Does not implicitly {@link TW.Sui.Proto.ObjectRef.verify|verify} messages.
|
118284
|
+
* @function encode
|
118285
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118286
|
+
* @static
|
118287
|
+
* @param {TW.Sui.Proto.IObjectRef} message ObjectRef message or plain object to encode
|
118288
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
118289
|
+
* @returns {$protobuf.Writer} Writer
|
118290
|
+
*/
|
118291
|
+
ObjectRef.encode = function encode(message, writer) {
|
118292
|
+
if (!writer)
|
118293
|
+
writer = $Writer.create();
|
118294
|
+
if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId"))
|
118295
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.objectId);
|
118296
|
+
if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
118297
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version);
|
118298
|
+
if (message.objectDigest != null && Object.hasOwnProperty.call(message, "objectDigest"))
|
118299
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.objectDigest);
|
118300
|
+
return writer;
|
118301
|
+
};
|
118302
|
+
|
118303
|
+
/**
|
118304
|
+
* Decodes an ObjectRef message from the specified reader or buffer.
|
118305
|
+
* @function decode
|
118306
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118307
|
+
* @static
|
118308
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118309
|
+
* @param {number} [length] Message length if known beforehand
|
118310
|
+
* @returns {TW.Sui.Proto.ObjectRef} ObjectRef
|
118311
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118312
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118313
|
+
*/
|
118314
|
+
ObjectRef.decode = function decode(reader, length) {
|
118315
|
+
if (!(reader instanceof $Reader))
|
118316
|
+
reader = $Reader.create(reader);
|
118317
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.ObjectRef();
|
118318
|
+
while (reader.pos < end) {
|
118319
|
+
var tag = reader.uint32();
|
118320
|
+
switch (tag >>> 3) {
|
118321
|
+
case 1:
|
118322
|
+
message.objectId = reader.string();
|
118323
|
+
break;
|
118324
|
+
case 2:
|
118325
|
+
message.version = reader.uint64();
|
118326
|
+
break;
|
118327
|
+
case 3:
|
118328
|
+
message.objectDigest = reader.string();
|
118329
|
+
break;
|
118330
|
+
default:
|
118331
|
+
reader.skipType(tag & 7);
|
118332
|
+
break;
|
118333
|
+
}
|
118334
|
+
}
|
118335
|
+
return message;
|
118336
|
+
};
|
118337
|
+
|
118338
|
+
/**
|
118339
|
+
* Verifies an ObjectRef message.
|
118340
|
+
* @function verify
|
118341
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118342
|
+
* @static
|
118343
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118344
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118345
|
+
*/
|
118346
|
+
ObjectRef.verify = function verify(message) {
|
118347
|
+
if (typeof message !== "object" || message === null)
|
118348
|
+
return "object expected";
|
118349
|
+
if (message.objectId != null && message.hasOwnProperty("objectId"))
|
118350
|
+
if (!$util.isString(message.objectId))
|
118351
|
+
return "objectId: string expected";
|
118352
|
+
if (message.version != null && message.hasOwnProperty("version"))
|
118353
|
+
if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
|
118354
|
+
return "version: integer|Long expected";
|
118355
|
+
if (message.objectDigest != null && message.hasOwnProperty("objectDigest"))
|
118356
|
+
if (!$util.isString(message.objectDigest))
|
118357
|
+
return "objectDigest: string expected";
|
118358
|
+
return null;
|
118359
|
+
};
|
118360
|
+
|
118361
|
+
/**
|
118362
|
+
* Creates an ObjectRef message from a plain object. Also converts values to their respective internal types.
|
118363
|
+
* @function fromObject
|
118364
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118365
|
+
* @static
|
118366
|
+
* @param {Object.<string,*>} object Plain object
|
118367
|
+
* @returns {TW.Sui.Proto.ObjectRef} ObjectRef
|
118368
|
+
*/
|
118369
|
+
ObjectRef.fromObject = function fromObject(object) {
|
118370
|
+
if (object instanceof $root.TW.Sui.Proto.ObjectRef)
|
118371
|
+
return object;
|
118372
|
+
var message = new $root.TW.Sui.Proto.ObjectRef();
|
118373
|
+
if (object.objectId != null)
|
118374
|
+
message.objectId = String(object.objectId);
|
118375
|
+
if (object.version != null)
|
118376
|
+
if ($util.Long)
|
118377
|
+
(message.version = $util.Long.fromValue(object.version)).unsigned = true;
|
118378
|
+
else if (typeof object.version === "string")
|
118379
|
+
message.version = parseInt(object.version, 10);
|
118380
|
+
else if (typeof object.version === "number")
|
118381
|
+
message.version = object.version;
|
118382
|
+
else if (typeof object.version === "object")
|
118383
|
+
message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true);
|
118384
|
+
if (object.objectDigest != null)
|
118385
|
+
message.objectDigest = String(object.objectDigest);
|
118386
|
+
return message;
|
118387
|
+
};
|
118388
|
+
|
118389
|
+
/**
|
118390
|
+
* Creates a plain object from an ObjectRef message. Also converts values to other types if specified.
|
118391
|
+
* @function toObject
|
118392
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118393
|
+
* @static
|
118394
|
+
* @param {TW.Sui.Proto.ObjectRef} message ObjectRef
|
118395
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
118396
|
+
* @returns {Object.<string,*>} Plain object
|
118397
|
+
*/
|
118398
|
+
ObjectRef.toObject = function toObject(message, options) {
|
118399
|
+
if (!options)
|
118400
|
+
options = {};
|
118401
|
+
var object = {};
|
118402
|
+
if (options.defaults) {
|
118403
|
+
object.objectId = "";
|
118404
|
+
if ($util.Long) {
|
118405
|
+
var long = new $util.Long(0, 0, true);
|
118406
|
+
object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
118407
|
+
} else
|
118408
|
+
object.version = options.longs === String ? "0" : 0;
|
118409
|
+
object.objectDigest = "";
|
118410
|
+
}
|
118411
|
+
if (message.objectId != null && message.hasOwnProperty("objectId"))
|
118412
|
+
object.objectId = message.objectId;
|
118413
|
+
if (message.version != null && message.hasOwnProperty("version"))
|
118414
|
+
if (typeof message.version === "number")
|
118415
|
+
object.version = options.longs === String ? String(message.version) : message.version;
|
118416
|
+
else
|
118417
|
+
object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version;
|
118418
|
+
if (message.objectDigest != null && message.hasOwnProperty("objectDigest"))
|
118419
|
+
object.objectDigest = message.objectDigest;
|
118420
|
+
return object;
|
118421
|
+
};
|
118422
|
+
|
118423
|
+
/**
|
118424
|
+
* Converts this ObjectRef to JSON.
|
118425
|
+
* @function toJSON
|
118426
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118427
|
+
* @instance
|
118428
|
+
* @returns {Object.<string,*>} JSON object
|
118429
|
+
*/
|
118430
|
+
ObjectRef.prototype.toJSON = function toJSON() {
|
118431
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
118432
|
+
};
|
118433
|
+
|
118434
|
+
return ObjectRef;
|
118435
|
+
})();
|
118436
|
+
|
118437
|
+
Proto.Amount = (function() {
|
118438
|
+
|
118439
|
+
/**
|
118440
|
+
* Properties of an Amount.
|
118441
|
+
* @memberof TW.Sui.Proto
|
118442
|
+
* @interface IAmount
|
118443
|
+
* @property {Long|null} [amount] Amount amount
|
118444
|
+
*/
|
118445
|
+
|
118446
|
+
/**
|
118447
|
+
* Constructs a new Amount.
|
118448
|
+
* @memberof TW.Sui.Proto
|
118449
|
+
* @classdesc Represents an Amount.
|
118450
|
+
* @implements IAmount
|
118451
|
+
* @constructor
|
118452
|
+
* @param {TW.Sui.Proto.IAmount=} [properties] Properties to set
|
118453
|
+
*/
|
118454
|
+
function Amount(properties) {
|
118455
|
+
if (properties)
|
118456
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
118457
|
+
if (properties[keys[i]] != null)
|
118458
|
+
this[keys[i]] = properties[keys[i]];
|
118459
|
+
}
|
118460
|
+
|
118461
|
+
/**
|
118462
|
+
* Amount amount.
|
118463
|
+
* @member {Long} amount
|
118464
|
+
* @memberof TW.Sui.Proto.Amount
|
118465
|
+
* @instance
|
118466
|
+
*/
|
118467
|
+
Amount.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
118468
|
+
|
118469
|
+
/**
|
118470
|
+
* Creates a new Amount instance using the specified properties.
|
118471
|
+
* @function create
|
118472
|
+
* @memberof TW.Sui.Proto.Amount
|
118473
|
+
* @static
|
118474
|
+
* @param {TW.Sui.Proto.IAmount=} [properties] Properties to set
|
118475
|
+
* @returns {TW.Sui.Proto.Amount} Amount instance
|
118476
|
+
*/
|
118477
|
+
Amount.create = function create(properties) {
|
118478
|
+
return new Amount(properties);
|
118479
|
+
};
|
118480
|
+
|
118481
|
+
/**
|
118482
|
+
* Encodes the specified Amount message. Does not implicitly {@link TW.Sui.Proto.Amount.verify|verify} messages.
|
118483
|
+
* @function encode
|
118484
|
+
* @memberof TW.Sui.Proto.Amount
|
118485
|
+
* @static
|
118486
|
+
* @param {TW.Sui.Proto.IAmount} message Amount message or plain object to encode
|
118487
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
118488
|
+
* @returns {$protobuf.Writer} Writer
|
118489
|
+
*/
|
118490
|
+
Amount.encode = function encode(message, writer) {
|
118491
|
+
if (!writer)
|
118492
|
+
writer = $Writer.create();
|
118493
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
118494
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.amount);
|
118495
|
+
return writer;
|
118496
|
+
};
|
118497
|
+
|
118498
|
+
/**
|
118499
|
+
* Decodes an Amount message from the specified reader or buffer.
|
118500
|
+
* @function decode
|
118501
|
+
* @memberof TW.Sui.Proto.Amount
|
118502
|
+
* @static
|
118503
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118504
|
+
* @param {number} [length] Message length if known beforehand
|
118505
|
+
* @returns {TW.Sui.Proto.Amount} Amount
|
118506
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118507
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118508
|
+
*/
|
118509
|
+
Amount.decode = function decode(reader, length) {
|
118510
|
+
if (!(reader instanceof $Reader))
|
118511
|
+
reader = $Reader.create(reader);
|
118512
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.Amount();
|
118513
|
+
while (reader.pos < end) {
|
118514
|
+
var tag = reader.uint32();
|
118515
|
+
switch (tag >>> 3) {
|
118516
|
+
case 1:
|
118517
|
+
message.amount = reader.uint64();
|
118518
|
+
break;
|
118519
|
+
default:
|
118520
|
+
reader.skipType(tag & 7);
|
118521
|
+
break;
|
118522
|
+
}
|
118523
|
+
}
|
118524
|
+
return message;
|
118525
|
+
};
|
118526
|
+
|
118527
|
+
/**
|
118528
|
+
* Verifies an Amount message.
|
118529
|
+
* @function verify
|
118530
|
+
* @memberof TW.Sui.Proto.Amount
|
118531
|
+
* @static
|
118532
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118533
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118534
|
+
*/
|
118535
|
+
Amount.verify = function verify(message) {
|
118536
|
+
if (typeof message !== "object" || message === null)
|
118537
|
+
return "object expected";
|
118538
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
118539
|
+
if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
|
118540
|
+
return "amount: integer|Long expected";
|
118541
|
+
return null;
|
118542
|
+
};
|
118543
|
+
|
118544
|
+
/**
|
118545
|
+
* Creates an Amount message from a plain object. Also converts values to their respective internal types.
|
118546
|
+
* @function fromObject
|
118547
|
+
* @memberof TW.Sui.Proto.Amount
|
118548
|
+
* @static
|
118549
|
+
* @param {Object.<string,*>} object Plain object
|
118550
|
+
* @returns {TW.Sui.Proto.Amount} Amount
|
118551
|
+
*/
|
118552
|
+
Amount.fromObject = function fromObject(object) {
|
118553
|
+
if (object instanceof $root.TW.Sui.Proto.Amount)
|
118554
|
+
return object;
|
118555
|
+
var message = new $root.TW.Sui.Proto.Amount();
|
118556
|
+
if (object.amount != null)
|
118557
|
+
if ($util.Long)
|
118558
|
+
(message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
|
118559
|
+
else if (typeof object.amount === "string")
|
118560
|
+
message.amount = parseInt(object.amount, 10);
|
118561
|
+
else if (typeof object.amount === "number")
|
118562
|
+
message.amount = object.amount;
|
118563
|
+
else if (typeof object.amount === "object")
|
118564
|
+
message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
|
118565
|
+
return message;
|
118566
|
+
};
|
118567
|
+
|
118568
|
+
/**
|
118569
|
+
* Creates a plain object from an Amount message. Also converts values to other types if specified.
|
118570
|
+
* @function toObject
|
118571
|
+
* @memberof TW.Sui.Proto.Amount
|
118572
|
+
* @static
|
118573
|
+
* @param {TW.Sui.Proto.Amount} message Amount
|
118574
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
118575
|
+
* @returns {Object.<string,*>} Plain object
|
118576
|
+
*/
|
118577
|
+
Amount.toObject = function toObject(message, options) {
|
118578
|
+
if (!options)
|
118579
|
+
options = {};
|
118580
|
+
var object = {};
|
118581
|
+
if (options.defaults)
|
118582
|
+
if ($util.Long) {
|
118583
|
+
var long = new $util.Long(0, 0, true);
|
118584
|
+
object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
118585
|
+
} else
|
118586
|
+
object.amount = options.longs === String ? "0" : 0;
|
118587
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
118588
|
+
if (typeof message.amount === "number")
|
118589
|
+
object.amount = options.longs === String ? String(message.amount) : message.amount;
|
118590
|
+
else
|
118591
|
+
object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
|
118592
|
+
return object;
|
118593
|
+
};
|
118594
|
+
|
118595
|
+
/**
|
118596
|
+
* Converts this Amount to JSON.
|
118597
|
+
* @function toJSON
|
118598
|
+
* @memberof TW.Sui.Proto.Amount
|
118599
|
+
* @instance
|
118600
|
+
* @returns {Object.<string,*>} JSON object
|
118601
|
+
*/
|
118602
|
+
Amount.prototype.toJSON = function toJSON() {
|
118603
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
118604
|
+
};
|
118605
|
+
|
118606
|
+
return Amount;
|
118607
|
+
})();
|
118608
|
+
|
117567
118609
|
Proto.SignDirect = (function() {
|
117568
118610
|
|
117569
118611
|
/**
|
@@ -117722,6 +118764,1445 @@
|
|
117722
118764
|
return SignDirect;
|
117723
118765
|
})();
|
117724
118766
|
|
118767
|
+
Proto.Pay = (function() {
|
118768
|
+
|
118769
|
+
/**
|
118770
|
+
* Properties of a Pay.
|
118771
|
+
* @memberof TW.Sui.Proto
|
118772
|
+
* @interface IPay
|
118773
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [inputCoins] Pay inputCoins
|
118774
|
+
* @property {Array.<string>|null} [recipients] Pay recipients
|
118775
|
+
* @property {Array.<Long>|null} [amounts] Pay amounts
|
118776
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] Pay gas
|
118777
|
+
*/
|
118778
|
+
|
118779
|
+
/**
|
118780
|
+
* Constructs a new Pay.
|
118781
|
+
* @memberof TW.Sui.Proto
|
118782
|
+
* @classdesc Represents a Pay.
|
118783
|
+
* @implements IPay
|
118784
|
+
* @constructor
|
118785
|
+
* @param {TW.Sui.Proto.IPay=} [properties] Properties to set
|
118786
|
+
*/
|
118787
|
+
function Pay(properties) {
|
118788
|
+
this.inputCoins = [];
|
118789
|
+
this.recipients = [];
|
118790
|
+
this.amounts = [];
|
118791
|
+
if (properties)
|
118792
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
118793
|
+
if (properties[keys[i]] != null)
|
118794
|
+
this[keys[i]] = properties[keys[i]];
|
118795
|
+
}
|
118796
|
+
|
118797
|
+
/**
|
118798
|
+
* Pay inputCoins.
|
118799
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} inputCoins
|
118800
|
+
* @memberof TW.Sui.Proto.Pay
|
118801
|
+
* @instance
|
118802
|
+
*/
|
118803
|
+
Pay.prototype.inputCoins = $util.emptyArray;
|
118804
|
+
|
118805
|
+
/**
|
118806
|
+
* Pay recipients.
|
118807
|
+
* @member {Array.<string>} recipients
|
118808
|
+
* @memberof TW.Sui.Proto.Pay
|
118809
|
+
* @instance
|
118810
|
+
*/
|
118811
|
+
Pay.prototype.recipients = $util.emptyArray;
|
118812
|
+
|
118813
|
+
/**
|
118814
|
+
* Pay amounts.
|
118815
|
+
* @member {Array.<Long>} amounts
|
118816
|
+
* @memberof TW.Sui.Proto.Pay
|
118817
|
+
* @instance
|
118818
|
+
*/
|
118819
|
+
Pay.prototype.amounts = $util.emptyArray;
|
118820
|
+
|
118821
|
+
/**
|
118822
|
+
* Pay gas.
|
118823
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
118824
|
+
* @memberof TW.Sui.Proto.Pay
|
118825
|
+
* @instance
|
118826
|
+
*/
|
118827
|
+
Pay.prototype.gas = null;
|
118828
|
+
|
118829
|
+
/**
|
118830
|
+
* Creates a new Pay instance using the specified properties.
|
118831
|
+
* @function create
|
118832
|
+
* @memberof TW.Sui.Proto.Pay
|
118833
|
+
* @static
|
118834
|
+
* @param {TW.Sui.Proto.IPay=} [properties] Properties to set
|
118835
|
+
* @returns {TW.Sui.Proto.Pay} Pay instance
|
118836
|
+
*/
|
118837
|
+
Pay.create = function create(properties) {
|
118838
|
+
return new Pay(properties);
|
118839
|
+
};
|
118840
|
+
|
118841
|
+
/**
|
118842
|
+
* Encodes the specified Pay message. Does not implicitly {@link TW.Sui.Proto.Pay.verify|verify} messages.
|
118843
|
+
* @function encode
|
118844
|
+
* @memberof TW.Sui.Proto.Pay
|
118845
|
+
* @static
|
118846
|
+
* @param {TW.Sui.Proto.IPay} message Pay message or plain object to encode
|
118847
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
118848
|
+
* @returns {$protobuf.Writer} Writer
|
118849
|
+
*/
|
118850
|
+
Pay.encode = function encode(message, writer) {
|
118851
|
+
if (!writer)
|
118852
|
+
writer = $Writer.create();
|
118853
|
+
if (message.inputCoins != null && message.inputCoins.length)
|
118854
|
+
for (var i = 0; i < message.inputCoins.length; ++i)
|
118855
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.inputCoins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
118856
|
+
if (message.recipients != null && message.recipients.length)
|
118857
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
118858
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipients[i]);
|
118859
|
+
if (message.amounts != null && message.amounts.length) {
|
118860
|
+
writer.uint32(/* id 3, wireType 2 =*/26).fork();
|
118861
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
118862
|
+
writer.uint64(message.amounts[i]);
|
118863
|
+
writer.ldelim();
|
118864
|
+
}
|
118865
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
118866
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
118867
|
+
return writer;
|
118868
|
+
};
|
118869
|
+
|
118870
|
+
/**
|
118871
|
+
* Decodes a Pay message from the specified reader or buffer.
|
118872
|
+
* @function decode
|
118873
|
+
* @memberof TW.Sui.Proto.Pay
|
118874
|
+
* @static
|
118875
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118876
|
+
* @param {number} [length] Message length if known beforehand
|
118877
|
+
* @returns {TW.Sui.Proto.Pay} Pay
|
118878
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118879
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118880
|
+
*/
|
118881
|
+
Pay.decode = function decode(reader, length) {
|
118882
|
+
if (!(reader instanceof $Reader))
|
118883
|
+
reader = $Reader.create(reader);
|
118884
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.Pay();
|
118885
|
+
while (reader.pos < end) {
|
118886
|
+
var tag = reader.uint32();
|
118887
|
+
switch (tag >>> 3) {
|
118888
|
+
case 1:
|
118889
|
+
if (!(message.inputCoins && message.inputCoins.length))
|
118890
|
+
message.inputCoins = [];
|
118891
|
+
message.inputCoins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
118892
|
+
break;
|
118893
|
+
case 2:
|
118894
|
+
if (!(message.recipients && message.recipients.length))
|
118895
|
+
message.recipients = [];
|
118896
|
+
message.recipients.push(reader.string());
|
118897
|
+
break;
|
118898
|
+
case 3:
|
118899
|
+
if (!(message.amounts && message.amounts.length))
|
118900
|
+
message.amounts = [];
|
118901
|
+
if ((tag & 7) === 2) {
|
118902
|
+
var end2 = reader.uint32() + reader.pos;
|
118903
|
+
while (reader.pos < end2)
|
118904
|
+
message.amounts.push(reader.uint64());
|
118905
|
+
} else
|
118906
|
+
message.amounts.push(reader.uint64());
|
118907
|
+
break;
|
118908
|
+
case 4:
|
118909
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
118910
|
+
break;
|
118911
|
+
default:
|
118912
|
+
reader.skipType(tag & 7);
|
118913
|
+
break;
|
118914
|
+
}
|
118915
|
+
}
|
118916
|
+
return message;
|
118917
|
+
};
|
118918
|
+
|
118919
|
+
/**
|
118920
|
+
* Verifies a Pay message.
|
118921
|
+
* @function verify
|
118922
|
+
* @memberof TW.Sui.Proto.Pay
|
118923
|
+
* @static
|
118924
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118925
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118926
|
+
*/
|
118927
|
+
Pay.verify = function verify(message) {
|
118928
|
+
if (typeof message !== "object" || message === null)
|
118929
|
+
return "object expected";
|
118930
|
+
if (message.inputCoins != null && message.hasOwnProperty("inputCoins")) {
|
118931
|
+
if (!Array.isArray(message.inputCoins))
|
118932
|
+
return "inputCoins: array expected";
|
118933
|
+
for (var i = 0; i < message.inputCoins.length; ++i) {
|
118934
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.inputCoins[i]);
|
118935
|
+
if (error)
|
118936
|
+
return "inputCoins." + error;
|
118937
|
+
}
|
118938
|
+
}
|
118939
|
+
if (message.recipients != null && message.hasOwnProperty("recipients")) {
|
118940
|
+
if (!Array.isArray(message.recipients))
|
118941
|
+
return "recipients: array expected";
|
118942
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
118943
|
+
if (!$util.isString(message.recipients[i]))
|
118944
|
+
return "recipients: string[] expected";
|
118945
|
+
}
|
118946
|
+
if (message.amounts != null && message.hasOwnProperty("amounts")) {
|
118947
|
+
if (!Array.isArray(message.amounts))
|
118948
|
+
return "amounts: array expected";
|
118949
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
118950
|
+
if (!$util.isInteger(message.amounts[i]) && !(message.amounts[i] && $util.isInteger(message.amounts[i].low) && $util.isInteger(message.amounts[i].high)))
|
118951
|
+
return "amounts: integer|Long[] expected";
|
118952
|
+
}
|
118953
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
118954
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
118955
|
+
if (error)
|
118956
|
+
return "gas." + error;
|
118957
|
+
}
|
118958
|
+
return null;
|
118959
|
+
};
|
118960
|
+
|
118961
|
+
/**
|
118962
|
+
* Creates a Pay message from a plain object. Also converts values to their respective internal types.
|
118963
|
+
* @function fromObject
|
118964
|
+
* @memberof TW.Sui.Proto.Pay
|
118965
|
+
* @static
|
118966
|
+
* @param {Object.<string,*>} object Plain object
|
118967
|
+
* @returns {TW.Sui.Proto.Pay} Pay
|
118968
|
+
*/
|
118969
|
+
Pay.fromObject = function fromObject(object) {
|
118970
|
+
if (object instanceof $root.TW.Sui.Proto.Pay)
|
118971
|
+
return object;
|
118972
|
+
var message = new $root.TW.Sui.Proto.Pay();
|
118973
|
+
if (object.inputCoins) {
|
118974
|
+
if (!Array.isArray(object.inputCoins))
|
118975
|
+
throw TypeError(".TW.Sui.Proto.Pay.inputCoins: array expected");
|
118976
|
+
message.inputCoins = [];
|
118977
|
+
for (var i = 0; i < object.inputCoins.length; ++i) {
|
118978
|
+
if (typeof object.inputCoins[i] !== "object")
|
118979
|
+
throw TypeError(".TW.Sui.Proto.Pay.inputCoins: object expected");
|
118980
|
+
message.inputCoins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.inputCoins[i]);
|
118981
|
+
}
|
118982
|
+
}
|
118983
|
+
if (object.recipients) {
|
118984
|
+
if (!Array.isArray(object.recipients))
|
118985
|
+
throw TypeError(".TW.Sui.Proto.Pay.recipients: array expected");
|
118986
|
+
message.recipients = [];
|
118987
|
+
for (var i = 0; i < object.recipients.length; ++i)
|
118988
|
+
message.recipients[i] = String(object.recipients[i]);
|
118989
|
+
}
|
118990
|
+
if (object.amounts) {
|
118991
|
+
if (!Array.isArray(object.amounts))
|
118992
|
+
throw TypeError(".TW.Sui.Proto.Pay.amounts: array expected");
|
118993
|
+
message.amounts = [];
|
118994
|
+
for (var i = 0; i < object.amounts.length; ++i)
|
118995
|
+
if ($util.Long)
|
118996
|
+
(message.amounts[i] = $util.Long.fromValue(object.amounts[i])).unsigned = true;
|
118997
|
+
else if (typeof object.amounts[i] === "string")
|
118998
|
+
message.amounts[i] = parseInt(object.amounts[i], 10);
|
118999
|
+
else if (typeof object.amounts[i] === "number")
|
119000
|
+
message.amounts[i] = object.amounts[i];
|
119001
|
+
else if (typeof object.amounts[i] === "object")
|
119002
|
+
message.amounts[i] = new $util.LongBits(object.amounts[i].low >>> 0, object.amounts[i].high >>> 0).toNumber(true);
|
119003
|
+
}
|
119004
|
+
if (object.gas != null) {
|
119005
|
+
if (typeof object.gas !== "object")
|
119006
|
+
throw TypeError(".TW.Sui.Proto.Pay.gas: object expected");
|
119007
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
119008
|
+
}
|
119009
|
+
return message;
|
119010
|
+
};
|
119011
|
+
|
119012
|
+
/**
|
119013
|
+
* Creates a plain object from a Pay message. Also converts values to other types if specified.
|
119014
|
+
* @function toObject
|
119015
|
+
* @memberof TW.Sui.Proto.Pay
|
119016
|
+
* @static
|
119017
|
+
* @param {TW.Sui.Proto.Pay} message Pay
|
119018
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119019
|
+
* @returns {Object.<string,*>} Plain object
|
119020
|
+
*/
|
119021
|
+
Pay.toObject = function toObject(message, options) {
|
119022
|
+
if (!options)
|
119023
|
+
options = {};
|
119024
|
+
var object = {};
|
119025
|
+
if (options.arrays || options.defaults) {
|
119026
|
+
object.inputCoins = [];
|
119027
|
+
object.recipients = [];
|
119028
|
+
object.amounts = [];
|
119029
|
+
}
|
119030
|
+
if (options.defaults)
|
119031
|
+
object.gas = null;
|
119032
|
+
if (message.inputCoins && message.inputCoins.length) {
|
119033
|
+
object.inputCoins = [];
|
119034
|
+
for (var j = 0; j < message.inputCoins.length; ++j)
|
119035
|
+
object.inputCoins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.inputCoins[j], options);
|
119036
|
+
}
|
119037
|
+
if (message.recipients && message.recipients.length) {
|
119038
|
+
object.recipients = [];
|
119039
|
+
for (var j = 0; j < message.recipients.length; ++j)
|
119040
|
+
object.recipients[j] = message.recipients[j];
|
119041
|
+
}
|
119042
|
+
if (message.amounts && message.amounts.length) {
|
119043
|
+
object.amounts = [];
|
119044
|
+
for (var j = 0; j < message.amounts.length; ++j)
|
119045
|
+
if (typeof message.amounts[j] === "number")
|
119046
|
+
object.amounts[j] = options.longs === String ? String(message.amounts[j]) : message.amounts[j];
|
119047
|
+
else
|
119048
|
+
object.amounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.amounts[j]) : options.longs === Number ? new $util.LongBits(message.amounts[j].low >>> 0, message.amounts[j].high >>> 0).toNumber(true) : message.amounts[j];
|
119049
|
+
}
|
119050
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
119051
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
119052
|
+
return object;
|
119053
|
+
};
|
119054
|
+
|
119055
|
+
/**
|
119056
|
+
* Converts this Pay to JSON.
|
119057
|
+
* @function toJSON
|
119058
|
+
* @memberof TW.Sui.Proto.Pay
|
119059
|
+
* @instance
|
119060
|
+
* @returns {Object.<string,*>} JSON object
|
119061
|
+
*/
|
119062
|
+
Pay.prototype.toJSON = function toJSON() {
|
119063
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119064
|
+
};
|
119065
|
+
|
119066
|
+
return Pay;
|
119067
|
+
})();
|
119068
|
+
|
119069
|
+
Proto.PaySui = (function() {
|
119070
|
+
|
119071
|
+
/**
|
119072
|
+
* Properties of a PaySui.
|
119073
|
+
* @memberof TW.Sui.Proto
|
119074
|
+
* @interface IPaySui
|
119075
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [inputCoins] PaySui inputCoins
|
119076
|
+
* @property {Array.<string>|null} [recipients] PaySui recipients
|
119077
|
+
* @property {Array.<Long>|null} [amounts] PaySui amounts
|
119078
|
+
*/
|
119079
|
+
|
119080
|
+
/**
|
119081
|
+
* Constructs a new PaySui.
|
119082
|
+
* @memberof TW.Sui.Proto
|
119083
|
+
* @classdesc Represents a PaySui.
|
119084
|
+
* @implements IPaySui
|
119085
|
+
* @constructor
|
119086
|
+
* @param {TW.Sui.Proto.IPaySui=} [properties] Properties to set
|
119087
|
+
*/
|
119088
|
+
function PaySui(properties) {
|
119089
|
+
this.inputCoins = [];
|
119090
|
+
this.recipients = [];
|
119091
|
+
this.amounts = [];
|
119092
|
+
if (properties)
|
119093
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119094
|
+
if (properties[keys[i]] != null)
|
119095
|
+
this[keys[i]] = properties[keys[i]];
|
119096
|
+
}
|
119097
|
+
|
119098
|
+
/**
|
119099
|
+
* PaySui inputCoins.
|
119100
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} inputCoins
|
119101
|
+
* @memberof TW.Sui.Proto.PaySui
|
119102
|
+
* @instance
|
119103
|
+
*/
|
119104
|
+
PaySui.prototype.inputCoins = $util.emptyArray;
|
119105
|
+
|
119106
|
+
/**
|
119107
|
+
* PaySui recipients.
|
119108
|
+
* @member {Array.<string>} recipients
|
119109
|
+
* @memberof TW.Sui.Proto.PaySui
|
119110
|
+
* @instance
|
119111
|
+
*/
|
119112
|
+
PaySui.prototype.recipients = $util.emptyArray;
|
119113
|
+
|
119114
|
+
/**
|
119115
|
+
* PaySui amounts.
|
119116
|
+
* @member {Array.<Long>} amounts
|
119117
|
+
* @memberof TW.Sui.Proto.PaySui
|
119118
|
+
* @instance
|
119119
|
+
*/
|
119120
|
+
PaySui.prototype.amounts = $util.emptyArray;
|
119121
|
+
|
119122
|
+
/**
|
119123
|
+
* Creates a new PaySui instance using the specified properties.
|
119124
|
+
* @function create
|
119125
|
+
* @memberof TW.Sui.Proto.PaySui
|
119126
|
+
* @static
|
119127
|
+
* @param {TW.Sui.Proto.IPaySui=} [properties] Properties to set
|
119128
|
+
* @returns {TW.Sui.Proto.PaySui} PaySui instance
|
119129
|
+
*/
|
119130
|
+
PaySui.create = function create(properties) {
|
119131
|
+
return new PaySui(properties);
|
119132
|
+
};
|
119133
|
+
|
119134
|
+
/**
|
119135
|
+
* Encodes the specified PaySui message. Does not implicitly {@link TW.Sui.Proto.PaySui.verify|verify} messages.
|
119136
|
+
* @function encode
|
119137
|
+
* @memberof TW.Sui.Proto.PaySui
|
119138
|
+
* @static
|
119139
|
+
* @param {TW.Sui.Proto.IPaySui} message PaySui message or plain object to encode
|
119140
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119141
|
+
* @returns {$protobuf.Writer} Writer
|
119142
|
+
*/
|
119143
|
+
PaySui.encode = function encode(message, writer) {
|
119144
|
+
if (!writer)
|
119145
|
+
writer = $Writer.create();
|
119146
|
+
if (message.inputCoins != null && message.inputCoins.length)
|
119147
|
+
for (var i = 0; i < message.inputCoins.length; ++i)
|
119148
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.inputCoins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119149
|
+
if (message.recipients != null && message.recipients.length)
|
119150
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
119151
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipients[i]);
|
119152
|
+
if (message.amounts != null && message.amounts.length) {
|
119153
|
+
writer.uint32(/* id 3, wireType 2 =*/26).fork();
|
119154
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
119155
|
+
writer.uint64(message.amounts[i]);
|
119156
|
+
writer.ldelim();
|
119157
|
+
}
|
119158
|
+
return writer;
|
119159
|
+
};
|
119160
|
+
|
119161
|
+
/**
|
119162
|
+
* Decodes a PaySui message from the specified reader or buffer.
|
119163
|
+
* @function decode
|
119164
|
+
* @memberof TW.Sui.Proto.PaySui
|
119165
|
+
* @static
|
119166
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119167
|
+
* @param {number} [length] Message length if known beforehand
|
119168
|
+
* @returns {TW.Sui.Proto.PaySui} PaySui
|
119169
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119170
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119171
|
+
*/
|
119172
|
+
PaySui.decode = function decode(reader, length) {
|
119173
|
+
if (!(reader instanceof $Reader))
|
119174
|
+
reader = $Reader.create(reader);
|
119175
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.PaySui();
|
119176
|
+
while (reader.pos < end) {
|
119177
|
+
var tag = reader.uint32();
|
119178
|
+
switch (tag >>> 3) {
|
119179
|
+
case 1:
|
119180
|
+
if (!(message.inputCoins && message.inputCoins.length))
|
119181
|
+
message.inputCoins = [];
|
119182
|
+
message.inputCoins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
119183
|
+
break;
|
119184
|
+
case 2:
|
119185
|
+
if (!(message.recipients && message.recipients.length))
|
119186
|
+
message.recipients = [];
|
119187
|
+
message.recipients.push(reader.string());
|
119188
|
+
break;
|
119189
|
+
case 3:
|
119190
|
+
if (!(message.amounts && message.amounts.length))
|
119191
|
+
message.amounts = [];
|
119192
|
+
if ((tag & 7) === 2) {
|
119193
|
+
var end2 = reader.uint32() + reader.pos;
|
119194
|
+
while (reader.pos < end2)
|
119195
|
+
message.amounts.push(reader.uint64());
|
119196
|
+
} else
|
119197
|
+
message.amounts.push(reader.uint64());
|
119198
|
+
break;
|
119199
|
+
default:
|
119200
|
+
reader.skipType(tag & 7);
|
119201
|
+
break;
|
119202
|
+
}
|
119203
|
+
}
|
119204
|
+
return message;
|
119205
|
+
};
|
119206
|
+
|
119207
|
+
/**
|
119208
|
+
* Verifies a PaySui message.
|
119209
|
+
* @function verify
|
119210
|
+
* @memberof TW.Sui.Proto.PaySui
|
119211
|
+
* @static
|
119212
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119213
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119214
|
+
*/
|
119215
|
+
PaySui.verify = function verify(message) {
|
119216
|
+
if (typeof message !== "object" || message === null)
|
119217
|
+
return "object expected";
|
119218
|
+
if (message.inputCoins != null && message.hasOwnProperty("inputCoins")) {
|
119219
|
+
if (!Array.isArray(message.inputCoins))
|
119220
|
+
return "inputCoins: array expected";
|
119221
|
+
for (var i = 0; i < message.inputCoins.length; ++i) {
|
119222
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.inputCoins[i]);
|
119223
|
+
if (error)
|
119224
|
+
return "inputCoins." + error;
|
119225
|
+
}
|
119226
|
+
}
|
119227
|
+
if (message.recipients != null && message.hasOwnProperty("recipients")) {
|
119228
|
+
if (!Array.isArray(message.recipients))
|
119229
|
+
return "recipients: array expected";
|
119230
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
119231
|
+
if (!$util.isString(message.recipients[i]))
|
119232
|
+
return "recipients: string[] expected";
|
119233
|
+
}
|
119234
|
+
if (message.amounts != null && message.hasOwnProperty("amounts")) {
|
119235
|
+
if (!Array.isArray(message.amounts))
|
119236
|
+
return "amounts: array expected";
|
119237
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
119238
|
+
if (!$util.isInteger(message.amounts[i]) && !(message.amounts[i] && $util.isInteger(message.amounts[i].low) && $util.isInteger(message.amounts[i].high)))
|
119239
|
+
return "amounts: integer|Long[] expected";
|
119240
|
+
}
|
119241
|
+
return null;
|
119242
|
+
};
|
119243
|
+
|
119244
|
+
/**
|
119245
|
+
* Creates a PaySui message from a plain object. Also converts values to their respective internal types.
|
119246
|
+
* @function fromObject
|
119247
|
+
* @memberof TW.Sui.Proto.PaySui
|
119248
|
+
* @static
|
119249
|
+
* @param {Object.<string,*>} object Plain object
|
119250
|
+
* @returns {TW.Sui.Proto.PaySui} PaySui
|
119251
|
+
*/
|
119252
|
+
PaySui.fromObject = function fromObject(object) {
|
119253
|
+
if (object instanceof $root.TW.Sui.Proto.PaySui)
|
119254
|
+
return object;
|
119255
|
+
var message = new $root.TW.Sui.Proto.PaySui();
|
119256
|
+
if (object.inputCoins) {
|
119257
|
+
if (!Array.isArray(object.inputCoins))
|
119258
|
+
throw TypeError(".TW.Sui.Proto.PaySui.inputCoins: array expected");
|
119259
|
+
message.inputCoins = [];
|
119260
|
+
for (var i = 0; i < object.inputCoins.length; ++i) {
|
119261
|
+
if (typeof object.inputCoins[i] !== "object")
|
119262
|
+
throw TypeError(".TW.Sui.Proto.PaySui.inputCoins: object expected");
|
119263
|
+
message.inputCoins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.inputCoins[i]);
|
119264
|
+
}
|
119265
|
+
}
|
119266
|
+
if (object.recipients) {
|
119267
|
+
if (!Array.isArray(object.recipients))
|
119268
|
+
throw TypeError(".TW.Sui.Proto.PaySui.recipients: array expected");
|
119269
|
+
message.recipients = [];
|
119270
|
+
for (var i = 0; i < object.recipients.length; ++i)
|
119271
|
+
message.recipients[i] = String(object.recipients[i]);
|
119272
|
+
}
|
119273
|
+
if (object.amounts) {
|
119274
|
+
if (!Array.isArray(object.amounts))
|
119275
|
+
throw TypeError(".TW.Sui.Proto.PaySui.amounts: array expected");
|
119276
|
+
message.amounts = [];
|
119277
|
+
for (var i = 0; i < object.amounts.length; ++i)
|
119278
|
+
if ($util.Long)
|
119279
|
+
(message.amounts[i] = $util.Long.fromValue(object.amounts[i])).unsigned = true;
|
119280
|
+
else if (typeof object.amounts[i] === "string")
|
119281
|
+
message.amounts[i] = parseInt(object.amounts[i], 10);
|
119282
|
+
else if (typeof object.amounts[i] === "number")
|
119283
|
+
message.amounts[i] = object.amounts[i];
|
119284
|
+
else if (typeof object.amounts[i] === "object")
|
119285
|
+
message.amounts[i] = new $util.LongBits(object.amounts[i].low >>> 0, object.amounts[i].high >>> 0).toNumber(true);
|
119286
|
+
}
|
119287
|
+
return message;
|
119288
|
+
};
|
119289
|
+
|
119290
|
+
/**
|
119291
|
+
* Creates a plain object from a PaySui message. Also converts values to other types if specified.
|
119292
|
+
* @function toObject
|
119293
|
+
* @memberof TW.Sui.Proto.PaySui
|
119294
|
+
* @static
|
119295
|
+
* @param {TW.Sui.Proto.PaySui} message PaySui
|
119296
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119297
|
+
* @returns {Object.<string,*>} Plain object
|
119298
|
+
*/
|
119299
|
+
PaySui.toObject = function toObject(message, options) {
|
119300
|
+
if (!options)
|
119301
|
+
options = {};
|
119302
|
+
var object = {};
|
119303
|
+
if (options.arrays || options.defaults) {
|
119304
|
+
object.inputCoins = [];
|
119305
|
+
object.recipients = [];
|
119306
|
+
object.amounts = [];
|
119307
|
+
}
|
119308
|
+
if (message.inputCoins && message.inputCoins.length) {
|
119309
|
+
object.inputCoins = [];
|
119310
|
+
for (var j = 0; j < message.inputCoins.length; ++j)
|
119311
|
+
object.inputCoins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.inputCoins[j], options);
|
119312
|
+
}
|
119313
|
+
if (message.recipients && message.recipients.length) {
|
119314
|
+
object.recipients = [];
|
119315
|
+
for (var j = 0; j < message.recipients.length; ++j)
|
119316
|
+
object.recipients[j] = message.recipients[j];
|
119317
|
+
}
|
119318
|
+
if (message.amounts && message.amounts.length) {
|
119319
|
+
object.amounts = [];
|
119320
|
+
for (var j = 0; j < message.amounts.length; ++j)
|
119321
|
+
if (typeof message.amounts[j] === "number")
|
119322
|
+
object.amounts[j] = options.longs === String ? String(message.amounts[j]) : message.amounts[j];
|
119323
|
+
else
|
119324
|
+
object.amounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.amounts[j]) : options.longs === Number ? new $util.LongBits(message.amounts[j].low >>> 0, message.amounts[j].high >>> 0).toNumber(true) : message.amounts[j];
|
119325
|
+
}
|
119326
|
+
return object;
|
119327
|
+
};
|
119328
|
+
|
119329
|
+
/**
|
119330
|
+
* Converts this PaySui to JSON.
|
119331
|
+
* @function toJSON
|
119332
|
+
* @memberof TW.Sui.Proto.PaySui
|
119333
|
+
* @instance
|
119334
|
+
* @returns {Object.<string,*>} JSON object
|
119335
|
+
*/
|
119336
|
+
PaySui.prototype.toJSON = function toJSON() {
|
119337
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119338
|
+
};
|
119339
|
+
|
119340
|
+
return PaySui;
|
119341
|
+
})();
|
119342
|
+
|
119343
|
+
Proto.PayAllSui = (function() {
|
119344
|
+
|
119345
|
+
/**
|
119346
|
+
* Properties of a PayAllSui.
|
119347
|
+
* @memberof TW.Sui.Proto
|
119348
|
+
* @interface IPayAllSui
|
119349
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [inputCoins] PayAllSui inputCoins
|
119350
|
+
* @property {string|null} [recipient] PayAllSui recipient
|
119351
|
+
*/
|
119352
|
+
|
119353
|
+
/**
|
119354
|
+
* Constructs a new PayAllSui.
|
119355
|
+
* @memberof TW.Sui.Proto
|
119356
|
+
* @classdesc Represents a PayAllSui.
|
119357
|
+
* @implements IPayAllSui
|
119358
|
+
* @constructor
|
119359
|
+
* @param {TW.Sui.Proto.IPayAllSui=} [properties] Properties to set
|
119360
|
+
*/
|
119361
|
+
function PayAllSui(properties) {
|
119362
|
+
this.inputCoins = [];
|
119363
|
+
if (properties)
|
119364
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119365
|
+
if (properties[keys[i]] != null)
|
119366
|
+
this[keys[i]] = properties[keys[i]];
|
119367
|
+
}
|
119368
|
+
|
119369
|
+
/**
|
119370
|
+
* PayAllSui inputCoins.
|
119371
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} inputCoins
|
119372
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119373
|
+
* @instance
|
119374
|
+
*/
|
119375
|
+
PayAllSui.prototype.inputCoins = $util.emptyArray;
|
119376
|
+
|
119377
|
+
/**
|
119378
|
+
* PayAllSui recipient.
|
119379
|
+
* @member {string} recipient
|
119380
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119381
|
+
* @instance
|
119382
|
+
*/
|
119383
|
+
PayAllSui.prototype.recipient = "";
|
119384
|
+
|
119385
|
+
/**
|
119386
|
+
* Creates a new PayAllSui instance using the specified properties.
|
119387
|
+
* @function create
|
119388
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119389
|
+
* @static
|
119390
|
+
* @param {TW.Sui.Proto.IPayAllSui=} [properties] Properties to set
|
119391
|
+
* @returns {TW.Sui.Proto.PayAllSui} PayAllSui instance
|
119392
|
+
*/
|
119393
|
+
PayAllSui.create = function create(properties) {
|
119394
|
+
return new PayAllSui(properties);
|
119395
|
+
};
|
119396
|
+
|
119397
|
+
/**
|
119398
|
+
* Encodes the specified PayAllSui message. Does not implicitly {@link TW.Sui.Proto.PayAllSui.verify|verify} messages.
|
119399
|
+
* @function encode
|
119400
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119401
|
+
* @static
|
119402
|
+
* @param {TW.Sui.Proto.IPayAllSui} message PayAllSui message or plain object to encode
|
119403
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119404
|
+
* @returns {$protobuf.Writer} Writer
|
119405
|
+
*/
|
119406
|
+
PayAllSui.encode = function encode(message, writer) {
|
119407
|
+
if (!writer)
|
119408
|
+
writer = $Writer.create();
|
119409
|
+
if (message.inputCoins != null && message.inputCoins.length)
|
119410
|
+
for (var i = 0; i < message.inputCoins.length; ++i)
|
119411
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.inputCoins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119412
|
+
if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient"))
|
119413
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipient);
|
119414
|
+
return writer;
|
119415
|
+
};
|
119416
|
+
|
119417
|
+
/**
|
119418
|
+
* Decodes a PayAllSui message from the specified reader or buffer.
|
119419
|
+
* @function decode
|
119420
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119421
|
+
* @static
|
119422
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119423
|
+
* @param {number} [length] Message length if known beforehand
|
119424
|
+
* @returns {TW.Sui.Proto.PayAllSui} PayAllSui
|
119425
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119426
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119427
|
+
*/
|
119428
|
+
PayAllSui.decode = function decode(reader, length) {
|
119429
|
+
if (!(reader instanceof $Reader))
|
119430
|
+
reader = $Reader.create(reader);
|
119431
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.PayAllSui();
|
119432
|
+
while (reader.pos < end) {
|
119433
|
+
var tag = reader.uint32();
|
119434
|
+
switch (tag >>> 3) {
|
119435
|
+
case 1:
|
119436
|
+
if (!(message.inputCoins && message.inputCoins.length))
|
119437
|
+
message.inputCoins = [];
|
119438
|
+
message.inputCoins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
119439
|
+
break;
|
119440
|
+
case 2:
|
119441
|
+
message.recipient = reader.string();
|
119442
|
+
break;
|
119443
|
+
default:
|
119444
|
+
reader.skipType(tag & 7);
|
119445
|
+
break;
|
119446
|
+
}
|
119447
|
+
}
|
119448
|
+
return message;
|
119449
|
+
};
|
119450
|
+
|
119451
|
+
/**
|
119452
|
+
* Verifies a PayAllSui message.
|
119453
|
+
* @function verify
|
119454
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119455
|
+
* @static
|
119456
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119457
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119458
|
+
*/
|
119459
|
+
PayAllSui.verify = function verify(message) {
|
119460
|
+
if (typeof message !== "object" || message === null)
|
119461
|
+
return "object expected";
|
119462
|
+
if (message.inputCoins != null && message.hasOwnProperty("inputCoins")) {
|
119463
|
+
if (!Array.isArray(message.inputCoins))
|
119464
|
+
return "inputCoins: array expected";
|
119465
|
+
for (var i = 0; i < message.inputCoins.length; ++i) {
|
119466
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.inputCoins[i]);
|
119467
|
+
if (error)
|
119468
|
+
return "inputCoins." + error;
|
119469
|
+
}
|
119470
|
+
}
|
119471
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
119472
|
+
if (!$util.isString(message.recipient))
|
119473
|
+
return "recipient: string expected";
|
119474
|
+
return null;
|
119475
|
+
};
|
119476
|
+
|
119477
|
+
/**
|
119478
|
+
* Creates a PayAllSui message from a plain object. Also converts values to their respective internal types.
|
119479
|
+
* @function fromObject
|
119480
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119481
|
+
* @static
|
119482
|
+
* @param {Object.<string,*>} object Plain object
|
119483
|
+
* @returns {TW.Sui.Proto.PayAllSui} PayAllSui
|
119484
|
+
*/
|
119485
|
+
PayAllSui.fromObject = function fromObject(object) {
|
119486
|
+
if (object instanceof $root.TW.Sui.Proto.PayAllSui)
|
119487
|
+
return object;
|
119488
|
+
var message = new $root.TW.Sui.Proto.PayAllSui();
|
119489
|
+
if (object.inputCoins) {
|
119490
|
+
if (!Array.isArray(object.inputCoins))
|
119491
|
+
throw TypeError(".TW.Sui.Proto.PayAllSui.inputCoins: array expected");
|
119492
|
+
message.inputCoins = [];
|
119493
|
+
for (var i = 0; i < object.inputCoins.length; ++i) {
|
119494
|
+
if (typeof object.inputCoins[i] !== "object")
|
119495
|
+
throw TypeError(".TW.Sui.Proto.PayAllSui.inputCoins: object expected");
|
119496
|
+
message.inputCoins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.inputCoins[i]);
|
119497
|
+
}
|
119498
|
+
}
|
119499
|
+
if (object.recipient != null)
|
119500
|
+
message.recipient = String(object.recipient);
|
119501
|
+
return message;
|
119502
|
+
};
|
119503
|
+
|
119504
|
+
/**
|
119505
|
+
* Creates a plain object from a PayAllSui message. Also converts values to other types if specified.
|
119506
|
+
* @function toObject
|
119507
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119508
|
+
* @static
|
119509
|
+
* @param {TW.Sui.Proto.PayAllSui} message PayAllSui
|
119510
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119511
|
+
* @returns {Object.<string,*>} Plain object
|
119512
|
+
*/
|
119513
|
+
PayAllSui.toObject = function toObject(message, options) {
|
119514
|
+
if (!options)
|
119515
|
+
options = {};
|
119516
|
+
var object = {};
|
119517
|
+
if (options.arrays || options.defaults)
|
119518
|
+
object.inputCoins = [];
|
119519
|
+
if (options.defaults)
|
119520
|
+
object.recipient = "";
|
119521
|
+
if (message.inputCoins && message.inputCoins.length) {
|
119522
|
+
object.inputCoins = [];
|
119523
|
+
for (var j = 0; j < message.inputCoins.length; ++j)
|
119524
|
+
object.inputCoins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.inputCoins[j], options);
|
119525
|
+
}
|
119526
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
119527
|
+
object.recipient = message.recipient;
|
119528
|
+
return object;
|
119529
|
+
};
|
119530
|
+
|
119531
|
+
/**
|
119532
|
+
* Converts this PayAllSui to JSON.
|
119533
|
+
* @function toJSON
|
119534
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119535
|
+
* @instance
|
119536
|
+
* @returns {Object.<string,*>} JSON object
|
119537
|
+
*/
|
119538
|
+
PayAllSui.prototype.toJSON = function toJSON() {
|
119539
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119540
|
+
};
|
119541
|
+
|
119542
|
+
return PayAllSui;
|
119543
|
+
})();
|
119544
|
+
|
119545
|
+
Proto.RequestAddStake = (function() {
|
119546
|
+
|
119547
|
+
/**
|
119548
|
+
* Properties of a RequestAddStake.
|
119549
|
+
* @memberof TW.Sui.Proto
|
119550
|
+
* @interface IRequestAddStake
|
119551
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [coins] RequestAddStake coins
|
119552
|
+
* @property {TW.Sui.Proto.IAmount|null} [amount] RequestAddStake amount
|
119553
|
+
* @property {string|null} [validator] RequestAddStake validator
|
119554
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] RequestAddStake gas
|
119555
|
+
*/
|
119556
|
+
|
119557
|
+
/**
|
119558
|
+
* Constructs a new RequestAddStake.
|
119559
|
+
* @memberof TW.Sui.Proto
|
119560
|
+
* @classdesc Represents a RequestAddStake.
|
119561
|
+
* @implements IRequestAddStake
|
119562
|
+
* @constructor
|
119563
|
+
* @param {TW.Sui.Proto.IRequestAddStake=} [properties] Properties to set
|
119564
|
+
*/
|
119565
|
+
function RequestAddStake(properties) {
|
119566
|
+
this.coins = [];
|
119567
|
+
if (properties)
|
119568
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119569
|
+
if (properties[keys[i]] != null)
|
119570
|
+
this[keys[i]] = properties[keys[i]];
|
119571
|
+
}
|
119572
|
+
|
119573
|
+
/**
|
119574
|
+
* RequestAddStake coins.
|
119575
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} coins
|
119576
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119577
|
+
* @instance
|
119578
|
+
*/
|
119579
|
+
RequestAddStake.prototype.coins = $util.emptyArray;
|
119580
|
+
|
119581
|
+
/**
|
119582
|
+
* RequestAddStake amount.
|
119583
|
+
* @member {TW.Sui.Proto.IAmount|null|undefined} amount
|
119584
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119585
|
+
* @instance
|
119586
|
+
*/
|
119587
|
+
RequestAddStake.prototype.amount = null;
|
119588
|
+
|
119589
|
+
/**
|
119590
|
+
* RequestAddStake validator.
|
119591
|
+
* @member {string} validator
|
119592
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119593
|
+
* @instance
|
119594
|
+
*/
|
119595
|
+
RequestAddStake.prototype.validator = "";
|
119596
|
+
|
119597
|
+
/**
|
119598
|
+
* RequestAddStake gas.
|
119599
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
119600
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119601
|
+
* @instance
|
119602
|
+
*/
|
119603
|
+
RequestAddStake.prototype.gas = null;
|
119604
|
+
|
119605
|
+
/**
|
119606
|
+
* Creates a new RequestAddStake instance using the specified properties.
|
119607
|
+
* @function create
|
119608
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119609
|
+
* @static
|
119610
|
+
* @param {TW.Sui.Proto.IRequestAddStake=} [properties] Properties to set
|
119611
|
+
* @returns {TW.Sui.Proto.RequestAddStake} RequestAddStake instance
|
119612
|
+
*/
|
119613
|
+
RequestAddStake.create = function create(properties) {
|
119614
|
+
return new RequestAddStake(properties);
|
119615
|
+
};
|
119616
|
+
|
119617
|
+
/**
|
119618
|
+
* Encodes the specified RequestAddStake message. Does not implicitly {@link TW.Sui.Proto.RequestAddStake.verify|verify} messages.
|
119619
|
+
* @function encode
|
119620
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119621
|
+
* @static
|
119622
|
+
* @param {TW.Sui.Proto.IRequestAddStake} message RequestAddStake message or plain object to encode
|
119623
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119624
|
+
* @returns {$protobuf.Writer} Writer
|
119625
|
+
*/
|
119626
|
+
RequestAddStake.encode = function encode(message, writer) {
|
119627
|
+
if (!writer)
|
119628
|
+
writer = $Writer.create();
|
119629
|
+
if (message.coins != null && message.coins.length)
|
119630
|
+
for (var i = 0; i < message.coins.length; ++i)
|
119631
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.coins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119632
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
119633
|
+
$root.TW.Sui.Proto.Amount.encode(message.amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
119634
|
+
if (message.validator != null && Object.hasOwnProperty.call(message, "validator"))
|
119635
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.validator);
|
119636
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
119637
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
119638
|
+
return writer;
|
119639
|
+
};
|
119640
|
+
|
119641
|
+
/**
|
119642
|
+
* Decodes a RequestAddStake message from the specified reader or buffer.
|
119643
|
+
* @function decode
|
119644
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119645
|
+
* @static
|
119646
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119647
|
+
* @param {number} [length] Message length if known beforehand
|
119648
|
+
* @returns {TW.Sui.Proto.RequestAddStake} RequestAddStake
|
119649
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119650
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119651
|
+
*/
|
119652
|
+
RequestAddStake.decode = function decode(reader, length) {
|
119653
|
+
if (!(reader instanceof $Reader))
|
119654
|
+
reader = $Reader.create(reader);
|
119655
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.RequestAddStake();
|
119656
|
+
while (reader.pos < end) {
|
119657
|
+
var tag = reader.uint32();
|
119658
|
+
switch (tag >>> 3) {
|
119659
|
+
case 1:
|
119660
|
+
if (!(message.coins && message.coins.length))
|
119661
|
+
message.coins = [];
|
119662
|
+
message.coins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
119663
|
+
break;
|
119664
|
+
case 2:
|
119665
|
+
message.amount = $root.TW.Sui.Proto.Amount.decode(reader, reader.uint32());
|
119666
|
+
break;
|
119667
|
+
case 3:
|
119668
|
+
message.validator = reader.string();
|
119669
|
+
break;
|
119670
|
+
case 4:
|
119671
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119672
|
+
break;
|
119673
|
+
default:
|
119674
|
+
reader.skipType(tag & 7);
|
119675
|
+
break;
|
119676
|
+
}
|
119677
|
+
}
|
119678
|
+
return message;
|
119679
|
+
};
|
119680
|
+
|
119681
|
+
/**
|
119682
|
+
* Verifies a RequestAddStake message.
|
119683
|
+
* @function verify
|
119684
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119685
|
+
* @static
|
119686
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119687
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119688
|
+
*/
|
119689
|
+
RequestAddStake.verify = function verify(message) {
|
119690
|
+
if (typeof message !== "object" || message === null)
|
119691
|
+
return "object expected";
|
119692
|
+
if (message.coins != null && message.hasOwnProperty("coins")) {
|
119693
|
+
if (!Array.isArray(message.coins))
|
119694
|
+
return "coins: array expected";
|
119695
|
+
for (var i = 0; i < message.coins.length; ++i) {
|
119696
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.coins[i]);
|
119697
|
+
if (error)
|
119698
|
+
return "coins." + error;
|
119699
|
+
}
|
119700
|
+
}
|
119701
|
+
if (message.amount != null && message.hasOwnProperty("amount")) {
|
119702
|
+
var error = $root.TW.Sui.Proto.Amount.verify(message.amount);
|
119703
|
+
if (error)
|
119704
|
+
return "amount." + error;
|
119705
|
+
}
|
119706
|
+
if (message.validator != null && message.hasOwnProperty("validator"))
|
119707
|
+
if (!$util.isString(message.validator))
|
119708
|
+
return "validator: string expected";
|
119709
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
119710
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
119711
|
+
if (error)
|
119712
|
+
return "gas." + error;
|
119713
|
+
}
|
119714
|
+
return null;
|
119715
|
+
};
|
119716
|
+
|
119717
|
+
/**
|
119718
|
+
* Creates a RequestAddStake message from a plain object. Also converts values to their respective internal types.
|
119719
|
+
* @function fromObject
|
119720
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119721
|
+
* @static
|
119722
|
+
* @param {Object.<string,*>} object Plain object
|
119723
|
+
* @returns {TW.Sui.Proto.RequestAddStake} RequestAddStake
|
119724
|
+
*/
|
119725
|
+
RequestAddStake.fromObject = function fromObject(object) {
|
119726
|
+
if (object instanceof $root.TW.Sui.Proto.RequestAddStake)
|
119727
|
+
return object;
|
119728
|
+
var message = new $root.TW.Sui.Proto.RequestAddStake();
|
119729
|
+
if (object.coins) {
|
119730
|
+
if (!Array.isArray(object.coins))
|
119731
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.coins: array expected");
|
119732
|
+
message.coins = [];
|
119733
|
+
for (var i = 0; i < object.coins.length; ++i) {
|
119734
|
+
if (typeof object.coins[i] !== "object")
|
119735
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.coins: object expected");
|
119736
|
+
message.coins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.coins[i]);
|
119737
|
+
}
|
119738
|
+
}
|
119739
|
+
if (object.amount != null) {
|
119740
|
+
if (typeof object.amount !== "object")
|
119741
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.amount: object expected");
|
119742
|
+
message.amount = $root.TW.Sui.Proto.Amount.fromObject(object.amount);
|
119743
|
+
}
|
119744
|
+
if (object.validator != null)
|
119745
|
+
message.validator = String(object.validator);
|
119746
|
+
if (object.gas != null) {
|
119747
|
+
if (typeof object.gas !== "object")
|
119748
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.gas: object expected");
|
119749
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
119750
|
+
}
|
119751
|
+
return message;
|
119752
|
+
};
|
119753
|
+
|
119754
|
+
/**
|
119755
|
+
* Creates a plain object from a RequestAddStake message. Also converts values to other types if specified.
|
119756
|
+
* @function toObject
|
119757
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119758
|
+
* @static
|
119759
|
+
* @param {TW.Sui.Proto.RequestAddStake} message RequestAddStake
|
119760
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119761
|
+
* @returns {Object.<string,*>} Plain object
|
119762
|
+
*/
|
119763
|
+
RequestAddStake.toObject = function toObject(message, options) {
|
119764
|
+
if (!options)
|
119765
|
+
options = {};
|
119766
|
+
var object = {};
|
119767
|
+
if (options.arrays || options.defaults)
|
119768
|
+
object.coins = [];
|
119769
|
+
if (options.defaults) {
|
119770
|
+
object.amount = null;
|
119771
|
+
object.validator = "";
|
119772
|
+
object.gas = null;
|
119773
|
+
}
|
119774
|
+
if (message.coins && message.coins.length) {
|
119775
|
+
object.coins = [];
|
119776
|
+
for (var j = 0; j < message.coins.length; ++j)
|
119777
|
+
object.coins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.coins[j], options);
|
119778
|
+
}
|
119779
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
119780
|
+
object.amount = $root.TW.Sui.Proto.Amount.toObject(message.amount, options);
|
119781
|
+
if (message.validator != null && message.hasOwnProperty("validator"))
|
119782
|
+
object.validator = message.validator;
|
119783
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
119784
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
119785
|
+
return object;
|
119786
|
+
};
|
119787
|
+
|
119788
|
+
/**
|
119789
|
+
* Converts this RequestAddStake to JSON.
|
119790
|
+
* @function toJSON
|
119791
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119792
|
+
* @instance
|
119793
|
+
* @returns {Object.<string,*>} JSON object
|
119794
|
+
*/
|
119795
|
+
RequestAddStake.prototype.toJSON = function toJSON() {
|
119796
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119797
|
+
};
|
119798
|
+
|
119799
|
+
return RequestAddStake;
|
119800
|
+
})();
|
119801
|
+
|
119802
|
+
Proto.RequestWithdrawStake = (function() {
|
119803
|
+
|
119804
|
+
/**
|
119805
|
+
* Properties of a RequestWithdrawStake.
|
119806
|
+
* @memberof TW.Sui.Proto
|
119807
|
+
* @interface IRequestWithdrawStake
|
119808
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [stakedSui] RequestWithdrawStake stakedSui
|
119809
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] RequestWithdrawStake gas
|
119810
|
+
*/
|
119811
|
+
|
119812
|
+
/**
|
119813
|
+
* Constructs a new RequestWithdrawStake.
|
119814
|
+
* @memberof TW.Sui.Proto
|
119815
|
+
* @classdesc Represents a RequestWithdrawStake.
|
119816
|
+
* @implements IRequestWithdrawStake
|
119817
|
+
* @constructor
|
119818
|
+
* @param {TW.Sui.Proto.IRequestWithdrawStake=} [properties] Properties to set
|
119819
|
+
*/
|
119820
|
+
function RequestWithdrawStake(properties) {
|
119821
|
+
if (properties)
|
119822
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119823
|
+
if (properties[keys[i]] != null)
|
119824
|
+
this[keys[i]] = properties[keys[i]];
|
119825
|
+
}
|
119826
|
+
|
119827
|
+
/**
|
119828
|
+
* RequestWithdrawStake stakedSui.
|
119829
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} stakedSui
|
119830
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119831
|
+
* @instance
|
119832
|
+
*/
|
119833
|
+
RequestWithdrawStake.prototype.stakedSui = null;
|
119834
|
+
|
119835
|
+
/**
|
119836
|
+
* RequestWithdrawStake gas.
|
119837
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
119838
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119839
|
+
* @instance
|
119840
|
+
*/
|
119841
|
+
RequestWithdrawStake.prototype.gas = null;
|
119842
|
+
|
119843
|
+
/**
|
119844
|
+
* Creates a new RequestWithdrawStake instance using the specified properties.
|
119845
|
+
* @function create
|
119846
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119847
|
+
* @static
|
119848
|
+
* @param {TW.Sui.Proto.IRequestWithdrawStake=} [properties] Properties to set
|
119849
|
+
* @returns {TW.Sui.Proto.RequestWithdrawStake} RequestWithdrawStake instance
|
119850
|
+
*/
|
119851
|
+
RequestWithdrawStake.create = function create(properties) {
|
119852
|
+
return new RequestWithdrawStake(properties);
|
119853
|
+
};
|
119854
|
+
|
119855
|
+
/**
|
119856
|
+
* Encodes the specified RequestWithdrawStake message. Does not implicitly {@link TW.Sui.Proto.RequestWithdrawStake.verify|verify} messages.
|
119857
|
+
* @function encode
|
119858
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119859
|
+
* @static
|
119860
|
+
* @param {TW.Sui.Proto.IRequestWithdrawStake} message RequestWithdrawStake message or plain object to encode
|
119861
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119862
|
+
* @returns {$protobuf.Writer} Writer
|
119863
|
+
*/
|
119864
|
+
RequestWithdrawStake.encode = function encode(message, writer) {
|
119865
|
+
if (!writer)
|
119866
|
+
writer = $Writer.create();
|
119867
|
+
if (message.stakedSui != null && Object.hasOwnProperty.call(message, "stakedSui"))
|
119868
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.stakedSui, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119869
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
119870
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
119871
|
+
return writer;
|
119872
|
+
};
|
119873
|
+
|
119874
|
+
/**
|
119875
|
+
* Decodes a RequestWithdrawStake message from the specified reader or buffer.
|
119876
|
+
* @function decode
|
119877
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119878
|
+
* @static
|
119879
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119880
|
+
* @param {number} [length] Message length if known beforehand
|
119881
|
+
* @returns {TW.Sui.Proto.RequestWithdrawStake} RequestWithdrawStake
|
119882
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119883
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119884
|
+
*/
|
119885
|
+
RequestWithdrawStake.decode = function decode(reader, length) {
|
119886
|
+
if (!(reader instanceof $Reader))
|
119887
|
+
reader = $Reader.create(reader);
|
119888
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.RequestWithdrawStake();
|
119889
|
+
while (reader.pos < end) {
|
119890
|
+
var tag = reader.uint32();
|
119891
|
+
switch (tag >>> 3) {
|
119892
|
+
case 1:
|
119893
|
+
message.stakedSui = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119894
|
+
break;
|
119895
|
+
case 2:
|
119896
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119897
|
+
break;
|
119898
|
+
default:
|
119899
|
+
reader.skipType(tag & 7);
|
119900
|
+
break;
|
119901
|
+
}
|
119902
|
+
}
|
119903
|
+
return message;
|
119904
|
+
};
|
119905
|
+
|
119906
|
+
/**
|
119907
|
+
* Verifies a RequestWithdrawStake message.
|
119908
|
+
* @function verify
|
119909
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119910
|
+
* @static
|
119911
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119912
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119913
|
+
*/
|
119914
|
+
RequestWithdrawStake.verify = function verify(message) {
|
119915
|
+
if (typeof message !== "object" || message === null)
|
119916
|
+
return "object expected";
|
119917
|
+
if (message.stakedSui != null && message.hasOwnProperty("stakedSui")) {
|
119918
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.stakedSui);
|
119919
|
+
if (error)
|
119920
|
+
return "stakedSui." + error;
|
119921
|
+
}
|
119922
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
119923
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
119924
|
+
if (error)
|
119925
|
+
return "gas." + error;
|
119926
|
+
}
|
119927
|
+
return null;
|
119928
|
+
};
|
119929
|
+
|
119930
|
+
/**
|
119931
|
+
* Creates a RequestWithdrawStake message from a plain object. Also converts values to their respective internal types.
|
119932
|
+
* @function fromObject
|
119933
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119934
|
+
* @static
|
119935
|
+
* @param {Object.<string,*>} object Plain object
|
119936
|
+
* @returns {TW.Sui.Proto.RequestWithdrawStake} RequestWithdrawStake
|
119937
|
+
*/
|
119938
|
+
RequestWithdrawStake.fromObject = function fromObject(object) {
|
119939
|
+
if (object instanceof $root.TW.Sui.Proto.RequestWithdrawStake)
|
119940
|
+
return object;
|
119941
|
+
var message = new $root.TW.Sui.Proto.RequestWithdrawStake();
|
119942
|
+
if (object.stakedSui != null) {
|
119943
|
+
if (typeof object.stakedSui !== "object")
|
119944
|
+
throw TypeError(".TW.Sui.Proto.RequestWithdrawStake.stakedSui: object expected");
|
119945
|
+
message.stakedSui = $root.TW.Sui.Proto.ObjectRef.fromObject(object.stakedSui);
|
119946
|
+
}
|
119947
|
+
if (object.gas != null) {
|
119948
|
+
if (typeof object.gas !== "object")
|
119949
|
+
throw TypeError(".TW.Sui.Proto.RequestWithdrawStake.gas: object expected");
|
119950
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
119951
|
+
}
|
119952
|
+
return message;
|
119953
|
+
};
|
119954
|
+
|
119955
|
+
/**
|
119956
|
+
* Creates a plain object from a RequestWithdrawStake message. Also converts values to other types if specified.
|
119957
|
+
* @function toObject
|
119958
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119959
|
+
* @static
|
119960
|
+
* @param {TW.Sui.Proto.RequestWithdrawStake} message RequestWithdrawStake
|
119961
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119962
|
+
* @returns {Object.<string,*>} Plain object
|
119963
|
+
*/
|
119964
|
+
RequestWithdrawStake.toObject = function toObject(message, options) {
|
119965
|
+
if (!options)
|
119966
|
+
options = {};
|
119967
|
+
var object = {};
|
119968
|
+
if (options.defaults) {
|
119969
|
+
object.stakedSui = null;
|
119970
|
+
object.gas = null;
|
119971
|
+
}
|
119972
|
+
if (message.stakedSui != null && message.hasOwnProperty("stakedSui"))
|
119973
|
+
object.stakedSui = $root.TW.Sui.Proto.ObjectRef.toObject(message.stakedSui, options);
|
119974
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
119975
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
119976
|
+
return object;
|
119977
|
+
};
|
119978
|
+
|
119979
|
+
/**
|
119980
|
+
* Converts this RequestWithdrawStake to JSON.
|
119981
|
+
* @function toJSON
|
119982
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119983
|
+
* @instance
|
119984
|
+
* @returns {Object.<string,*>} JSON object
|
119985
|
+
*/
|
119986
|
+
RequestWithdrawStake.prototype.toJSON = function toJSON() {
|
119987
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119988
|
+
};
|
119989
|
+
|
119990
|
+
return RequestWithdrawStake;
|
119991
|
+
})();
|
119992
|
+
|
119993
|
+
Proto.TransferObject = (function() {
|
119994
|
+
|
119995
|
+
/**
|
119996
|
+
* Properties of a TransferObject.
|
119997
|
+
* @memberof TW.Sui.Proto
|
119998
|
+
* @interface ITransferObject
|
119999
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [object] TransferObject object
|
120000
|
+
* @property {string|null} [recipient] TransferObject recipient
|
120001
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] TransferObject gas
|
120002
|
+
*/
|
120003
|
+
|
120004
|
+
/**
|
120005
|
+
* Constructs a new TransferObject.
|
120006
|
+
* @memberof TW.Sui.Proto
|
120007
|
+
* @classdesc https://docs.sui.io/sui-api-ref#unsafe_transferobject
|
120008
|
+
* @implements ITransferObject
|
120009
|
+
* @constructor
|
120010
|
+
* @param {TW.Sui.Proto.ITransferObject=} [properties] Properties to set
|
120011
|
+
*/
|
120012
|
+
function TransferObject(properties) {
|
120013
|
+
if (properties)
|
120014
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
120015
|
+
if (properties[keys[i]] != null)
|
120016
|
+
this[keys[i]] = properties[keys[i]];
|
120017
|
+
}
|
120018
|
+
|
120019
|
+
/**
|
120020
|
+
* TransferObject object.
|
120021
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} object
|
120022
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120023
|
+
* @instance
|
120024
|
+
*/
|
120025
|
+
TransferObject.prototype.object = null;
|
120026
|
+
|
120027
|
+
/**
|
120028
|
+
* TransferObject recipient.
|
120029
|
+
* @member {string} recipient
|
120030
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120031
|
+
* @instance
|
120032
|
+
*/
|
120033
|
+
TransferObject.prototype.recipient = "";
|
120034
|
+
|
120035
|
+
/**
|
120036
|
+
* TransferObject gas.
|
120037
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
120038
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120039
|
+
* @instance
|
120040
|
+
*/
|
120041
|
+
TransferObject.prototype.gas = null;
|
120042
|
+
|
120043
|
+
/**
|
120044
|
+
* Creates a new TransferObject instance using the specified properties.
|
120045
|
+
* @function create
|
120046
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120047
|
+
* @static
|
120048
|
+
* @param {TW.Sui.Proto.ITransferObject=} [properties] Properties to set
|
120049
|
+
* @returns {TW.Sui.Proto.TransferObject} TransferObject instance
|
120050
|
+
*/
|
120051
|
+
TransferObject.create = function create(properties) {
|
120052
|
+
return new TransferObject(properties);
|
120053
|
+
};
|
120054
|
+
|
120055
|
+
/**
|
120056
|
+
* Encodes the specified TransferObject message. Does not implicitly {@link TW.Sui.Proto.TransferObject.verify|verify} messages.
|
120057
|
+
* @function encode
|
120058
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120059
|
+
* @static
|
120060
|
+
* @param {TW.Sui.Proto.ITransferObject} message TransferObject message or plain object to encode
|
120061
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
120062
|
+
* @returns {$protobuf.Writer} Writer
|
120063
|
+
*/
|
120064
|
+
TransferObject.encode = function encode(message, writer) {
|
120065
|
+
if (!writer)
|
120066
|
+
writer = $Writer.create();
|
120067
|
+
if (message.object != null && Object.hasOwnProperty.call(message, "object"))
|
120068
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.object, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
120069
|
+
if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient"))
|
120070
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipient);
|
120071
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
120072
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
120073
|
+
return writer;
|
120074
|
+
};
|
120075
|
+
|
120076
|
+
/**
|
120077
|
+
* Decodes a TransferObject message from the specified reader or buffer.
|
120078
|
+
* @function decode
|
120079
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120080
|
+
* @static
|
120081
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
120082
|
+
* @param {number} [length] Message length if known beforehand
|
120083
|
+
* @returns {TW.Sui.Proto.TransferObject} TransferObject
|
120084
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
120085
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
120086
|
+
*/
|
120087
|
+
TransferObject.decode = function decode(reader, length) {
|
120088
|
+
if (!(reader instanceof $Reader))
|
120089
|
+
reader = $Reader.create(reader);
|
120090
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.TransferObject();
|
120091
|
+
while (reader.pos < end) {
|
120092
|
+
var tag = reader.uint32();
|
120093
|
+
switch (tag >>> 3) {
|
120094
|
+
case 1:
|
120095
|
+
message.object = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
120096
|
+
break;
|
120097
|
+
case 2:
|
120098
|
+
message.recipient = reader.string();
|
120099
|
+
break;
|
120100
|
+
case 3:
|
120101
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
120102
|
+
break;
|
120103
|
+
default:
|
120104
|
+
reader.skipType(tag & 7);
|
120105
|
+
break;
|
120106
|
+
}
|
120107
|
+
}
|
120108
|
+
return message;
|
120109
|
+
};
|
120110
|
+
|
120111
|
+
/**
|
120112
|
+
* Verifies a TransferObject message.
|
120113
|
+
* @function verify
|
120114
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120115
|
+
* @static
|
120116
|
+
* @param {Object.<string,*>} message Plain object to verify
|
120117
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
120118
|
+
*/
|
120119
|
+
TransferObject.verify = function verify(message) {
|
120120
|
+
if (typeof message !== "object" || message === null)
|
120121
|
+
return "object expected";
|
120122
|
+
if (message.object != null && message.hasOwnProperty("object")) {
|
120123
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.object);
|
120124
|
+
if (error)
|
120125
|
+
return "object." + error;
|
120126
|
+
}
|
120127
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
120128
|
+
if (!$util.isString(message.recipient))
|
120129
|
+
return "recipient: string expected";
|
120130
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
120131
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
120132
|
+
if (error)
|
120133
|
+
return "gas." + error;
|
120134
|
+
}
|
120135
|
+
return null;
|
120136
|
+
};
|
120137
|
+
|
120138
|
+
/**
|
120139
|
+
* Creates a TransferObject message from a plain object. Also converts values to their respective internal types.
|
120140
|
+
* @function fromObject
|
120141
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120142
|
+
* @static
|
120143
|
+
* @param {Object.<string,*>} object Plain object
|
120144
|
+
* @returns {TW.Sui.Proto.TransferObject} TransferObject
|
120145
|
+
*/
|
120146
|
+
TransferObject.fromObject = function fromObject(object) {
|
120147
|
+
if (object instanceof $root.TW.Sui.Proto.TransferObject)
|
120148
|
+
return object;
|
120149
|
+
var message = new $root.TW.Sui.Proto.TransferObject();
|
120150
|
+
if (object.object != null) {
|
120151
|
+
if (typeof object.object !== "object")
|
120152
|
+
throw TypeError(".TW.Sui.Proto.TransferObject.object: object expected");
|
120153
|
+
message.object = $root.TW.Sui.Proto.ObjectRef.fromObject(object.object);
|
120154
|
+
}
|
120155
|
+
if (object.recipient != null)
|
120156
|
+
message.recipient = String(object.recipient);
|
120157
|
+
if (object.gas != null) {
|
120158
|
+
if (typeof object.gas !== "object")
|
120159
|
+
throw TypeError(".TW.Sui.Proto.TransferObject.gas: object expected");
|
120160
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
120161
|
+
}
|
120162
|
+
return message;
|
120163
|
+
};
|
120164
|
+
|
120165
|
+
/**
|
120166
|
+
* Creates a plain object from a TransferObject message. Also converts values to other types if specified.
|
120167
|
+
* @function toObject
|
120168
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120169
|
+
* @static
|
120170
|
+
* @param {TW.Sui.Proto.TransferObject} message TransferObject
|
120171
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
120172
|
+
* @returns {Object.<string,*>} Plain object
|
120173
|
+
*/
|
120174
|
+
TransferObject.toObject = function toObject(message, options) {
|
120175
|
+
if (!options)
|
120176
|
+
options = {};
|
120177
|
+
var object = {};
|
120178
|
+
if (options.defaults) {
|
120179
|
+
object.object = null;
|
120180
|
+
object.recipient = "";
|
120181
|
+
object.gas = null;
|
120182
|
+
}
|
120183
|
+
if (message.object != null && message.hasOwnProperty("object"))
|
120184
|
+
object.object = $root.TW.Sui.Proto.ObjectRef.toObject(message.object, options);
|
120185
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
120186
|
+
object.recipient = message.recipient;
|
120187
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
120188
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
120189
|
+
return object;
|
120190
|
+
};
|
120191
|
+
|
120192
|
+
/**
|
120193
|
+
* Converts this TransferObject to JSON.
|
120194
|
+
* @function toJSON
|
120195
|
+
* @memberof TW.Sui.Proto.TransferObject
|
120196
|
+
* @instance
|
120197
|
+
* @returns {Object.<string,*>} JSON object
|
120198
|
+
*/
|
120199
|
+
TransferObject.prototype.toJSON = function toJSON() {
|
120200
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
120201
|
+
};
|
120202
|
+
|
120203
|
+
return TransferObject;
|
120204
|
+
})();
|
120205
|
+
|
117725
120206
|
Proto.SigningInput = (function() {
|
117726
120207
|
|
117727
120208
|
/**
|
@@ -117729,7 +120210,16 @@
|
|
117729
120210
|
* @memberof TW.Sui.Proto
|
117730
120211
|
* @interface ISigningInput
|
117731
120212
|
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
120213
|
+
* @property {string|null} [signer] SigningInput signer
|
117732
120214
|
* @property {TW.Sui.Proto.ISignDirect|null} [signDirectMessage] SigningInput signDirectMessage
|
120215
|
+
* @property {TW.Sui.Proto.IPay|null} [pay] SigningInput pay
|
120216
|
+
* @property {TW.Sui.Proto.IPaySui|null} [paySui] SigningInput paySui
|
120217
|
+
* @property {TW.Sui.Proto.IPayAllSui|null} [payAllSui] SigningInput payAllSui
|
120218
|
+
* @property {TW.Sui.Proto.IRequestAddStake|null} [requestAddStake] SigningInput requestAddStake
|
120219
|
+
* @property {TW.Sui.Proto.IRequestWithdrawStake|null} [requestWithdrawStake] SigningInput requestWithdrawStake
|
120220
|
+
* @property {TW.Sui.Proto.ITransferObject|null} [transferObject] SigningInput transferObject
|
120221
|
+
* @property {Long|null} [gasBudget] SigningInput gasBudget
|
120222
|
+
* @property {Long|null} [referenceGasPrice] SigningInput referenceGasPrice
|
117733
120223
|
*/
|
117734
120224
|
|
117735
120225
|
/**
|
@@ -117755,6 +120245,14 @@
|
|
117755
120245
|
*/
|
117756
120246
|
SigningInput.prototype.privateKey = $util.newBuffer([]);
|
117757
120247
|
|
120248
|
+
/**
|
120249
|
+
* SigningInput signer.
|
120250
|
+
* @member {string} signer
|
120251
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120252
|
+
* @instance
|
120253
|
+
*/
|
120254
|
+
SigningInput.prototype.signer = "";
|
120255
|
+
|
117758
120256
|
/**
|
117759
120257
|
* SigningInput signDirectMessage.
|
117760
120258
|
* @member {TW.Sui.Proto.ISignDirect|null|undefined} signDirectMessage
|
@@ -117763,17 +120261,81 @@
|
|
117763
120261
|
*/
|
117764
120262
|
SigningInput.prototype.signDirectMessage = null;
|
117765
120263
|
|
120264
|
+
/**
|
120265
|
+
* SigningInput pay.
|
120266
|
+
* @member {TW.Sui.Proto.IPay|null|undefined} pay
|
120267
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120268
|
+
* @instance
|
120269
|
+
*/
|
120270
|
+
SigningInput.prototype.pay = null;
|
120271
|
+
|
120272
|
+
/**
|
120273
|
+
* SigningInput paySui.
|
120274
|
+
* @member {TW.Sui.Proto.IPaySui|null|undefined} paySui
|
120275
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120276
|
+
* @instance
|
120277
|
+
*/
|
120278
|
+
SigningInput.prototype.paySui = null;
|
120279
|
+
|
120280
|
+
/**
|
120281
|
+
* SigningInput payAllSui.
|
120282
|
+
* @member {TW.Sui.Proto.IPayAllSui|null|undefined} payAllSui
|
120283
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120284
|
+
* @instance
|
120285
|
+
*/
|
120286
|
+
SigningInput.prototype.payAllSui = null;
|
120287
|
+
|
120288
|
+
/**
|
120289
|
+
* SigningInput requestAddStake.
|
120290
|
+
* @member {TW.Sui.Proto.IRequestAddStake|null|undefined} requestAddStake
|
120291
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120292
|
+
* @instance
|
120293
|
+
*/
|
120294
|
+
SigningInput.prototype.requestAddStake = null;
|
120295
|
+
|
120296
|
+
/**
|
120297
|
+
* SigningInput requestWithdrawStake.
|
120298
|
+
* @member {TW.Sui.Proto.IRequestWithdrawStake|null|undefined} requestWithdrawStake
|
120299
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120300
|
+
* @instance
|
120301
|
+
*/
|
120302
|
+
SigningInput.prototype.requestWithdrawStake = null;
|
120303
|
+
|
120304
|
+
/**
|
120305
|
+
* SigningInput transferObject.
|
120306
|
+
* @member {TW.Sui.Proto.ITransferObject|null|undefined} transferObject
|
120307
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120308
|
+
* @instance
|
120309
|
+
*/
|
120310
|
+
SigningInput.prototype.transferObject = null;
|
120311
|
+
|
120312
|
+
/**
|
120313
|
+
* SigningInput gasBudget.
|
120314
|
+
* @member {Long} gasBudget
|
120315
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120316
|
+
* @instance
|
120317
|
+
*/
|
120318
|
+
SigningInput.prototype.gasBudget = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
120319
|
+
|
120320
|
+
/**
|
120321
|
+
* SigningInput referenceGasPrice.
|
120322
|
+
* @member {Long} referenceGasPrice
|
120323
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120324
|
+
* @instance
|
120325
|
+
*/
|
120326
|
+
SigningInput.prototype.referenceGasPrice = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
120327
|
+
|
117766
120328
|
// OneOf field names bound to virtual getters and setters
|
117767
120329
|
var $oneOfFields;
|
117768
120330
|
|
117769
120331
|
/**
|
117770
120332
|
* SigningInput transactionPayload.
|
117771
|
-
* @member {"signDirectMessage"|undefined} transactionPayload
|
120333
|
+
* @member {"signDirectMessage"|"pay"|"paySui"|"payAllSui"|"requestAddStake"|"requestWithdrawStake"|"transferObject"|undefined} transactionPayload
|
117772
120334
|
* @memberof TW.Sui.Proto.SigningInput
|
117773
120335
|
* @instance
|
117774
120336
|
*/
|
117775
120337
|
Object.defineProperty(SigningInput.prototype, "transactionPayload", {
|
117776
|
-
get: $util.oneOfGetter($oneOfFields = ["signDirectMessage"]),
|
120338
|
+
get: $util.oneOfGetter($oneOfFields = ["signDirectMessage", "pay", "paySui", "payAllSui", "requestAddStake", "requestWithdrawStake", "transferObject"]),
|
117777
120339
|
set: $util.oneOfSetter($oneOfFields)
|
117778
120340
|
});
|
117779
120341
|
|
@@ -117803,8 +120365,26 @@
|
|
117803
120365
|
writer = $Writer.create();
|
117804
120366
|
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
117805
120367
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
|
120368
|
+
if (message.signer != null && Object.hasOwnProperty.call(message, "signer"))
|
120369
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.signer);
|
117806
120370
|
if (message.signDirectMessage != null && Object.hasOwnProperty.call(message, "signDirectMessage"))
|
117807
|
-
$root.TW.Sui.Proto.SignDirect.encode(message.signDirectMessage, writer.uint32(/* id
|
120371
|
+
$root.TW.Sui.Proto.SignDirect.encode(message.signDirectMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
120372
|
+
if (message.pay != null && Object.hasOwnProperty.call(message, "pay"))
|
120373
|
+
$root.TW.Sui.Proto.Pay.encode(message.pay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
120374
|
+
if (message.paySui != null && Object.hasOwnProperty.call(message, "paySui"))
|
120375
|
+
$root.TW.Sui.Proto.PaySui.encode(message.paySui, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
120376
|
+
if (message.payAllSui != null && Object.hasOwnProperty.call(message, "payAllSui"))
|
120377
|
+
$root.TW.Sui.Proto.PayAllSui.encode(message.payAllSui, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
120378
|
+
if (message.requestAddStake != null && Object.hasOwnProperty.call(message, "requestAddStake"))
|
120379
|
+
$root.TW.Sui.Proto.RequestAddStake.encode(message.requestAddStake, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
120380
|
+
if (message.requestWithdrawStake != null && Object.hasOwnProperty.call(message, "requestWithdrawStake"))
|
120381
|
+
$root.TW.Sui.Proto.RequestWithdrawStake.encode(message.requestWithdrawStake, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
120382
|
+
if (message.transferObject != null && Object.hasOwnProperty.call(message, "transferObject"))
|
120383
|
+
$root.TW.Sui.Proto.TransferObject.encode(message.transferObject, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
120384
|
+
if (message.gasBudget != null && Object.hasOwnProperty.call(message, "gasBudget"))
|
120385
|
+
writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.gasBudget);
|
120386
|
+
if (message.referenceGasPrice != null && Object.hasOwnProperty.call(message, "referenceGasPrice"))
|
120387
|
+
writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.referenceGasPrice);
|
117808
120388
|
return writer;
|
117809
120389
|
};
|
117810
120390
|
|
@@ -117830,8 +120410,35 @@
|
|
117830
120410
|
message.privateKey = reader.bytes();
|
117831
120411
|
break;
|
117832
120412
|
case 2:
|
120413
|
+
message.signer = reader.string();
|
120414
|
+
break;
|
120415
|
+
case 3:
|
117833
120416
|
message.signDirectMessage = $root.TW.Sui.Proto.SignDirect.decode(reader, reader.uint32());
|
117834
120417
|
break;
|
120418
|
+
case 4:
|
120419
|
+
message.pay = $root.TW.Sui.Proto.Pay.decode(reader, reader.uint32());
|
120420
|
+
break;
|
120421
|
+
case 5:
|
120422
|
+
message.paySui = $root.TW.Sui.Proto.PaySui.decode(reader, reader.uint32());
|
120423
|
+
break;
|
120424
|
+
case 6:
|
120425
|
+
message.payAllSui = $root.TW.Sui.Proto.PayAllSui.decode(reader, reader.uint32());
|
120426
|
+
break;
|
120427
|
+
case 7:
|
120428
|
+
message.requestAddStake = $root.TW.Sui.Proto.RequestAddStake.decode(reader, reader.uint32());
|
120429
|
+
break;
|
120430
|
+
case 8:
|
120431
|
+
message.requestWithdrawStake = $root.TW.Sui.Proto.RequestWithdrawStake.decode(reader, reader.uint32());
|
120432
|
+
break;
|
120433
|
+
case 9:
|
120434
|
+
message.transferObject = $root.TW.Sui.Proto.TransferObject.decode(reader, reader.uint32());
|
120435
|
+
break;
|
120436
|
+
case 12:
|
120437
|
+
message.gasBudget = reader.uint64();
|
120438
|
+
break;
|
120439
|
+
case 13:
|
120440
|
+
message.referenceGasPrice = reader.uint64();
|
120441
|
+
break;
|
117835
120442
|
default:
|
117836
120443
|
reader.skipType(tag & 7);
|
117837
120444
|
break;
|
@@ -117855,6 +120462,9 @@
|
|
117855
120462
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
117856
120463
|
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
117857
120464
|
return "privateKey: buffer expected";
|
120465
|
+
if (message.signer != null && message.hasOwnProperty("signer"))
|
120466
|
+
if (!$util.isString(message.signer))
|
120467
|
+
return "signer: string expected";
|
117858
120468
|
if (message.signDirectMessage != null && message.hasOwnProperty("signDirectMessage")) {
|
117859
120469
|
properties.transactionPayload = 1;
|
117860
120470
|
{
|
@@ -117863,6 +120473,72 @@
|
|
117863
120473
|
return "signDirectMessage." + error;
|
117864
120474
|
}
|
117865
120475
|
}
|
120476
|
+
if (message.pay != null && message.hasOwnProperty("pay")) {
|
120477
|
+
if (properties.transactionPayload === 1)
|
120478
|
+
return "transactionPayload: multiple values";
|
120479
|
+
properties.transactionPayload = 1;
|
120480
|
+
{
|
120481
|
+
var error = $root.TW.Sui.Proto.Pay.verify(message.pay);
|
120482
|
+
if (error)
|
120483
|
+
return "pay." + error;
|
120484
|
+
}
|
120485
|
+
}
|
120486
|
+
if (message.paySui != null && message.hasOwnProperty("paySui")) {
|
120487
|
+
if (properties.transactionPayload === 1)
|
120488
|
+
return "transactionPayload: multiple values";
|
120489
|
+
properties.transactionPayload = 1;
|
120490
|
+
{
|
120491
|
+
var error = $root.TW.Sui.Proto.PaySui.verify(message.paySui);
|
120492
|
+
if (error)
|
120493
|
+
return "paySui." + error;
|
120494
|
+
}
|
120495
|
+
}
|
120496
|
+
if (message.payAllSui != null && message.hasOwnProperty("payAllSui")) {
|
120497
|
+
if (properties.transactionPayload === 1)
|
120498
|
+
return "transactionPayload: multiple values";
|
120499
|
+
properties.transactionPayload = 1;
|
120500
|
+
{
|
120501
|
+
var error = $root.TW.Sui.Proto.PayAllSui.verify(message.payAllSui);
|
120502
|
+
if (error)
|
120503
|
+
return "payAllSui." + error;
|
120504
|
+
}
|
120505
|
+
}
|
120506
|
+
if (message.requestAddStake != null && message.hasOwnProperty("requestAddStake")) {
|
120507
|
+
if (properties.transactionPayload === 1)
|
120508
|
+
return "transactionPayload: multiple values";
|
120509
|
+
properties.transactionPayload = 1;
|
120510
|
+
{
|
120511
|
+
var error = $root.TW.Sui.Proto.RequestAddStake.verify(message.requestAddStake);
|
120512
|
+
if (error)
|
120513
|
+
return "requestAddStake." + error;
|
120514
|
+
}
|
120515
|
+
}
|
120516
|
+
if (message.requestWithdrawStake != null && message.hasOwnProperty("requestWithdrawStake")) {
|
120517
|
+
if (properties.transactionPayload === 1)
|
120518
|
+
return "transactionPayload: multiple values";
|
120519
|
+
properties.transactionPayload = 1;
|
120520
|
+
{
|
120521
|
+
var error = $root.TW.Sui.Proto.RequestWithdrawStake.verify(message.requestWithdrawStake);
|
120522
|
+
if (error)
|
120523
|
+
return "requestWithdrawStake." + error;
|
120524
|
+
}
|
120525
|
+
}
|
120526
|
+
if (message.transferObject != null && message.hasOwnProperty("transferObject")) {
|
120527
|
+
if (properties.transactionPayload === 1)
|
120528
|
+
return "transactionPayload: multiple values";
|
120529
|
+
properties.transactionPayload = 1;
|
120530
|
+
{
|
120531
|
+
var error = $root.TW.Sui.Proto.TransferObject.verify(message.transferObject);
|
120532
|
+
if (error)
|
120533
|
+
return "transferObject." + error;
|
120534
|
+
}
|
120535
|
+
}
|
120536
|
+
if (message.gasBudget != null && message.hasOwnProperty("gasBudget"))
|
120537
|
+
if (!$util.isInteger(message.gasBudget) && !(message.gasBudget && $util.isInteger(message.gasBudget.low) && $util.isInteger(message.gasBudget.high)))
|
120538
|
+
return "gasBudget: integer|Long expected";
|
120539
|
+
if (message.referenceGasPrice != null && message.hasOwnProperty("referenceGasPrice"))
|
120540
|
+
if (!$util.isInteger(message.referenceGasPrice) && !(message.referenceGasPrice && $util.isInteger(message.referenceGasPrice.low) && $util.isInteger(message.referenceGasPrice.high)))
|
120541
|
+
return "referenceGasPrice: integer|Long expected";
|
117866
120542
|
return null;
|
117867
120543
|
};
|
117868
120544
|
|
@@ -117883,11 +120559,61 @@
|
|
117883
120559
|
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
117884
120560
|
else if (object.privateKey.length)
|
117885
120561
|
message.privateKey = object.privateKey;
|
120562
|
+
if (object.signer != null)
|
120563
|
+
message.signer = String(object.signer);
|
117886
120564
|
if (object.signDirectMessage != null) {
|
117887
120565
|
if (typeof object.signDirectMessage !== "object")
|
117888
120566
|
throw TypeError(".TW.Sui.Proto.SigningInput.signDirectMessage: object expected");
|
117889
120567
|
message.signDirectMessage = $root.TW.Sui.Proto.SignDirect.fromObject(object.signDirectMessage);
|
117890
120568
|
}
|
120569
|
+
if (object.pay != null) {
|
120570
|
+
if (typeof object.pay !== "object")
|
120571
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.pay: object expected");
|
120572
|
+
message.pay = $root.TW.Sui.Proto.Pay.fromObject(object.pay);
|
120573
|
+
}
|
120574
|
+
if (object.paySui != null) {
|
120575
|
+
if (typeof object.paySui !== "object")
|
120576
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.paySui: object expected");
|
120577
|
+
message.paySui = $root.TW.Sui.Proto.PaySui.fromObject(object.paySui);
|
120578
|
+
}
|
120579
|
+
if (object.payAllSui != null) {
|
120580
|
+
if (typeof object.payAllSui !== "object")
|
120581
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.payAllSui: object expected");
|
120582
|
+
message.payAllSui = $root.TW.Sui.Proto.PayAllSui.fromObject(object.payAllSui);
|
120583
|
+
}
|
120584
|
+
if (object.requestAddStake != null) {
|
120585
|
+
if (typeof object.requestAddStake !== "object")
|
120586
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.requestAddStake: object expected");
|
120587
|
+
message.requestAddStake = $root.TW.Sui.Proto.RequestAddStake.fromObject(object.requestAddStake);
|
120588
|
+
}
|
120589
|
+
if (object.requestWithdrawStake != null) {
|
120590
|
+
if (typeof object.requestWithdrawStake !== "object")
|
120591
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.requestWithdrawStake: object expected");
|
120592
|
+
message.requestWithdrawStake = $root.TW.Sui.Proto.RequestWithdrawStake.fromObject(object.requestWithdrawStake);
|
120593
|
+
}
|
120594
|
+
if (object.transferObject != null) {
|
120595
|
+
if (typeof object.transferObject !== "object")
|
120596
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.transferObject: object expected");
|
120597
|
+
message.transferObject = $root.TW.Sui.Proto.TransferObject.fromObject(object.transferObject);
|
120598
|
+
}
|
120599
|
+
if (object.gasBudget != null)
|
120600
|
+
if ($util.Long)
|
120601
|
+
(message.gasBudget = $util.Long.fromValue(object.gasBudget)).unsigned = true;
|
120602
|
+
else if (typeof object.gasBudget === "string")
|
120603
|
+
message.gasBudget = parseInt(object.gasBudget, 10);
|
120604
|
+
else if (typeof object.gasBudget === "number")
|
120605
|
+
message.gasBudget = object.gasBudget;
|
120606
|
+
else if (typeof object.gasBudget === "object")
|
120607
|
+
message.gasBudget = new $util.LongBits(object.gasBudget.low >>> 0, object.gasBudget.high >>> 0).toNumber(true);
|
120608
|
+
if (object.referenceGasPrice != null)
|
120609
|
+
if ($util.Long)
|
120610
|
+
(message.referenceGasPrice = $util.Long.fromValue(object.referenceGasPrice)).unsigned = true;
|
120611
|
+
else if (typeof object.referenceGasPrice === "string")
|
120612
|
+
message.referenceGasPrice = parseInt(object.referenceGasPrice, 10);
|
120613
|
+
else if (typeof object.referenceGasPrice === "number")
|
120614
|
+
message.referenceGasPrice = object.referenceGasPrice;
|
120615
|
+
else if (typeof object.referenceGasPrice === "object")
|
120616
|
+
message.referenceGasPrice = new $util.LongBits(object.referenceGasPrice.low >>> 0, object.referenceGasPrice.high >>> 0).toNumber(true);
|
117891
120617
|
return message;
|
117892
120618
|
};
|
117893
120619
|
|
@@ -117904,7 +120630,7 @@
|
|
117904
120630
|
if (!options)
|
117905
120631
|
options = {};
|
117906
120632
|
var object = {};
|
117907
|
-
if (options.defaults)
|
120633
|
+
if (options.defaults) {
|
117908
120634
|
if (options.bytes === String)
|
117909
120635
|
object.privateKey = "";
|
117910
120636
|
else {
|
@@ -117912,13 +120638,67 @@
|
|
117912
120638
|
if (options.bytes !== Array)
|
117913
120639
|
object.privateKey = $util.newBuffer(object.privateKey);
|
117914
120640
|
}
|
120641
|
+
object.signer = "";
|
120642
|
+
if ($util.Long) {
|
120643
|
+
var long = new $util.Long(0, 0, true);
|
120644
|
+
object.gasBudget = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
120645
|
+
} else
|
120646
|
+
object.gasBudget = options.longs === String ? "0" : 0;
|
120647
|
+
if ($util.Long) {
|
120648
|
+
var long = new $util.Long(0, 0, true);
|
120649
|
+
object.referenceGasPrice = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
120650
|
+
} else
|
120651
|
+
object.referenceGasPrice = options.longs === String ? "0" : 0;
|
120652
|
+
}
|
117915
120653
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
117916
120654
|
object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
|
120655
|
+
if (message.signer != null && message.hasOwnProperty("signer"))
|
120656
|
+
object.signer = message.signer;
|
117917
120657
|
if (message.signDirectMessage != null && message.hasOwnProperty("signDirectMessage")) {
|
117918
120658
|
object.signDirectMessage = $root.TW.Sui.Proto.SignDirect.toObject(message.signDirectMessage, options);
|
117919
120659
|
if (options.oneofs)
|
117920
120660
|
object.transactionPayload = "signDirectMessage";
|
117921
120661
|
}
|
120662
|
+
if (message.pay != null && message.hasOwnProperty("pay")) {
|
120663
|
+
object.pay = $root.TW.Sui.Proto.Pay.toObject(message.pay, options);
|
120664
|
+
if (options.oneofs)
|
120665
|
+
object.transactionPayload = "pay";
|
120666
|
+
}
|
120667
|
+
if (message.paySui != null && message.hasOwnProperty("paySui")) {
|
120668
|
+
object.paySui = $root.TW.Sui.Proto.PaySui.toObject(message.paySui, options);
|
120669
|
+
if (options.oneofs)
|
120670
|
+
object.transactionPayload = "paySui";
|
120671
|
+
}
|
120672
|
+
if (message.payAllSui != null && message.hasOwnProperty("payAllSui")) {
|
120673
|
+
object.payAllSui = $root.TW.Sui.Proto.PayAllSui.toObject(message.payAllSui, options);
|
120674
|
+
if (options.oneofs)
|
120675
|
+
object.transactionPayload = "payAllSui";
|
120676
|
+
}
|
120677
|
+
if (message.requestAddStake != null && message.hasOwnProperty("requestAddStake")) {
|
120678
|
+
object.requestAddStake = $root.TW.Sui.Proto.RequestAddStake.toObject(message.requestAddStake, options);
|
120679
|
+
if (options.oneofs)
|
120680
|
+
object.transactionPayload = "requestAddStake";
|
120681
|
+
}
|
120682
|
+
if (message.requestWithdrawStake != null && message.hasOwnProperty("requestWithdrawStake")) {
|
120683
|
+
object.requestWithdrawStake = $root.TW.Sui.Proto.RequestWithdrawStake.toObject(message.requestWithdrawStake, options);
|
120684
|
+
if (options.oneofs)
|
120685
|
+
object.transactionPayload = "requestWithdrawStake";
|
120686
|
+
}
|
120687
|
+
if (message.transferObject != null && message.hasOwnProperty("transferObject")) {
|
120688
|
+
object.transferObject = $root.TW.Sui.Proto.TransferObject.toObject(message.transferObject, options);
|
120689
|
+
if (options.oneofs)
|
120690
|
+
object.transactionPayload = "transferObject";
|
120691
|
+
}
|
120692
|
+
if (message.gasBudget != null && message.hasOwnProperty("gasBudget"))
|
120693
|
+
if (typeof message.gasBudget === "number")
|
120694
|
+
object.gasBudget = options.longs === String ? String(message.gasBudget) : message.gasBudget;
|
120695
|
+
else
|
120696
|
+
object.gasBudget = options.longs === String ? $util.Long.prototype.toString.call(message.gasBudget) : options.longs === Number ? new $util.LongBits(message.gasBudget.low >>> 0, message.gasBudget.high >>> 0).toNumber(true) : message.gasBudget;
|
120697
|
+
if (message.referenceGasPrice != null && message.hasOwnProperty("referenceGasPrice"))
|
120698
|
+
if (typeof message.referenceGasPrice === "number")
|
120699
|
+
object.referenceGasPrice = options.longs === String ? String(message.referenceGasPrice) : message.referenceGasPrice;
|
120700
|
+
else
|
120701
|
+
object.referenceGasPrice = options.longs === String ? $util.Long.prototype.toString.call(message.referenceGasPrice) : options.longs === Number ? new $util.LongBits(message.referenceGasPrice.low >>> 0, message.referenceGasPrice.high >>> 0).toNumber(true) : message.referenceGasPrice;
|
117922
120702
|
return object;
|
117923
120703
|
};
|
117924
120704
|
|