@trustwallet/wallet-core 4.0.34 → 4.0.35
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
|
|
@@ -69110,6 +69432,7 @@
|
|
69110
69432
|
* @property {Long|null} [amount] Transfer amount
|
69111
69433
|
* @property {Long|null} [memo] Transfer memo
|
69112
69434
|
* @property {Long|null} [currentTimestampNanos] Transfer currentTimestampNanos
|
69435
|
+
* @property {Long|null} [permittedDrift] Transfer permittedDrift
|
69113
69436
|
*/
|
69114
69437
|
|
69115
69438
|
/**
|
@@ -69159,6 +69482,14 @@
|
|
69159
69482
|
*/
|
69160
69483
|
Transfer.prototype.currentTimestampNanos = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
69161
69484
|
|
69485
|
+
/**
|
69486
|
+
* Transfer permittedDrift.
|
69487
|
+
* @member {Long} permittedDrift
|
69488
|
+
* @memberof TW.InternetComputer.Proto.Transaction.Transfer
|
69489
|
+
* @instance
|
69490
|
+
*/
|
69491
|
+
Transfer.prototype.permittedDrift = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
69492
|
+
|
69162
69493
|
/**
|
69163
69494
|
* Creates a new Transfer instance using the specified properties.
|
69164
69495
|
* @function create
|
@@ -69191,6 +69522,8 @@
|
|
69191
69522
|
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.memo);
|
69192
69523
|
if (message.currentTimestampNanos != null && Object.hasOwnProperty.call(message, "currentTimestampNanos"))
|
69193
69524
|
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.currentTimestampNanos);
|
69525
|
+
if (message.permittedDrift != null && Object.hasOwnProperty.call(message, "permittedDrift"))
|
69526
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.permittedDrift);
|
69194
69527
|
return writer;
|
69195
69528
|
};
|
69196
69529
|
|
@@ -69224,6 +69557,9 @@
|
|
69224
69557
|
case 4:
|
69225
69558
|
message.currentTimestampNanos = reader.uint64();
|
69226
69559
|
break;
|
69560
|
+
case 5:
|
69561
|
+
message.permittedDrift = reader.uint64();
|
69562
|
+
break;
|
69227
69563
|
default:
|
69228
69564
|
reader.skipType(tag & 7);
|
69229
69565
|
break;
|
@@ -69255,6 +69591,9 @@
|
|
69255
69591
|
if (message.currentTimestampNanos != null && message.hasOwnProperty("currentTimestampNanos"))
|
69256
69592
|
if (!$util.isInteger(message.currentTimestampNanos) && !(message.currentTimestampNanos && $util.isInteger(message.currentTimestampNanos.low) && $util.isInteger(message.currentTimestampNanos.high)))
|
69257
69593
|
return "currentTimestampNanos: integer|Long expected";
|
69594
|
+
if (message.permittedDrift != null && message.hasOwnProperty("permittedDrift"))
|
69595
|
+
if (!$util.isInteger(message.permittedDrift) && !(message.permittedDrift && $util.isInteger(message.permittedDrift.low) && $util.isInteger(message.permittedDrift.high)))
|
69596
|
+
return "permittedDrift: integer|Long expected";
|
69258
69597
|
return null;
|
69259
69598
|
};
|
69260
69599
|
|
@@ -69299,6 +69638,15 @@
|
|
69299
69638
|
message.currentTimestampNanos = object.currentTimestampNanos;
|
69300
69639
|
else if (typeof object.currentTimestampNanos === "object")
|
69301
69640
|
message.currentTimestampNanos = new $util.LongBits(object.currentTimestampNanos.low >>> 0, object.currentTimestampNanos.high >>> 0).toNumber(true);
|
69641
|
+
if (object.permittedDrift != null)
|
69642
|
+
if ($util.Long)
|
69643
|
+
(message.permittedDrift = $util.Long.fromValue(object.permittedDrift)).unsigned = true;
|
69644
|
+
else if (typeof object.permittedDrift === "string")
|
69645
|
+
message.permittedDrift = parseInt(object.permittedDrift, 10);
|
69646
|
+
else if (typeof object.permittedDrift === "number")
|
69647
|
+
message.permittedDrift = object.permittedDrift;
|
69648
|
+
else if (typeof object.permittedDrift === "object")
|
69649
|
+
message.permittedDrift = new $util.LongBits(object.permittedDrift.low >>> 0, object.permittedDrift.high >>> 0).toNumber(true);
|
69302
69650
|
return message;
|
69303
69651
|
};
|
69304
69652
|
|
@@ -69332,6 +69680,11 @@
|
|
69332
69680
|
object.currentTimestampNanos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
69333
69681
|
} else
|
69334
69682
|
object.currentTimestampNanos = options.longs === String ? "0" : 0;
|
69683
|
+
if ($util.Long) {
|
69684
|
+
var long = new $util.Long(0, 0, true);
|
69685
|
+
object.permittedDrift = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
69686
|
+
} else
|
69687
|
+
object.permittedDrift = options.longs === String ? "0" : 0;
|
69335
69688
|
}
|
69336
69689
|
if (message.toAccountIdentifier != null && message.hasOwnProperty("toAccountIdentifier"))
|
69337
69690
|
object.toAccountIdentifier = message.toAccountIdentifier;
|
@@ -69350,6 +69703,11 @@
|
|
69350
69703
|
object.currentTimestampNanos = options.longs === String ? String(message.currentTimestampNanos) : message.currentTimestampNanos;
|
69351
69704
|
else
|
69352
69705
|
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;
|
69706
|
+
if (message.permittedDrift != null && message.hasOwnProperty("permittedDrift"))
|
69707
|
+
if (typeof message.permittedDrift === "number")
|
69708
|
+
object.permittedDrift = options.longs === String ? String(message.permittedDrift) : message.permittedDrift;
|
69709
|
+
else
|
69710
|
+
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
69711
|
return object;
|
69354
69712
|
};
|
69355
69713
|
|
@@ -117564,6 +117922,395 @@
|
|
117564
117922
|
*/
|
117565
117923
|
var Proto = {};
|
117566
117924
|
|
117925
|
+
Proto.ObjectRef = (function() {
|
117926
|
+
|
117927
|
+
/**
|
117928
|
+
* Properties of an ObjectRef.
|
117929
|
+
* @memberof TW.Sui.Proto
|
117930
|
+
* @interface IObjectRef
|
117931
|
+
* @property {string|null} [objectId] ObjectRef objectId
|
117932
|
+
* @property {Long|null} [version] ObjectRef version
|
117933
|
+
* @property {string|null} [objectDigest] ObjectRef objectDigest
|
117934
|
+
*/
|
117935
|
+
|
117936
|
+
/**
|
117937
|
+
* Constructs a new ObjectRef.
|
117938
|
+
* @memberof TW.Sui.Proto
|
117939
|
+
* @classdesc Represents an ObjectRef.
|
117940
|
+
* @implements IObjectRef
|
117941
|
+
* @constructor
|
117942
|
+
* @param {TW.Sui.Proto.IObjectRef=} [properties] Properties to set
|
117943
|
+
*/
|
117944
|
+
function ObjectRef(properties) {
|
117945
|
+
if (properties)
|
117946
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
117947
|
+
if (properties[keys[i]] != null)
|
117948
|
+
this[keys[i]] = properties[keys[i]];
|
117949
|
+
}
|
117950
|
+
|
117951
|
+
/**
|
117952
|
+
* ObjectRef objectId.
|
117953
|
+
* @member {string} objectId
|
117954
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
117955
|
+
* @instance
|
117956
|
+
*/
|
117957
|
+
ObjectRef.prototype.objectId = "";
|
117958
|
+
|
117959
|
+
/**
|
117960
|
+
* ObjectRef version.
|
117961
|
+
* @member {Long} version
|
117962
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
117963
|
+
* @instance
|
117964
|
+
*/
|
117965
|
+
ObjectRef.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
117966
|
+
|
117967
|
+
/**
|
117968
|
+
* ObjectRef objectDigest.
|
117969
|
+
* @member {string} objectDigest
|
117970
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
117971
|
+
* @instance
|
117972
|
+
*/
|
117973
|
+
ObjectRef.prototype.objectDigest = "";
|
117974
|
+
|
117975
|
+
/**
|
117976
|
+
* Creates a new ObjectRef instance using the specified properties.
|
117977
|
+
* @function create
|
117978
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
117979
|
+
* @static
|
117980
|
+
* @param {TW.Sui.Proto.IObjectRef=} [properties] Properties to set
|
117981
|
+
* @returns {TW.Sui.Proto.ObjectRef} ObjectRef instance
|
117982
|
+
*/
|
117983
|
+
ObjectRef.create = function create(properties) {
|
117984
|
+
return new ObjectRef(properties);
|
117985
|
+
};
|
117986
|
+
|
117987
|
+
/**
|
117988
|
+
* Encodes the specified ObjectRef message. Does not implicitly {@link TW.Sui.Proto.ObjectRef.verify|verify} messages.
|
117989
|
+
* @function encode
|
117990
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
117991
|
+
* @static
|
117992
|
+
* @param {TW.Sui.Proto.IObjectRef} message ObjectRef message or plain object to encode
|
117993
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
117994
|
+
* @returns {$protobuf.Writer} Writer
|
117995
|
+
*/
|
117996
|
+
ObjectRef.encode = function encode(message, writer) {
|
117997
|
+
if (!writer)
|
117998
|
+
writer = $Writer.create();
|
117999
|
+
if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId"))
|
118000
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.objectId);
|
118001
|
+
if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
118002
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version);
|
118003
|
+
if (message.objectDigest != null && Object.hasOwnProperty.call(message, "objectDigest"))
|
118004
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.objectDigest);
|
118005
|
+
return writer;
|
118006
|
+
};
|
118007
|
+
|
118008
|
+
/**
|
118009
|
+
* Decodes an ObjectRef message from the specified reader or buffer.
|
118010
|
+
* @function decode
|
118011
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118012
|
+
* @static
|
118013
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118014
|
+
* @param {number} [length] Message length if known beforehand
|
118015
|
+
* @returns {TW.Sui.Proto.ObjectRef} ObjectRef
|
118016
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118017
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118018
|
+
*/
|
118019
|
+
ObjectRef.decode = function decode(reader, length) {
|
118020
|
+
if (!(reader instanceof $Reader))
|
118021
|
+
reader = $Reader.create(reader);
|
118022
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.ObjectRef();
|
118023
|
+
while (reader.pos < end) {
|
118024
|
+
var tag = reader.uint32();
|
118025
|
+
switch (tag >>> 3) {
|
118026
|
+
case 1:
|
118027
|
+
message.objectId = reader.string();
|
118028
|
+
break;
|
118029
|
+
case 2:
|
118030
|
+
message.version = reader.uint64();
|
118031
|
+
break;
|
118032
|
+
case 3:
|
118033
|
+
message.objectDigest = reader.string();
|
118034
|
+
break;
|
118035
|
+
default:
|
118036
|
+
reader.skipType(tag & 7);
|
118037
|
+
break;
|
118038
|
+
}
|
118039
|
+
}
|
118040
|
+
return message;
|
118041
|
+
};
|
118042
|
+
|
118043
|
+
/**
|
118044
|
+
* Verifies an ObjectRef message.
|
118045
|
+
* @function verify
|
118046
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118047
|
+
* @static
|
118048
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118049
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118050
|
+
*/
|
118051
|
+
ObjectRef.verify = function verify(message) {
|
118052
|
+
if (typeof message !== "object" || message === null)
|
118053
|
+
return "object expected";
|
118054
|
+
if (message.objectId != null && message.hasOwnProperty("objectId"))
|
118055
|
+
if (!$util.isString(message.objectId))
|
118056
|
+
return "objectId: string expected";
|
118057
|
+
if (message.version != null && message.hasOwnProperty("version"))
|
118058
|
+
if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
|
118059
|
+
return "version: integer|Long expected";
|
118060
|
+
if (message.objectDigest != null && message.hasOwnProperty("objectDigest"))
|
118061
|
+
if (!$util.isString(message.objectDigest))
|
118062
|
+
return "objectDigest: string expected";
|
118063
|
+
return null;
|
118064
|
+
};
|
118065
|
+
|
118066
|
+
/**
|
118067
|
+
* Creates an ObjectRef message from a plain object. Also converts values to their respective internal types.
|
118068
|
+
* @function fromObject
|
118069
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118070
|
+
* @static
|
118071
|
+
* @param {Object.<string,*>} object Plain object
|
118072
|
+
* @returns {TW.Sui.Proto.ObjectRef} ObjectRef
|
118073
|
+
*/
|
118074
|
+
ObjectRef.fromObject = function fromObject(object) {
|
118075
|
+
if (object instanceof $root.TW.Sui.Proto.ObjectRef)
|
118076
|
+
return object;
|
118077
|
+
var message = new $root.TW.Sui.Proto.ObjectRef();
|
118078
|
+
if (object.objectId != null)
|
118079
|
+
message.objectId = String(object.objectId);
|
118080
|
+
if (object.version != null)
|
118081
|
+
if ($util.Long)
|
118082
|
+
(message.version = $util.Long.fromValue(object.version)).unsigned = true;
|
118083
|
+
else if (typeof object.version === "string")
|
118084
|
+
message.version = parseInt(object.version, 10);
|
118085
|
+
else if (typeof object.version === "number")
|
118086
|
+
message.version = object.version;
|
118087
|
+
else if (typeof object.version === "object")
|
118088
|
+
message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true);
|
118089
|
+
if (object.objectDigest != null)
|
118090
|
+
message.objectDigest = String(object.objectDigest);
|
118091
|
+
return message;
|
118092
|
+
};
|
118093
|
+
|
118094
|
+
/**
|
118095
|
+
* Creates a plain object from an ObjectRef message. Also converts values to other types if specified.
|
118096
|
+
* @function toObject
|
118097
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118098
|
+
* @static
|
118099
|
+
* @param {TW.Sui.Proto.ObjectRef} message ObjectRef
|
118100
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
118101
|
+
* @returns {Object.<string,*>} Plain object
|
118102
|
+
*/
|
118103
|
+
ObjectRef.toObject = function toObject(message, options) {
|
118104
|
+
if (!options)
|
118105
|
+
options = {};
|
118106
|
+
var object = {};
|
118107
|
+
if (options.defaults) {
|
118108
|
+
object.objectId = "";
|
118109
|
+
if ($util.Long) {
|
118110
|
+
var long = new $util.Long(0, 0, true);
|
118111
|
+
object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
118112
|
+
} else
|
118113
|
+
object.version = options.longs === String ? "0" : 0;
|
118114
|
+
object.objectDigest = "";
|
118115
|
+
}
|
118116
|
+
if (message.objectId != null && message.hasOwnProperty("objectId"))
|
118117
|
+
object.objectId = message.objectId;
|
118118
|
+
if (message.version != null && message.hasOwnProperty("version"))
|
118119
|
+
if (typeof message.version === "number")
|
118120
|
+
object.version = options.longs === String ? String(message.version) : message.version;
|
118121
|
+
else
|
118122
|
+
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;
|
118123
|
+
if (message.objectDigest != null && message.hasOwnProperty("objectDigest"))
|
118124
|
+
object.objectDigest = message.objectDigest;
|
118125
|
+
return object;
|
118126
|
+
};
|
118127
|
+
|
118128
|
+
/**
|
118129
|
+
* Converts this ObjectRef to JSON.
|
118130
|
+
* @function toJSON
|
118131
|
+
* @memberof TW.Sui.Proto.ObjectRef
|
118132
|
+
* @instance
|
118133
|
+
* @returns {Object.<string,*>} JSON object
|
118134
|
+
*/
|
118135
|
+
ObjectRef.prototype.toJSON = function toJSON() {
|
118136
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
118137
|
+
};
|
118138
|
+
|
118139
|
+
return ObjectRef;
|
118140
|
+
})();
|
118141
|
+
|
118142
|
+
Proto.Amount = (function() {
|
118143
|
+
|
118144
|
+
/**
|
118145
|
+
* Properties of an Amount.
|
118146
|
+
* @memberof TW.Sui.Proto
|
118147
|
+
* @interface IAmount
|
118148
|
+
* @property {Long|null} [amount] Amount amount
|
118149
|
+
*/
|
118150
|
+
|
118151
|
+
/**
|
118152
|
+
* Constructs a new Amount.
|
118153
|
+
* @memberof TW.Sui.Proto
|
118154
|
+
* @classdesc Represents an Amount.
|
118155
|
+
* @implements IAmount
|
118156
|
+
* @constructor
|
118157
|
+
* @param {TW.Sui.Proto.IAmount=} [properties] Properties to set
|
118158
|
+
*/
|
118159
|
+
function Amount(properties) {
|
118160
|
+
if (properties)
|
118161
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
118162
|
+
if (properties[keys[i]] != null)
|
118163
|
+
this[keys[i]] = properties[keys[i]];
|
118164
|
+
}
|
118165
|
+
|
118166
|
+
/**
|
118167
|
+
* Amount amount.
|
118168
|
+
* @member {Long} amount
|
118169
|
+
* @memberof TW.Sui.Proto.Amount
|
118170
|
+
* @instance
|
118171
|
+
*/
|
118172
|
+
Amount.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
118173
|
+
|
118174
|
+
/**
|
118175
|
+
* Creates a new Amount instance using the specified properties.
|
118176
|
+
* @function create
|
118177
|
+
* @memberof TW.Sui.Proto.Amount
|
118178
|
+
* @static
|
118179
|
+
* @param {TW.Sui.Proto.IAmount=} [properties] Properties to set
|
118180
|
+
* @returns {TW.Sui.Proto.Amount} Amount instance
|
118181
|
+
*/
|
118182
|
+
Amount.create = function create(properties) {
|
118183
|
+
return new Amount(properties);
|
118184
|
+
};
|
118185
|
+
|
118186
|
+
/**
|
118187
|
+
* Encodes the specified Amount message. Does not implicitly {@link TW.Sui.Proto.Amount.verify|verify} messages.
|
118188
|
+
* @function encode
|
118189
|
+
* @memberof TW.Sui.Proto.Amount
|
118190
|
+
* @static
|
118191
|
+
* @param {TW.Sui.Proto.IAmount} message Amount message or plain object to encode
|
118192
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
118193
|
+
* @returns {$protobuf.Writer} Writer
|
118194
|
+
*/
|
118195
|
+
Amount.encode = function encode(message, writer) {
|
118196
|
+
if (!writer)
|
118197
|
+
writer = $Writer.create();
|
118198
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
118199
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.amount);
|
118200
|
+
return writer;
|
118201
|
+
};
|
118202
|
+
|
118203
|
+
/**
|
118204
|
+
* Decodes an Amount message from the specified reader or buffer.
|
118205
|
+
* @function decode
|
118206
|
+
* @memberof TW.Sui.Proto.Amount
|
118207
|
+
* @static
|
118208
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118209
|
+
* @param {number} [length] Message length if known beforehand
|
118210
|
+
* @returns {TW.Sui.Proto.Amount} Amount
|
118211
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118212
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118213
|
+
*/
|
118214
|
+
Amount.decode = function decode(reader, length) {
|
118215
|
+
if (!(reader instanceof $Reader))
|
118216
|
+
reader = $Reader.create(reader);
|
118217
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.Amount();
|
118218
|
+
while (reader.pos < end) {
|
118219
|
+
var tag = reader.uint32();
|
118220
|
+
switch (tag >>> 3) {
|
118221
|
+
case 1:
|
118222
|
+
message.amount = reader.uint64();
|
118223
|
+
break;
|
118224
|
+
default:
|
118225
|
+
reader.skipType(tag & 7);
|
118226
|
+
break;
|
118227
|
+
}
|
118228
|
+
}
|
118229
|
+
return message;
|
118230
|
+
};
|
118231
|
+
|
118232
|
+
/**
|
118233
|
+
* Verifies an Amount message.
|
118234
|
+
* @function verify
|
118235
|
+
* @memberof TW.Sui.Proto.Amount
|
118236
|
+
* @static
|
118237
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118238
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118239
|
+
*/
|
118240
|
+
Amount.verify = function verify(message) {
|
118241
|
+
if (typeof message !== "object" || message === null)
|
118242
|
+
return "object expected";
|
118243
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
118244
|
+
if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
|
118245
|
+
return "amount: integer|Long expected";
|
118246
|
+
return null;
|
118247
|
+
};
|
118248
|
+
|
118249
|
+
/**
|
118250
|
+
* Creates an Amount message from a plain object. Also converts values to their respective internal types.
|
118251
|
+
* @function fromObject
|
118252
|
+
* @memberof TW.Sui.Proto.Amount
|
118253
|
+
* @static
|
118254
|
+
* @param {Object.<string,*>} object Plain object
|
118255
|
+
* @returns {TW.Sui.Proto.Amount} Amount
|
118256
|
+
*/
|
118257
|
+
Amount.fromObject = function fromObject(object) {
|
118258
|
+
if (object instanceof $root.TW.Sui.Proto.Amount)
|
118259
|
+
return object;
|
118260
|
+
var message = new $root.TW.Sui.Proto.Amount();
|
118261
|
+
if (object.amount != null)
|
118262
|
+
if ($util.Long)
|
118263
|
+
(message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
|
118264
|
+
else if (typeof object.amount === "string")
|
118265
|
+
message.amount = parseInt(object.amount, 10);
|
118266
|
+
else if (typeof object.amount === "number")
|
118267
|
+
message.amount = object.amount;
|
118268
|
+
else if (typeof object.amount === "object")
|
118269
|
+
message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
|
118270
|
+
return message;
|
118271
|
+
};
|
118272
|
+
|
118273
|
+
/**
|
118274
|
+
* Creates a plain object from an Amount message. Also converts values to other types if specified.
|
118275
|
+
* @function toObject
|
118276
|
+
* @memberof TW.Sui.Proto.Amount
|
118277
|
+
* @static
|
118278
|
+
* @param {TW.Sui.Proto.Amount} message Amount
|
118279
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
118280
|
+
* @returns {Object.<string,*>} Plain object
|
118281
|
+
*/
|
118282
|
+
Amount.toObject = function toObject(message, options) {
|
118283
|
+
if (!options)
|
118284
|
+
options = {};
|
118285
|
+
var object = {};
|
118286
|
+
if (options.defaults)
|
118287
|
+
if ($util.Long) {
|
118288
|
+
var long = new $util.Long(0, 0, true);
|
118289
|
+
object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
118290
|
+
} else
|
118291
|
+
object.amount = options.longs === String ? "0" : 0;
|
118292
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
118293
|
+
if (typeof message.amount === "number")
|
118294
|
+
object.amount = options.longs === String ? String(message.amount) : message.amount;
|
118295
|
+
else
|
118296
|
+
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;
|
118297
|
+
return object;
|
118298
|
+
};
|
118299
|
+
|
118300
|
+
/**
|
118301
|
+
* Converts this Amount to JSON.
|
118302
|
+
* @function toJSON
|
118303
|
+
* @memberof TW.Sui.Proto.Amount
|
118304
|
+
* @instance
|
118305
|
+
* @returns {Object.<string,*>} JSON object
|
118306
|
+
*/
|
118307
|
+
Amount.prototype.toJSON = function toJSON() {
|
118308
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
118309
|
+
};
|
118310
|
+
|
118311
|
+
return Amount;
|
118312
|
+
})();
|
118313
|
+
|
117567
118314
|
Proto.SignDirect = (function() {
|
117568
118315
|
|
117569
118316
|
/**
|
@@ -117722,6 +118469,1445 @@
|
|
117722
118469
|
return SignDirect;
|
117723
118470
|
})();
|
117724
118471
|
|
118472
|
+
Proto.Pay = (function() {
|
118473
|
+
|
118474
|
+
/**
|
118475
|
+
* Properties of a Pay.
|
118476
|
+
* @memberof TW.Sui.Proto
|
118477
|
+
* @interface IPay
|
118478
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [inputCoins] Pay inputCoins
|
118479
|
+
* @property {Array.<string>|null} [recipients] Pay recipients
|
118480
|
+
* @property {Array.<Long>|null} [amounts] Pay amounts
|
118481
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] Pay gas
|
118482
|
+
*/
|
118483
|
+
|
118484
|
+
/**
|
118485
|
+
* Constructs a new Pay.
|
118486
|
+
* @memberof TW.Sui.Proto
|
118487
|
+
* @classdesc Represents a Pay.
|
118488
|
+
* @implements IPay
|
118489
|
+
* @constructor
|
118490
|
+
* @param {TW.Sui.Proto.IPay=} [properties] Properties to set
|
118491
|
+
*/
|
118492
|
+
function Pay(properties) {
|
118493
|
+
this.inputCoins = [];
|
118494
|
+
this.recipients = [];
|
118495
|
+
this.amounts = [];
|
118496
|
+
if (properties)
|
118497
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
118498
|
+
if (properties[keys[i]] != null)
|
118499
|
+
this[keys[i]] = properties[keys[i]];
|
118500
|
+
}
|
118501
|
+
|
118502
|
+
/**
|
118503
|
+
* Pay inputCoins.
|
118504
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} inputCoins
|
118505
|
+
* @memberof TW.Sui.Proto.Pay
|
118506
|
+
* @instance
|
118507
|
+
*/
|
118508
|
+
Pay.prototype.inputCoins = $util.emptyArray;
|
118509
|
+
|
118510
|
+
/**
|
118511
|
+
* Pay recipients.
|
118512
|
+
* @member {Array.<string>} recipients
|
118513
|
+
* @memberof TW.Sui.Proto.Pay
|
118514
|
+
* @instance
|
118515
|
+
*/
|
118516
|
+
Pay.prototype.recipients = $util.emptyArray;
|
118517
|
+
|
118518
|
+
/**
|
118519
|
+
* Pay amounts.
|
118520
|
+
* @member {Array.<Long>} amounts
|
118521
|
+
* @memberof TW.Sui.Proto.Pay
|
118522
|
+
* @instance
|
118523
|
+
*/
|
118524
|
+
Pay.prototype.amounts = $util.emptyArray;
|
118525
|
+
|
118526
|
+
/**
|
118527
|
+
* Pay gas.
|
118528
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
118529
|
+
* @memberof TW.Sui.Proto.Pay
|
118530
|
+
* @instance
|
118531
|
+
*/
|
118532
|
+
Pay.prototype.gas = null;
|
118533
|
+
|
118534
|
+
/**
|
118535
|
+
* Creates a new Pay instance using the specified properties.
|
118536
|
+
* @function create
|
118537
|
+
* @memberof TW.Sui.Proto.Pay
|
118538
|
+
* @static
|
118539
|
+
* @param {TW.Sui.Proto.IPay=} [properties] Properties to set
|
118540
|
+
* @returns {TW.Sui.Proto.Pay} Pay instance
|
118541
|
+
*/
|
118542
|
+
Pay.create = function create(properties) {
|
118543
|
+
return new Pay(properties);
|
118544
|
+
};
|
118545
|
+
|
118546
|
+
/**
|
118547
|
+
* Encodes the specified Pay message. Does not implicitly {@link TW.Sui.Proto.Pay.verify|verify} messages.
|
118548
|
+
* @function encode
|
118549
|
+
* @memberof TW.Sui.Proto.Pay
|
118550
|
+
* @static
|
118551
|
+
* @param {TW.Sui.Proto.IPay} message Pay message or plain object to encode
|
118552
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
118553
|
+
* @returns {$protobuf.Writer} Writer
|
118554
|
+
*/
|
118555
|
+
Pay.encode = function encode(message, writer) {
|
118556
|
+
if (!writer)
|
118557
|
+
writer = $Writer.create();
|
118558
|
+
if (message.inputCoins != null && message.inputCoins.length)
|
118559
|
+
for (var i = 0; i < message.inputCoins.length; ++i)
|
118560
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.inputCoins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
118561
|
+
if (message.recipients != null && message.recipients.length)
|
118562
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
118563
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipients[i]);
|
118564
|
+
if (message.amounts != null && message.amounts.length) {
|
118565
|
+
writer.uint32(/* id 3, wireType 2 =*/26).fork();
|
118566
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
118567
|
+
writer.uint64(message.amounts[i]);
|
118568
|
+
writer.ldelim();
|
118569
|
+
}
|
118570
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
118571
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
118572
|
+
return writer;
|
118573
|
+
};
|
118574
|
+
|
118575
|
+
/**
|
118576
|
+
* Decodes a Pay message from the specified reader or buffer.
|
118577
|
+
* @function decode
|
118578
|
+
* @memberof TW.Sui.Proto.Pay
|
118579
|
+
* @static
|
118580
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118581
|
+
* @param {number} [length] Message length if known beforehand
|
118582
|
+
* @returns {TW.Sui.Proto.Pay} Pay
|
118583
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118584
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118585
|
+
*/
|
118586
|
+
Pay.decode = function decode(reader, length) {
|
118587
|
+
if (!(reader instanceof $Reader))
|
118588
|
+
reader = $Reader.create(reader);
|
118589
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.Pay();
|
118590
|
+
while (reader.pos < end) {
|
118591
|
+
var tag = reader.uint32();
|
118592
|
+
switch (tag >>> 3) {
|
118593
|
+
case 1:
|
118594
|
+
if (!(message.inputCoins && message.inputCoins.length))
|
118595
|
+
message.inputCoins = [];
|
118596
|
+
message.inputCoins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
118597
|
+
break;
|
118598
|
+
case 2:
|
118599
|
+
if (!(message.recipients && message.recipients.length))
|
118600
|
+
message.recipients = [];
|
118601
|
+
message.recipients.push(reader.string());
|
118602
|
+
break;
|
118603
|
+
case 3:
|
118604
|
+
if (!(message.amounts && message.amounts.length))
|
118605
|
+
message.amounts = [];
|
118606
|
+
if ((tag & 7) === 2) {
|
118607
|
+
var end2 = reader.uint32() + reader.pos;
|
118608
|
+
while (reader.pos < end2)
|
118609
|
+
message.amounts.push(reader.uint64());
|
118610
|
+
} else
|
118611
|
+
message.amounts.push(reader.uint64());
|
118612
|
+
break;
|
118613
|
+
case 4:
|
118614
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
118615
|
+
break;
|
118616
|
+
default:
|
118617
|
+
reader.skipType(tag & 7);
|
118618
|
+
break;
|
118619
|
+
}
|
118620
|
+
}
|
118621
|
+
return message;
|
118622
|
+
};
|
118623
|
+
|
118624
|
+
/**
|
118625
|
+
* Verifies a Pay message.
|
118626
|
+
* @function verify
|
118627
|
+
* @memberof TW.Sui.Proto.Pay
|
118628
|
+
* @static
|
118629
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118630
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118631
|
+
*/
|
118632
|
+
Pay.verify = function verify(message) {
|
118633
|
+
if (typeof message !== "object" || message === null)
|
118634
|
+
return "object expected";
|
118635
|
+
if (message.inputCoins != null && message.hasOwnProperty("inputCoins")) {
|
118636
|
+
if (!Array.isArray(message.inputCoins))
|
118637
|
+
return "inputCoins: array expected";
|
118638
|
+
for (var i = 0; i < message.inputCoins.length; ++i) {
|
118639
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.inputCoins[i]);
|
118640
|
+
if (error)
|
118641
|
+
return "inputCoins." + error;
|
118642
|
+
}
|
118643
|
+
}
|
118644
|
+
if (message.recipients != null && message.hasOwnProperty("recipients")) {
|
118645
|
+
if (!Array.isArray(message.recipients))
|
118646
|
+
return "recipients: array expected";
|
118647
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
118648
|
+
if (!$util.isString(message.recipients[i]))
|
118649
|
+
return "recipients: string[] expected";
|
118650
|
+
}
|
118651
|
+
if (message.amounts != null && message.hasOwnProperty("amounts")) {
|
118652
|
+
if (!Array.isArray(message.amounts))
|
118653
|
+
return "amounts: array expected";
|
118654
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
118655
|
+
if (!$util.isInteger(message.amounts[i]) && !(message.amounts[i] && $util.isInteger(message.amounts[i].low) && $util.isInteger(message.amounts[i].high)))
|
118656
|
+
return "amounts: integer|Long[] expected";
|
118657
|
+
}
|
118658
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
118659
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
118660
|
+
if (error)
|
118661
|
+
return "gas." + error;
|
118662
|
+
}
|
118663
|
+
return null;
|
118664
|
+
};
|
118665
|
+
|
118666
|
+
/**
|
118667
|
+
* Creates a Pay message from a plain object. Also converts values to their respective internal types.
|
118668
|
+
* @function fromObject
|
118669
|
+
* @memberof TW.Sui.Proto.Pay
|
118670
|
+
* @static
|
118671
|
+
* @param {Object.<string,*>} object Plain object
|
118672
|
+
* @returns {TW.Sui.Proto.Pay} Pay
|
118673
|
+
*/
|
118674
|
+
Pay.fromObject = function fromObject(object) {
|
118675
|
+
if (object instanceof $root.TW.Sui.Proto.Pay)
|
118676
|
+
return object;
|
118677
|
+
var message = new $root.TW.Sui.Proto.Pay();
|
118678
|
+
if (object.inputCoins) {
|
118679
|
+
if (!Array.isArray(object.inputCoins))
|
118680
|
+
throw TypeError(".TW.Sui.Proto.Pay.inputCoins: array expected");
|
118681
|
+
message.inputCoins = [];
|
118682
|
+
for (var i = 0; i < object.inputCoins.length; ++i) {
|
118683
|
+
if (typeof object.inputCoins[i] !== "object")
|
118684
|
+
throw TypeError(".TW.Sui.Proto.Pay.inputCoins: object expected");
|
118685
|
+
message.inputCoins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.inputCoins[i]);
|
118686
|
+
}
|
118687
|
+
}
|
118688
|
+
if (object.recipients) {
|
118689
|
+
if (!Array.isArray(object.recipients))
|
118690
|
+
throw TypeError(".TW.Sui.Proto.Pay.recipients: array expected");
|
118691
|
+
message.recipients = [];
|
118692
|
+
for (var i = 0; i < object.recipients.length; ++i)
|
118693
|
+
message.recipients[i] = String(object.recipients[i]);
|
118694
|
+
}
|
118695
|
+
if (object.amounts) {
|
118696
|
+
if (!Array.isArray(object.amounts))
|
118697
|
+
throw TypeError(".TW.Sui.Proto.Pay.amounts: array expected");
|
118698
|
+
message.amounts = [];
|
118699
|
+
for (var i = 0; i < object.amounts.length; ++i)
|
118700
|
+
if ($util.Long)
|
118701
|
+
(message.amounts[i] = $util.Long.fromValue(object.amounts[i])).unsigned = true;
|
118702
|
+
else if (typeof object.amounts[i] === "string")
|
118703
|
+
message.amounts[i] = parseInt(object.amounts[i], 10);
|
118704
|
+
else if (typeof object.amounts[i] === "number")
|
118705
|
+
message.amounts[i] = object.amounts[i];
|
118706
|
+
else if (typeof object.amounts[i] === "object")
|
118707
|
+
message.amounts[i] = new $util.LongBits(object.amounts[i].low >>> 0, object.amounts[i].high >>> 0).toNumber(true);
|
118708
|
+
}
|
118709
|
+
if (object.gas != null) {
|
118710
|
+
if (typeof object.gas !== "object")
|
118711
|
+
throw TypeError(".TW.Sui.Proto.Pay.gas: object expected");
|
118712
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
118713
|
+
}
|
118714
|
+
return message;
|
118715
|
+
};
|
118716
|
+
|
118717
|
+
/**
|
118718
|
+
* Creates a plain object from a Pay message. Also converts values to other types if specified.
|
118719
|
+
* @function toObject
|
118720
|
+
* @memberof TW.Sui.Proto.Pay
|
118721
|
+
* @static
|
118722
|
+
* @param {TW.Sui.Proto.Pay} message Pay
|
118723
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
118724
|
+
* @returns {Object.<string,*>} Plain object
|
118725
|
+
*/
|
118726
|
+
Pay.toObject = function toObject(message, options) {
|
118727
|
+
if (!options)
|
118728
|
+
options = {};
|
118729
|
+
var object = {};
|
118730
|
+
if (options.arrays || options.defaults) {
|
118731
|
+
object.inputCoins = [];
|
118732
|
+
object.recipients = [];
|
118733
|
+
object.amounts = [];
|
118734
|
+
}
|
118735
|
+
if (options.defaults)
|
118736
|
+
object.gas = null;
|
118737
|
+
if (message.inputCoins && message.inputCoins.length) {
|
118738
|
+
object.inputCoins = [];
|
118739
|
+
for (var j = 0; j < message.inputCoins.length; ++j)
|
118740
|
+
object.inputCoins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.inputCoins[j], options);
|
118741
|
+
}
|
118742
|
+
if (message.recipients && message.recipients.length) {
|
118743
|
+
object.recipients = [];
|
118744
|
+
for (var j = 0; j < message.recipients.length; ++j)
|
118745
|
+
object.recipients[j] = message.recipients[j];
|
118746
|
+
}
|
118747
|
+
if (message.amounts && message.amounts.length) {
|
118748
|
+
object.amounts = [];
|
118749
|
+
for (var j = 0; j < message.amounts.length; ++j)
|
118750
|
+
if (typeof message.amounts[j] === "number")
|
118751
|
+
object.amounts[j] = options.longs === String ? String(message.amounts[j]) : message.amounts[j];
|
118752
|
+
else
|
118753
|
+
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];
|
118754
|
+
}
|
118755
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
118756
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
118757
|
+
return object;
|
118758
|
+
};
|
118759
|
+
|
118760
|
+
/**
|
118761
|
+
* Converts this Pay to JSON.
|
118762
|
+
* @function toJSON
|
118763
|
+
* @memberof TW.Sui.Proto.Pay
|
118764
|
+
* @instance
|
118765
|
+
* @returns {Object.<string,*>} JSON object
|
118766
|
+
*/
|
118767
|
+
Pay.prototype.toJSON = function toJSON() {
|
118768
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
118769
|
+
};
|
118770
|
+
|
118771
|
+
return Pay;
|
118772
|
+
})();
|
118773
|
+
|
118774
|
+
Proto.PaySui = (function() {
|
118775
|
+
|
118776
|
+
/**
|
118777
|
+
* Properties of a PaySui.
|
118778
|
+
* @memberof TW.Sui.Proto
|
118779
|
+
* @interface IPaySui
|
118780
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [inputCoins] PaySui inputCoins
|
118781
|
+
* @property {Array.<string>|null} [recipients] PaySui recipients
|
118782
|
+
* @property {Array.<Long>|null} [amounts] PaySui amounts
|
118783
|
+
*/
|
118784
|
+
|
118785
|
+
/**
|
118786
|
+
* Constructs a new PaySui.
|
118787
|
+
* @memberof TW.Sui.Proto
|
118788
|
+
* @classdesc Represents a PaySui.
|
118789
|
+
* @implements IPaySui
|
118790
|
+
* @constructor
|
118791
|
+
* @param {TW.Sui.Proto.IPaySui=} [properties] Properties to set
|
118792
|
+
*/
|
118793
|
+
function PaySui(properties) {
|
118794
|
+
this.inputCoins = [];
|
118795
|
+
this.recipients = [];
|
118796
|
+
this.amounts = [];
|
118797
|
+
if (properties)
|
118798
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
118799
|
+
if (properties[keys[i]] != null)
|
118800
|
+
this[keys[i]] = properties[keys[i]];
|
118801
|
+
}
|
118802
|
+
|
118803
|
+
/**
|
118804
|
+
* PaySui inputCoins.
|
118805
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} inputCoins
|
118806
|
+
* @memberof TW.Sui.Proto.PaySui
|
118807
|
+
* @instance
|
118808
|
+
*/
|
118809
|
+
PaySui.prototype.inputCoins = $util.emptyArray;
|
118810
|
+
|
118811
|
+
/**
|
118812
|
+
* PaySui recipients.
|
118813
|
+
* @member {Array.<string>} recipients
|
118814
|
+
* @memberof TW.Sui.Proto.PaySui
|
118815
|
+
* @instance
|
118816
|
+
*/
|
118817
|
+
PaySui.prototype.recipients = $util.emptyArray;
|
118818
|
+
|
118819
|
+
/**
|
118820
|
+
* PaySui amounts.
|
118821
|
+
* @member {Array.<Long>} amounts
|
118822
|
+
* @memberof TW.Sui.Proto.PaySui
|
118823
|
+
* @instance
|
118824
|
+
*/
|
118825
|
+
PaySui.prototype.amounts = $util.emptyArray;
|
118826
|
+
|
118827
|
+
/**
|
118828
|
+
* Creates a new PaySui instance using the specified properties.
|
118829
|
+
* @function create
|
118830
|
+
* @memberof TW.Sui.Proto.PaySui
|
118831
|
+
* @static
|
118832
|
+
* @param {TW.Sui.Proto.IPaySui=} [properties] Properties to set
|
118833
|
+
* @returns {TW.Sui.Proto.PaySui} PaySui instance
|
118834
|
+
*/
|
118835
|
+
PaySui.create = function create(properties) {
|
118836
|
+
return new PaySui(properties);
|
118837
|
+
};
|
118838
|
+
|
118839
|
+
/**
|
118840
|
+
* Encodes the specified PaySui message. Does not implicitly {@link TW.Sui.Proto.PaySui.verify|verify} messages.
|
118841
|
+
* @function encode
|
118842
|
+
* @memberof TW.Sui.Proto.PaySui
|
118843
|
+
* @static
|
118844
|
+
* @param {TW.Sui.Proto.IPaySui} message PaySui message or plain object to encode
|
118845
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
118846
|
+
* @returns {$protobuf.Writer} Writer
|
118847
|
+
*/
|
118848
|
+
PaySui.encode = function encode(message, writer) {
|
118849
|
+
if (!writer)
|
118850
|
+
writer = $Writer.create();
|
118851
|
+
if (message.inputCoins != null && message.inputCoins.length)
|
118852
|
+
for (var i = 0; i < message.inputCoins.length; ++i)
|
118853
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.inputCoins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
118854
|
+
if (message.recipients != null && message.recipients.length)
|
118855
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
118856
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipients[i]);
|
118857
|
+
if (message.amounts != null && message.amounts.length) {
|
118858
|
+
writer.uint32(/* id 3, wireType 2 =*/26).fork();
|
118859
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
118860
|
+
writer.uint64(message.amounts[i]);
|
118861
|
+
writer.ldelim();
|
118862
|
+
}
|
118863
|
+
return writer;
|
118864
|
+
};
|
118865
|
+
|
118866
|
+
/**
|
118867
|
+
* Decodes a PaySui message from the specified reader or buffer.
|
118868
|
+
* @function decode
|
118869
|
+
* @memberof TW.Sui.Proto.PaySui
|
118870
|
+
* @static
|
118871
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
118872
|
+
* @param {number} [length] Message length if known beforehand
|
118873
|
+
* @returns {TW.Sui.Proto.PaySui} PaySui
|
118874
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
118875
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
118876
|
+
*/
|
118877
|
+
PaySui.decode = function decode(reader, length) {
|
118878
|
+
if (!(reader instanceof $Reader))
|
118879
|
+
reader = $Reader.create(reader);
|
118880
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.PaySui();
|
118881
|
+
while (reader.pos < end) {
|
118882
|
+
var tag = reader.uint32();
|
118883
|
+
switch (tag >>> 3) {
|
118884
|
+
case 1:
|
118885
|
+
if (!(message.inputCoins && message.inputCoins.length))
|
118886
|
+
message.inputCoins = [];
|
118887
|
+
message.inputCoins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
118888
|
+
break;
|
118889
|
+
case 2:
|
118890
|
+
if (!(message.recipients && message.recipients.length))
|
118891
|
+
message.recipients = [];
|
118892
|
+
message.recipients.push(reader.string());
|
118893
|
+
break;
|
118894
|
+
case 3:
|
118895
|
+
if (!(message.amounts && message.amounts.length))
|
118896
|
+
message.amounts = [];
|
118897
|
+
if ((tag & 7) === 2) {
|
118898
|
+
var end2 = reader.uint32() + reader.pos;
|
118899
|
+
while (reader.pos < end2)
|
118900
|
+
message.amounts.push(reader.uint64());
|
118901
|
+
} else
|
118902
|
+
message.amounts.push(reader.uint64());
|
118903
|
+
break;
|
118904
|
+
default:
|
118905
|
+
reader.skipType(tag & 7);
|
118906
|
+
break;
|
118907
|
+
}
|
118908
|
+
}
|
118909
|
+
return message;
|
118910
|
+
};
|
118911
|
+
|
118912
|
+
/**
|
118913
|
+
* Verifies a PaySui message.
|
118914
|
+
* @function verify
|
118915
|
+
* @memberof TW.Sui.Proto.PaySui
|
118916
|
+
* @static
|
118917
|
+
* @param {Object.<string,*>} message Plain object to verify
|
118918
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
118919
|
+
*/
|
118920
|
+
PaySui.verify = function verify(message) {
|
118921
|
+
if (typeof message !== "object" || message === null)
|
118922
|
+
return "object expected";
|
118923
|
+
if (message.inputCoins != null && message.hasOwnProperty("inputCoins")) {
|
118924
|
+
if (!Array.isArray(message.inputCoins))
|
118925
|
+
return "inputCoins: array expected";
|
118926
|
+
for (var i = 0; i < message.inputCoins.length; ++i) {
|
118927
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.inputCoins[i]);
|
118928
|
+
if (error)
|
118929
|
+
return "inputCoins." + error;
|
118930
|
+
}
|
118931
|
+
}
|
118932
|
+
if (message.recipients != null && message.hasOwnProperty("recipients")) {
|
118933
|
+
if (!Array.isArray(message.recipients))
|
118934
|
+
return "recipients: array expected";
|
118935
|
+
for (var i = 0; i < message.recipients.length; ++i)
|
118936
|
+
if (!$util.isString(message.recipients[i]))
|
118937
|
+
return "recipients: string[] expected";
|
118938
|
+
}
|
118939
|
+
if (message.amounts != null && message.hasOwnProperty("amounts")) {
|
118940
|
+
if (!Array.isArray(message.amounts))
|
118941
|
+
return "amounts: array expected";
|
118942
|
+
for (var i = 0; i < message.amounts.length; ++i)
|
118943
|
+
if (!$util.isInteger(message.amounts[i]) && !(message.amounts[i] && $util.isInteger(message.amounts[i].low) && $util.isInteger(message.amounts[i].high)))
|
118944
|
+
return "amounts: integer|Long[] expected";
|
118945
|
+
}
|
118946
|
+
return null;
|
118947
|
+
};
|
118948
|
+
|
118949
|
+
/**
|
118950
|
+
* Creates a PaySui message from a plain object. Also converts values to their respective internal types.
|
118951
|
+
* @function fromObject
|
118952
|
+
* @memberof TW.Sui.Proto.PaySui
|
118953
|
+
* @static
|
118954
|
+
* @param {Object.<string,*>} object Plain object
|
118955
|
+
* @returns {TW.Sui.Proto.PaySui} PaySui
|
118956
|
+
*/
|
118957
|
+
PaySui.fromObject = function fromObject(object) {
|
118958
|
+
if (object instanceof $root.TW.Sui.Proto.PaySui)
|
118959
|
+
return object;
|
118960
|
+
var message = new $root.TW.Sui.Proto.PaySui();
|
118961
|
+
if (object.inputCoins) {
|
118962
|
+
if (!Array.isArray(object.inputCoins))
|
118963
|
+
throw TypeError(".TW.Sui.Proto.PaySui.inputCoins: array expected");
|
118964
|
+
message.inputCoins = [];
|
118965
|
+
for (var i = 0; i < object.inputCoins.length; ++i) {
|
118966
|
+
if (typeof object.inputCoins[i] !== "object")
|
118967
|
+
throw TypeError(".TW.Sui.Proto.PaySui.inputCoins: object expected");
|
118968
|
+
message.inputCoins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.inputCoins[i]);
|
118969
|
+
}
|
118970
|
+
}
|
118971
|
+
if (object.recipients) {
|
118972
|
+
if (!Array.isArray(object.recipients))
|
118973
|
+
throw TypeError(".TW.Sui.Proto.PaySui.recipients: array expected");
|
118974
|
+
message.recipients = [];
|
118975
|
+
for (var i = 0; i < object.recipients.length; ++i)
|
118976
|
+
message.recipients[i] = String(object.recipients[i]);
|
118977
|
+
}
|
118978
|
+
if (object.amounts) {
|
118979
|
+
if (!Array.isArray(object.amounts))
|
118980
|
+
throw TypeError(".TW.Sui.Proto.PaySui.amounts: array expected");
|
118981
|
+
message.amounts = [];
|
118982
|
+
for (var i = 0; i < object.amounts.length; ++i)
|
118983
|
+
if ($util.Long)
|
118984
|
+
(message.amounts[i] = $util.Long.fromValue(object.amounts[i])).unsigned = true;
|
118985
|
+
else if (typeof object.amounts[i] === "string")
|
118986
|
+
message.amounts[i] = parseInt(object.amounts[i], 10);
|
118987
|
+
else if (typeof object.amounts[i] === "number")
|
118988
|
+
message.amounts[i] = object.amounts[i];
|
118989
|
+
else if (typeof object.amounts[i] === "object")
|
118990
|
+
message.amounts[i] = new $util.LongBits(object.amounts[i].low >>> 0, object.amounts[i].high >>> 0).toNumber(true);
|
118991
|
+
}
|
118992
|
+
return message;
|
118993
|
+
};
|
118994
|
+
|
118995
|
+
/**
|
118996
|
+
* Creates a plain object from a PaySui message. Also converts values to other types if specified.
|
118997
|
+
* @function toObject
|
118998
|
+
* @memberof TW.Sui.Proto.PaySui
|
118999
|
+
* @static
|
119000
|
+
* @param {TW.Sui.Proto.PaySui} message PaySui
|
119001
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119002
|
+
* @returns {Object.<string,*>} Plain object
|
119003
|
+
*/
|
119004
|
+
PaySui.toObject = function toObject(message, options) {
|
119005
|
+
if (!options)
|
119006
|
+
options = {};
|
119007
|
+
var object = {};
|
119008
|
+
if (options.arrays || options.defaults) {
|
119009
|
+
object.inputCoins = [];
|
119010
|
+
object.recipients = [];
|
119011
|
+
object.amounts = [];
|
119012
|
+
}
|
119013
|
+
if (message.inputCoins && message.inputCoins.length) {
|
119014
|
+
object.inputCoins = [];
|
119015
|
+
for (var j = 0; j < message.inputCoins.length; ++j)
|
119016
|
+
object.inputCoins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.inputCoins[j], options);
|
119017
|
+
}
|
119018
|
+
if (message.recipients && message.recipients.length) {
|
119019
|
+
object.recipients = [];
|
119020
|
+
for (var j = 0; j < message.recipients.length; ++j)
|
119021
|
+
object.recipients[j] = message.recipients[j];
|
119022
|
+
}
|
119023
|
+
if (message.amounts && message.amounts.length) {
|
119024
|
+
object.amounts = [];
|
119025
|
+
for (var j = 0; j < message.amounts.length; ++j)
|
119026
|
+
if (typeof message.amounts[j] === "number")
|
119027
|
+
object.amounts[j] = options.longs === String ? String(message.amounts[j]) : message.amounts[j];
|
119028
|
+
else
|
119029
|
+
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];
|
119030
|
+
}
|
119031
|
+
return object;
|
119032
|
+
};
|
119033
|
+
|
119034
|
+
/**
|
119035
|
+
* Converts this PaySui to JSON.
|
119036
|
+
* @function toJSON
|
119037
|
+
* @memberof TW.Sui.Proto.PaySui
|
119038
|
+
* @instance
|
119039
|
+
* @returns {Object.<string,*>} JSON object
|
119040
|
+
*/
|
119041
|
+
PaySui.prototype.toJSON = function toJSON() {
|
119042
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119043
|
+
};
|
119044
|
+
|
119045
|
+
return PaySui;
|
119046
|
+
})();
|
119047
|
+
|
119048
|
+
Proto.PayAllSui = (function() {
|
119049
|
+
|
119050
|
+
/**
|
119051
|
+
* Properties of a PayAllSui.
|
119052
|
+
* @memberof TW.Sui.Proto
|
119053
|
+
* @interface IPayAllSui
|
119054
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [inputCoins] PayAllSui inputCoins
|
119055
|
+
* @property {string|null} [recipient] PayAllSui recipient
|
119056
|
+
*/
|
119057
|
+
|
119058
|
+
/**
|
119059
|
+
* Constructs a new PayAllSui.
|
119060
|
+
* @memberof TW.Sui.Proto
|
119061
|
+
* @classdesc Represents a PayAllSui.
|
119062
|
+
* @implements IPayAllSui
|
119063
|
+
* @constructor
|
119064
|
+
* @param {TW.Sui.Proto.IPayAllSui=} [properties] Properties to set
|
119065
|
+
*/
|
119066
|
+
function PayAllSui(properties) {
|
119067
|
+
this.inputCoins = [];
|
119068
|
+
if (properties)
|
119069
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119070
|
+
if (properties[keys[i]] != null)
|
119071
|
+
this[keys[i]] = properties[keys[i]];
|
119072
|
+
}
|
119073
|
+
|
119074
|
+
/**
|
119075
|
+
* PayAllSui inputCoins.
|
119076
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} inputCoins
|
119077
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119078
|
+
* @instance
|
119079
|
+
*/
|
119080
|
+
PayAllSui.prototype.inputCoins = $util.emptyArray;
|
119081
|
+
|
119082
|
+
/**
|
119083
|
+
* PayAllSui recipient.
|
119084
|
+
* @member {string} recipient
|
119085
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119086
|
+
* @instance
|
119087
|
+
*/
|
119088
|
+
PayAllSui.prototype.recipient = "";
|
119089
|
+
|
119090
|
+
/**
|
119091
|
+
* Creates a new PayAllSui instance using the specified properties.
|
119092
|
+
* @function create
|
119093
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119094
|
+
* @static
|
119095
|
+
* @param {TW.Sui.Proto.IPayAllSui=} [properties] Properties to set
|
119096
|
+
* @returns {TW.Sui.Proto.PayAllSui} PayAllSui instance
|
119097
|
+
*/
|
119098
|
+
PayAllSui.create = function create(properties) {
|
119099
|
+
return new PayAllSui(properties);
|
119100
|
+
};
|
119101
|
+
|
119102
|
+
/**
|
119103
|
+
* Encodes the specified PayAllSui message. Does not implicitly {@link TW.Sui.Proto.PayAllSui.verify|verify} messages.
|
119104
|
+
* @function encode
|
119105
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119106
|
+
* @static
|
119107
|
+
* @param {TW.Sui.Proto.IPayAllSui} message PayAllSui message or plain object to encode
|
119108
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119109
|
+
* @returns {$protobuf.Writer} Writer
|
119110
|
+
*/
|
119111
|
+
PayAllSui.encode = function encode(message, writer) {
|
119112
|
+
if (!writer)
|
119113
|
+
writer = $Writer.create();
|
119114
|
+
if (message.inputCoins != null && message.inputCoins.length)
|
119115
|
+
for (var i = 0; i < message.inputCoins.length; ++i)
|
119116
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.inputCoins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119117
|
+
if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient"))
|
119118
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipient);
|
119119
|
+
return writer;
|
119120
|
+
};
|
119121
|
+
|
119122
|
+
/**
|
119123
|
+
* Decodes a PayAllSui message from the specified reader or buffer.
|
119124
|
+
* @function decode
|
119125
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119126
|
+
* @static
|
119127
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119128
|
+
* @param {number} [length] Message length if known beforehand
|
119129
|
+
* @returns {TW.Sui.Proto.PayAllSui} PayAllSui
|
119130
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119131
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119132
|
+
*/
|
119133
|
+
PayAllSui.decode = function decode(reader, length) {
|
119134
|
+
if (!(reader instanceof $Reader))
|
119135
|
+
reader = $Reader.create(reader);
|
119136
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.PayAllSui();
|
119137
|
+
while (reader.pos < end) {
|
119138
|
+
var tag = reader.uint32();
|
119139
|
+
switch (tag >>> 3) {
|
119140
|
+
case 1:
|
119141
|
+
if (!(message.inputCoins && message.inputCoins.length))
|
119142
|
+
message.inputCoins = [];
|
119143
|
+
message.inputCoins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
119144
|
+
break;
|
119145
|
+
case 2:
|
119146
|
+
message.recipient = reader.string();
|
119147
|
+
break;
|
119148
|
+
default:
|
119149
|
+
reader.skipType(tag & 7);
|
119150
|
+
break;
|
119151
|
+
}
|
119152
|
+
}
|
119153
|
+
return message;
|
119154
|
+
};
|
119155
|
+
|
119156
|
+
/**
|
119157
|
+
* Verifies a PayAllSui message.
|
119158
|
+
* @function verify
|
119159
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119160
|
+
* @static
|
119161
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119162
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119163
|
+
*/
|
119164
|
+
PayAllSui.verify = function verify(message) {
|
119165
|
+
if (typeof message !== "object" || message === null)
|
119166
|
+
return "object expected";
|
119167
|
+
if (message.inputCoins != null && message.hasOwnProperty("inputCoins")) {
|
119168
|
+
if (!Array.isArray(message.inputCoins))
|
119169
|
+
return "inputCoins: array expected";
|
119170
|
+
for (var i = 0; i < message.inputCoins.length; ++i) {
|
119171
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.inputCoins[i]);
|
119172
|
+
if (error)
|
119173
|
+
return "inputCoins." + error;
|
119174
|
+
}
|
119175
|
+
}
|
119176
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
119177
|
+
if (!$util.isString(message.recipient))
|
119178
|
+
return "recipient: string expected";
|
119179
|
+
return null;
|
119180
|
+
};
|
119181
|
+
|
119182
|
+
/**
|
119183
|
+
* Creates a PayAllSui message from a plain object. Also converts values to their respective internal types.
|
119184
|
+
* @function fromObject
|
119185
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119186
|
+
* @static
|
119187
|
+
* @param {Object.<string,*>} object Plain object
|
119188
|
+
* @returns {TW.Sui.Proto.PayAllSui} PayAllSui
|
119189
|
+
*/
|
119190
|
+
PayAllSui.fromObject = function fromObject(object) {
|
119191
|
+
if (object instanceof $root.TW.Sui.Proto.PayAllSui)
|
119192
|
+
return object;
|
119193
|
+
var message = new $root.TW.Sui.Proto.PayAllSui();
|
119194
|
+
if (object.inputCoins) {
|
119195
|
+
if (!Array.isArray(object.inputCoins))
|
119196
|
+
throw TypeError(".TW.Sui.Proto.PayAllSui.inputCoins: array expected");
|
119197
|
+
message.inputCoins = [];
|
119198
|
+
for (var i = 0; i < object.inputCoins.length; ++i) {
|
119199
|
+
if (typeof object.inputCoins[i] !== "object")
|
119200
|
+
throw TypeError(".TW.Sui.Proto.PayAllSui.inputCoins: object expected");
|
119201
|
+
message.inputCoins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.inputCoins[i]);
|
119202
|
+
}
|
119203
|
+
}
|
119204
|
+
if (object.recipient != null)
|
119205
|
+
message.recipient = String(object.recipient);
|
119206
|
+
return message;
|
119207
|
+
};
|
119208
|
+
|
119209
|
+
/**
|
119210
|
+
* Creates a plain object from a PayAllSui message. Also converts values to other types if specified.
|
119211
|
+
* @function toObject
|
119212
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119213
|
+
* @static
|
119214
|
+
* @param {TW.Sui.Proto.PayAllSui} message PayAllSui
|
119215
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119216
|
+
* @returns {Object.<string,*>} Plain object
|
119217
|
+
*/
|
119218
|
+
PayAllSui.toObject = function toObject(message, options) {
|
119219
|
+
if (!options)
|
119220
|
+
options = {};
|
119221
|
+
var object = {};
|
119222
|
+
if (options.arrays || options.defaults)
|
119223
|
+
object.inputCoins = [];
|
119224
|
+
if (options.defaults)
|
119225
|
+
object.recipient = "";
|
119226
|
+
if (message.inputCoins && message.inputCoins.length) {
|
119227
|
+
object.inputCoins = [];
|
119228
|
+
for (var j = 0; j < message.inputCoins.length; ++j)
|
119229
|
+
object.inputCoins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.inputCoins[j], options);
|
119230
|
+
}
|
119231
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
119232
|
+
object.recipient = message.recipient;
|
119233
|
+
return object;
|
119234
|
+
};
|
119235
|
+
|
119236
|
+
/**
|
119237
|
+
* Converts this PayAllSui to JSON.
|
119238
|
+
* @function toJSON
|
119239
|
+
* @memberof TW.Sui.Proto.PayAllSui
|
119240
|
+
* @instance
|
119241
|
+
* @returns {Object.<string,*>} JSON object
|
119242
|
+
*/
|
119243
|
+
PayAllSui.prototype.toJSON = function toJSON() {
|
119244
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119245
|
+
};
|
119246
|
+
|
119247
|
+
return PayAllSui;
|
119248
|
+
})();
|
119249
|
+
|
119250
|
+
Proto.RequestAddStake = (function() {
|
119251
|
+
|
119252
|
+
/**
|
119253
|
+
* Properties of a RequestAddStake.
|
119254
|
+
* @memberof TW.Sui.Proto
|
119255
|
+
* @interface IRequestAddStake
|
119256
|
+
* @property {Array.<TW.Sui.Proto.IObjectRef>|null} [coins] RequestAddStake coins
|
119257
|
+
* @property {TW.Sui.Proto.IAmount|null} [amount] RequestAddStake amount
|
119258
|
+
* @property {string|null} [validator] RequestAddStake validator
|
119259
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] RequestAddStake gas
|
119260
|
+
*/
|
119261
|
+
|
119262
|
+
/**
|
119263
|
+
* Constructs a new RequestAddStake.
|
119264
|
+
* @memberof TW.Sui.Proto
|
119265
|
+
* @classdesc Represents a RequestAddStake.
|
119266
|
+
* @implements IRequestAddStake
|
119267
|
+
* @constructor
|
119268
|
+
* @param {TW.Sui.Proto.IRequestAddStake=} [properties] Properties to set
|
119269
|
+
*/
|
119270
|
+
function RequestAddStake(properties) {
|
119271
|
+
this.coins = [];
|
119272
|
+
if (properties)
|
119273
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119274
|
+
if (properties[keys[i]] != null)
|
119275
|
+
this[keys[i]] = properties[keys[i]];
|
119276
|
+
}
|
119277
|
+
|
119278
|
+
/**
|
119279
|
+
* RequestAddStake coins.
|
119280
|
+
* @member {Array.<TW.Sui.Proto.IObjectRef>} coins
|
119281
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119282
|
+
* @instance
|
119283
|
+
*/
|
119284
|
+
RequestAddStake.prototype.coins = $util.emptyArray;
|
119285
|
+
|
119286
|
+
/**
|
119287
|
+
* RequestAddStake amount.
|
119288
|
+
* @member {TW.Sui.Proto.IAmount|null|undefined} amount
|
119289
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119290
|
+
* @instance
|
119291
|
+
*/
|
119292
|
+
RequestAddStake.prototype.amount = null;
|
119293
|
+
|
119294
|
+
/**
|
119295
|
+
* RequestAddStake validator.
|
119296
|
+
* @member {string} validator
|
119297
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119298
|
+
* @instance
|
119299
|
+
*/
|
119300
|
+
RequestAddStake.prototype.validator = "";
|
119301
|
+
|
119302
|
+
/**
|
119303
|
+
* RequestAddStake gas.
|
119304
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
119305
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119306
|
+
* @instance
|
119307
|
+
*/
|
119308
|
+
RequestAddStake.prototype.gas = null;
|
119309
|
+
|
119310
|
+
/**
|
119311
|
+
* Creates a new RequestAddStake instance using the specified properties.
|
119312
|
+
* @function create
|
119313
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119314
|
+
* @static
|
119315
|
+
* @param {TW.Sui.Proto.IRequestAddStake=} [properties] Properties to set
|
119316
|
+
* @returns {TW.Sui.Proto.RequestAddStake} RequestAddStake instance
|
119317
|
+
*/
|
119318
|
+
RequestAddStake.create = function create(properties) {
|
119319
|
+
return new RequestAddStake(properties);
|
119320
|
+
};
|
119321
|
+
|
119322
|
+
/**
|
119323
|
+
* Encodes the specified RequestAddStake message. Does not implicitly {@link TW.Sui.Proto.RequestAddStake.verify|verify} messages.
|
119324
|
+
* @function encode
|
119325
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119326
|
+
* @static
|
119327
|
+
* @param {TW.Sui.Proto.IRequestAddStake} message RequestAddStake message or plain object to encode
|
119328
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119329
|
+
* @returns {$protobuf.Writer} Writer
|
119330
|
+
*/
|
119331
|
+
RequestAddStake.encode = function encode(message, writer) {
|
119332
|
+
if (!writer)
|
119333
|
+
writer = $Writer.create();
|
119334
|
+
if (message.coins != null && message.coins.length)
|
119335
|
+
for (var i = 0; i < message.coins.length; ++i)
|
119336
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.coins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119337
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
119338
|
+
$root.TW.Sui.Proto.Amount.encode(message.amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
119339
|
+
if (message.validator != null && Object.hasOwnProperty.call(message, "validator"))
|
119340
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.validator);
|
119341
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
119342
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
119343
|
+
return writer;
|
119344
|
+
};
|
119345
|
+
|
119346
|
+
/**
|
119347
|
+
* Decodes a RequestAddStake message from the specified reader or buffer.
|
119348
|
+
* @function decode
|
119349
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119350
|
+
* @static
|
119351
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119352
|
+
* @param {number} [length] Message length if known beforehand
|
119353
|
+
* @returns {TW.Sui.Proto.RequestAddStake} RequestAddStake
|
119354
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119355
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119356
|
+
*/
|
119357
|
+
RequestAddStake.decode = function decode(reader, length) {
|
119358
|
+
if (!(reader instanceof $Reader))
|
119359
|
+
reader = $Reader.create(reader);
|
119360
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.RequestAddStake();
|
119361
|
+
while (reader.pos < end) {
|
119362
|
+
var tag = reader.uint32();
|
119363
|
+
switch (tag >>> 3) {
|
119364
|
+
case 1:
|
119365
|
+
if (!(message.coins && message.coins.length))
|
119366
|
+
message.coins = [];
|
119367
|
+
message.coins.push($root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32()));
|
119368
|
+
break;
|
119369
|
+
case 2:
|
119370
|
+
message.amount = $root.TW.Sui.Proto.Amount.decode(reader, reader.uint32());
|
119371
|
+
break;
|
119372
|
+
case 3:
|
119373
|
+
message.validator = reader.string();
|
119374
|
+
break;
|
119375
|
+
case 4:
|
119376
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119377
|
+
break;
|
119378
|
+
default:
|
119379
|
+
reader.skipType(tag & 7);
|
119380
|
+
break;
|
119381
|
+
}
|
119382
|
+
}
|
119383
|
+
return message;
|
119384
|
+
};
|
119385
|
+
|
119386
|
+
/**
|
119387
|
+
* Verifies a RequestAddStake message.
|
119388
|
+
* @function verify
|
119389
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119390
|
+
* @static
|
119391
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119392
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119393
|
+
*/
|
119394
|
+
RequestAddStake.verify = function verify(message) {
|
119395
|
+
if (typeof message !== "object" || message === null)
|
119396
|
+
return "object expected";
|
119397
|
+
if (message.coins != null && message.hasOwnProperty("coins")) {
|
119398
|
+
if (!Array.isArray(message.coins))
|
119399
|
+
return "coins: array expected";
|
119400
|
+
for (var i = 0; i < message.coins.length; ++i) {
|
119401
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.coins[i]);
|
119402
|
+
if (error)
|
119403
|
+
return "coins." + error;
|
119404
|
+
}
|
119405
|
+
}
|
119406
|
+
if (message.amount != null && message.hasOwnProperty("amount")) {
|
119407
|
+
var error = $root.TW.Sui.Proto.Amount.verify(message.amount);
|
119408
|
+
if (error)
|
119409
|
+
return "amount." + error;
|
119410
|
+
}
|
119411
|
+
if (message.validator != null && message.hasOwnProperty("validator"))
|
119412
|
+
if (!$util.isString(message.validator))
|
119413
|
+
return "validator: string expected";
|
119414
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
119415
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
119416
|
+
if (error)
|
119417
|
+
return "gas." + error;
|
119418
|
+
}
|
119419
|
+
return null;
|
119420
|
+
};
|
119421
|
+
|
119422
|
+
/**
|
119423
|
+
* Creates a RequestAddStake message from a plain object. Also converts values to their respective internal types.
|
119424
|
+
* @function fromObject
|
119425
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119426
|
+
* @static
|
119427
|
+
* @param {Object.<string,*>} object Plain object
|
119428
|
+
* @returns {TW.Sui.Proto.RequestAddStake} RequestAddStake
|
119429
|
+
*/
|
119430
|
+
RequestAddStake.fromObject = function fromObject(object) {
|
119431
|
+
if (object instanceof $root.TW.Sui.Proto.RequestAddStake)
|
119432
|
+
return object;
|
119433
|
+
var message = new $root.TW.Sui.Proto.RequestAddStake();
|
119434
|
+
if (object.coins) {
|
119435
|
+
if (!Array.isArray(object.coins))
|
119436
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.coins: array expected");
|
119437
|
+
message.coins = [];
|
119438
|
+
for (var i = 0; i < object.coins.length; ++i) {
|
119439
|
+
if (typeof object.coins[i] !== "object")
|
119440
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.coins: object expected");
|
119441
|
+
message.coins[i] = $root.TW.Sui.Proto.ObjectRef.fromObject(object.coins[i]);
|
119442
|
+
}
|
119443
|
+
}
|
119444
|
+
if (object.amount != null) {
|
119445
|
+
if (typeof object.amount !== "object")
|
119446
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.amount: object expected");
|
119447
|
+
message.amount = $root.TW.Sui.Proto.Amount.fromObject(object.amount);
|
119448
|
+
}
|
119449
|
+
if (object.validator != null)
|
119450
|
+
message.validator = String(object.validator);
|
119451
|
+
if (object.gas != null) {
|
119452
|
+
if (typeof object.gas !== "object")
|
119453
|
+
throw TypeError(".TW.Sui.Proto.RequestAddStake.gas: object expected");
|
119454
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
119455
|
+
}
|
119456
|
+
return message;
|
119457
|
+
};
|
119458
|
+
|
119459
|
+
/**
|
119460
|
+
* Creates a plain object from a RequestAddStake message. Also converts values to other types if specified.
|
119461
|
+
* @function toObject
|
119462
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119463
|
+
* @static
|
119464
|
+
* @param {TW.Sui.Proto.RequestAddStake} message RequestAddStake
|
119465
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119466
|
+
* @returns {Object.<string,*>} Plain object
|
119467
|
+
*/
|
119468
|
+
RequestAddStake.toObject = function toObject(message, options) {
|
119469
|
+
if (!options)
|
119470
|
+
options = {};
|
119471
|
+
var object = {};
|
119472
|
+
if (options.arrays || options.defaults)
|
119473
|
+
object.coins = [];
|
119474
|
+
if (options.defaults) {
|
119475
|
+
object.amount = null;
|
119476
|
+
object.validator = "";
|
119477
|
+
object.gas = null;
|
119478
|
+
}
|
119479
|
+
if (message.coins && message.coins.length) {
|
119480
|
+
object.coins = [];
|
119481
|
+
for (var j = 0; j < message.coins.length; ++j)
|
119482
|
+
object.coins[j] = $root.TW.Sui.Proto.ObjectRef.toObject(message.coins[j], options);
|
119483
|
+
}
|
119484
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
119485
|
+
object.amount = $root.TW.Sui.Proto.Amount.toObject(message.amount, options);
|
119486
|
+
if (message.validator != null && message.hasOwnProperty("validator"))
|
119487
|
+
object.validator = message.validator;
|
119488
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
119489
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
119490
|
+
return object;
|
119491
|
+
};
|
119492
|
+
|
119493
|
+
/**
|
119494
|
+
* Converts this RequestAddStake to JSON.
|
119495
|
+
* @function toJSON
|
119496
|
+
* @memberof TW.Sui.Proto.RequestAddStake
|
119497
|
+
* @instance
|
119498
|
+
* @returns {Object.<string,*>} JSON object
|
119499
|
+
*/
|
119500
|
+
RequestAddStake.prototype.toJSON = function toJSON() {
|
119501
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119502
|
+
};
|
119503
|
+
|
119504
|
+
return RequestAddStake;
|
119505
|
+
})();
|
119506
|
+
|
119507
|
+
Proto.RequestWithdrawStake = (function() {
|
119508
|
+
|
119509
|
+
/**
|
119510
|
+
* Properties of a RequestWithdrawStake.
|
119511
|
+
* @memberof TW.Sui.Proto
|
119512
|
+
* @interface IRequestWithdrawStake
|
119513
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [stakedSui] RequestWithdrawStake stakedSui
|
119514
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] RequestWithdrawStake gas
|
119515
|
+
*/
|
119516
|
+
|
119517
|
+
/**
|
119518
|
+
* Constructs a new RequestWithdrawStake.
|
119519
|
+
* @memberof TW.Sui.Proto
|
119520
|
+
* @classdesc Represents a RequestWithdrawStake.
|
119521
|
+
* @implements IRequestWithdrawStake
|
119522
|
+
* @constructor
|
119523
|
+
* @param {TW.Sui.Proto.IRequestWithdrawStake=} [properties] Properties to set
|
119524
|
+
*/
|
119525
|
+
function RequestWithdrawStake(properties) {
|
119526
|
+
if (properties)
|
119527
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119528
|
+
if (properties[keys[i]] != null)
|
119529
|
+
this[keys[i]] = properties[keys[i]];
|
119530
|
+
}
|
119531
|
+
|
119532
|
+
/**
|
119533
|
+
* RequestWithdrawStake stakedSui.
|
119534
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} stakedSui
|
119535
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119536
|
+
* @instance
|
119537
|
+
*/
|
119538
|
+
RequestWithdrawStake.prototype.stakedSui = null;
|
119539
|
+
|
119540
|
+
/**
|
119541
|
+
* RequestWithdrawStake gas.
|
119542
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
119543
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119544
|
+
* @instance
|
119545
|
+
*/
|
119546
|
+
RequestWithdrawStake.prototype.gas = null;
|
119547
|
+
|
119548
|
+
/**
|
119549
|
+
* Creates a new RequestWithdrawStake instance using the specified properties.
|
119550
|
+
* @function create
|
119551
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119552
|
+
* @static
|
119553
|
+
* @param {TW.Sui.Proto.IRequestWithdrawStake=} [properties] Properties to set
|
119554
|
+
* @returns {TW.Sui.Proto.RequestWithdrawStake} RequestWithdrawStake instance
|
119555
|
+
*/
|
119556
|
+
RequestWithdrawStake.create = function create(properties) {
|
119557
|
+
return new RequestWithdrawStake(properties);
|
119558
|
+
};
|
119559
|
+
|
119560
|
+
/**
|
119561
|
+
* Encodes the specified RequestWithdrawStake message. Does not implicitly {@link TW.Sui.Proto.RequestWithdrawStake.verify|verify} messages.
|
119562
|
+
* @function encode
|
119563
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119564
|
+
* @static
|
119565
|
+
* @param {TW.Sui.Proto.IRequestWithdrawStake} message RequestWithdrawStake message or plain object to encode
|
119566
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119567
|
+
* @returns {$protobuf.Writer} Writer
|
119568
|
+
*/
|
119569
|
+
RequestWithdrawStake.encode = function encode(message, writer) {
|
119570
|
+
if (!writer)
|
119571
|
+
writer = $Writer.create();
|
119572
|
+
if (message.stakedSui != null && Object.hasOwnProperty.call(message, "stakedSui"))
|
119573
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.stakedSui, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119574
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
119575
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
119576
|
+
return writer;
|
119577
|
+
};
|
119578
|
+
|
119579
|
+
/**
|
119580
|
+
* Decodes a RequestWithdrawStake message from the specified reader or buffer.
|
119581
|
+
* @function decode
|
119582
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119583
|
+
* @static
|
119584
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119585
|
+
* @param {number} [length] Message length if known beforehand
|
119586
|
+
* @returns {TW.Sui.Proto.RequestWithdrawStake} RequestWithdrawStake
|
119587
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119588
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119589
|
+
*/
|
119590
|
+
RequestWithdrawStake.decode = function decode(reader, length) {
|
119591
|
+
if (!(reader instanceof $Reader))
|
119592
|
+
reader = $Reader.create(reader);
|
119593
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.RequestWithdrawStake();
|
119594
|
+
while (reader.pos < end) {
|
119595
|
+
var tag = reader.uint32();
|
119596
|
+
switch (tag >>> 3) {
|
119597
|
+
case 1:
|
119598
|
+
message.stakedSui = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119599
|
+
break;
|
119600
|
+
case 2:
|
119601
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119602
|
+
break;
|
119603
|
+
default:
|
119604
|
+
reader.skipType(tag & 7);
|
119605
|
+
break;
|
119606
|
+
}
|
119607
|
+
}
|
119608
|
+
return message;
|
119609
|
+
};
|
119610
|
+
|
119611
|
+
/**
|
119612
|
+
* Verifies a RequestWithdrawStake message.
|
119613
|
+
* @function verify
|
119614
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119615
|
+
* @static
|
119616
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119617
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119618
|
+
*/
|
119619
|
+
RequestWithdrawStake.verify = function verify(message) {
|
119620
|
+
if (typeof message !== "object" || message === null)
|
119621
|
+
return "object expected";
|
119622
|
+
if (message.stakedSui != null && message.hasOwnProperty("stakedSui")) {
|
119623
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.stakedSui);
|
119624
|
+
if (error)
|
119625
|
+
return "stakedSui." + error;
|
119626
|
+
}
|
119627
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
119628
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
119629
|
+
if (error)
|
119630
|
+
return "gas." + error;
|
119631
|
+
}
|
119632
|
+
return null;
|
119633
|
+
};
|
119634
|
+
|
119635
|
+
/**
|
119636
|
+
* Creates a RequestWithdrawStake message from a plain object. Also converts values to their respective internal types.
|
119637
|
+
* @function fromObject
|
119638
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119639
|
+
* @static
|
119640
|
+
* @param {Object.<string,*>} object Plain object
|
119641
|
+
* @returns {TW.Sui.Proto.RequestWithdrawStake} RequestWithdrawStake
|
119642
|
+
*/
|
119643
|
+
RequestWithdrawStake.fromObject = function fromObject(object) {
|
119644
|
+
if (object instanceof $root.TW.Sui.Proto.RequestWithdrawStake)
|
119645
|
+
return object;
|
119646
|
+
var message = new $root.TW.Sui.Proto.RequestWithdrawStake();
|
119647
|
+
if (object.stakedSui != null) {
|
119648
|
+
if (typeof object.stakedSui !== "object")
|
119649
|
+
throw TypeError(".TW.Sui.Proto.RequestWithdrawStake.stakedSui: object expected");
|
119650
|
+
message.stakedSui = $root.TW.Sui.Proto.ObjectRef.fromObject(object.stakedSui);
|
119651
|
+
}
|
119652
|
+
if (object.gas != null) {
|
119653
|
+
if (typeof object.gas !== "object")
|
119654
|
+
throw TypeError(".TW.Sui.Proto.RequestWithdrawStake.gas: object expected");
|
119655
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
119656
|
+
}
|
119657
|
+
return message;
|
119658
|
+
};
|
119659
|
+
|
119660
|
+
/**
|
119661
|
+
* Creates a plain object from a RequestWithdrawStake message. Also converts values to other types if specified.
|
119662
|
+
* @function toObject
|
119663
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119664
|
+
* @static
|
119665
|
+
* @param {TW.Sui.Proto.RequestWithdrawStake} message RequestWithdrawStake
|
119666
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119667
|
+
* @returns {Object.<string,*>} Plain object
|
119668
|
+
*/
|
119669
|
+
RequestWithdrawStake.toObject = function toObject(message, options) {
|
119670
|
+
if (!options)
|
119671
|
+
options = {};
|
119672
|
+
var object = {};
|
119673
|
+
if (options.defaults) {
|
119674
|
+
object.stakedSui = null;
|
119675
|
+
object.gas = null;
|
119676
|
+
}
|
119677
|
+
if (message.stakedSui != null && message.hasOwnProperty("stakedSui"))
|
119678
|
+
object.stakedSui = $root.TW.Sui.Proto.ObjectRef.toObject(message.stakedSui, options);
|
119679
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
119680
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
119681
|
+
return object;
|
119682
|
+
};
|
119683
|
+
|
119684
|
+
/**
|
119685
|
+
* Converts this RequestWithdrawStake to JSON.
|
119686
|
+
* @function toJSON
|
119687
|
+
* @memberof TW.Sui.Proto.RequestWithdrawStake
|
119688
|
+
* @instance
|
119689
|
+
* @returns {Object.<string,*>} JSON object
|
119690
|
+
*/
|
119691
|
+
RequestWithdrawStake.prototype.toJSON = function toJSON() {
|
119692
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119693
|
+
};
|
119694
|
+
|
119695
|
+
return RequestWithdrawStake;
|
119696
|
+
})();
|
119697
|
+
|
119698
|
+
Proto.TransferObject = (function() {
|
119699
|
+
|
119700
|
+
/**
|
119701
|
+
* Properties of a TransferObject.
|
119702
|
+
* @memberof TW.Sui.Proto
|
119703
|
+
* @interface ITransferObject
|
119704
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [object] TransferObject object
|
119705
|
+
* @property {string|null} [recipient] TransferObject recipient
|
119706
|
+
* @property {TW.Sui.Proto.IObjectRef|null} [gas] TransferObject gas
|
119707
|
+
*/
|
119708
|
+
|
119709
|
+
/**
|
119710
|
+
* Constructs a new TransferObject.
|
119711
|
+
* @memberof TW.Sui.Proto
|
119712
|
+
* @classdesc https://docs.sui.io/sui-api-ref#unsafe_transferobject
|
119713
|
+
* @implements ITransferObject
|
119714
|
+
* @constructor
|
119715
|
+
* @param {TW.Sui.Proto.ITransferObject=} [properties] Properties to set
|
119716
|
+
*/
|
119717
|
+
function TransferObject(properties) {
|
119718
|
+
if (properties)
|
119719
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
119720
|
+
if (properties[keys[i]] != null)
|
119721
|
+
this[keys[i]] = properties[keys[i]];
|
119722
|
+
}
|
119723
|
+
|
119724
|
+
/**
|
119725
|
+
* TransferObject object.
|
119726
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} object
|
119727
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119728
|
+
* @instance
|
119729
|
+
*/
|
119730
|
+
TransferObject.prototype.object = null;
|
119731
|
+
|
119732
|
+
/**
|
119733
|
+
* TransferObject recipient.
|
119734
|
+
* @member {string} recipient
|
119735
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119736
|
+
* @instance
|
119737
|
+
*/
|
119738
|
+
TransferObject.prototype.recipient = "";
|
119739
|
+
|
119740
|
+
/**
|
119741
|
+
* TransferObject gas.
|
119742
|
+
* @member {TW.Sui.Proto.IObjectRef|null|undefined} gas
|
119743
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119744
|
+
* @instance
|
119745
|
+
*/
|
119746
|
+
TransferObject.prototype.gas = null;
|
119747
|
+
|
119748
|
+
/**
|
119749
|
+
* Creates a new TransferObject instance using the specified properties.
|
119750
|
+
* @function create
|
119751
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119752
|
+
* @static
|
119753
|
+
* @param {TW.Sui.Proto.ITransferObject=} [properties] Properties to set
|
119754
|
+
* @returns {TW.Sui.Proto.TransferObject} TransferObject instance
|
119755
|
+
*/
|
119756
|
+
TransferObject.create = function create(properties) {
|
119757
|
+
return new TransferObject(properties);
|
119758
|
+
};
|
119759
|
+
|
119760
|
+
/**
|
119761
|
+
* Encodes the specified TransferObject message. Does not implicitly {@link TW.Sui.Proto.TransferObject.verify|verify} messages.
|
119762
|
+
* @function encode
|
119763
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119764
|
+
* @static
|
119765
|
+
* @param {TW.Sui.Proto.ITransferObject} message TransferObject message or plain object to encode
|
119766
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
119767
|
+
* @returns {$protobuf.Writer} Writer
|
119768
|
+
*/
|
119769
|
+
TransferObject.encode = function encode(message, writer) {
|
119770
|
+
if (!writer)
|
119771
|
+
writer = $Writer.create();
|
119772
|
+
if (message.object != null && Object.hasOwnProperty.call(message, "object"))
|
119773
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.object, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
119774
|
+
if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient"))
|
119775
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recipient);
|
119776
|
+
if (message.gas != null && Object.hasOwnProperty.call(message, "gas"))
|
119777
|
+
$root.TW.Sui.Proto.ObjectRef.encode(message.gas, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
119778
|
+
return writer;
|
119779
|
+
};
|
119780
|
+
|
119781
|
+
/**
|
119782
|
+
* Decodes a TransferObject message from the specified reader or buffer.
|
119783
|
+
* @function decode
|
119784
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119785
|
+
* @static
|
119786
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
119787
|
+
* @param {number} [length] Message length if known beforehand
|
119788
|
+
* @returns {TW.Sui.Proto.TransferObject} TransferObject
|
119789
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
119790
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
119791
|
+
*/
|
119792
|
+
TransferObject.decode = function decode(reader, length) {
|
119793
|
+
if (!(reader instanceof $Reader))
|
119794
|
+
reader = $Reader.create(reader);
|
119795
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Sui.Proto.TransferObject();
|
119796
|
+
while (reader.pos < end) {
|
119797
|
+
var tag = reader.uint32();
|
119798
|
+
switch (tag >>> 3) {
|
119799
|
+
case 1:
|
119800
|
+
message.object = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119801
|
+
break;
|
119802
|
+
case 2:
|
119803
|
+
message.recipient = reader.string();
|
119804
|
+
break;
|
119805
|
+
case 3:
|
119806
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.decode(reader, reader.uint32());
|
119807
|
+
break;
|
119808
|
+
default:
|
119809
|
+
reader.skipType(tag & 7);
|
119810
|
+
break;
|
119811
|
+
}
|
119812
|
+
}
|
119813
|
+
return message;
|
119814
|
+
};
|
119815
|
+
|
119816
|
+
/**
|
119817
|
+
* Verifies a TransferObject message.
|
119818
|
+
* @function verify
|
119819
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119820
|
+
* @static
|
119821
|
+
* @param {Object.<string,*>} message Plain object to verify
|
119822
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
119823
|
+
*/
|
119824
|
+
TransferObject.verify = function verify(message) {
|
119825
|
+
if (typeof message !== "object" || message === null)
|
119826
|
+
return "object expected";
|
119827
|
+
if (message.object != null && message.hasOwnProperty("object")) {
|
119828
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.object);
|
119829
|
+
if (error)
|
119830
|
+
return "object." + error;
|
119831
|
+
}
|
119832
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
119833
|
+
if (!$util.isString(message.recipient))
|
119834
|
+
return "recipient: string expected";
|
119835
|
+
if (message.gas != null && message.hasOwnProperty("gas")) {
|
119836
|
+
var error = $root.TW.Sui.Proto.ObjectRef.verify(message.gas);
|
119837
|
+
if (error)
|
119838
|
+
return "gas." + error;
|
119839
|
+
}
|
119840
|
+
return null;
|
119841
|
+
};
|
119842
|
+
|
119843
|
+
/**
|
119844
|
+
* Creates a TransferObject message from a plain object. Also converts values to their respective internal types.
|
119845
|
+
* @function fromObject
|
119846
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119847
|
+
* @static
|
119848
|
+
* @param {Object.<string,*>} object Plain object
|
119849
|
+
* @returns {TW.Sui.Proto.TransferObject} TransferObject
|
119850
|
+
*/
|
119851
|
+
TransferObject.fromObject = function fromObject(object) {
|
119852
|
+
if (object instanceof $root.TW.Sui.Proto.TransferObject)
|
119853
|
+
return object;
|
119854
|
+
var message = new $root.TW.Sui.Proto.TransferObject();
|
119855
|
+
if (object.object != null) {
|
119856
|
+
if (typeof object.object !== "object")
|
119857
|
+
throw TypeError(".TW.Sui.Proto.TransferObject.object: object expected");
|
119858
|
+
message.object = $root.TW.Sui.Proto.ObjectRef.fromObject(object.object);
|
119859
|
+
}
|
119860
|
+
if (object.recipient != null)
|
119861
|
+
message.recipient = String(object.recipient);
|
119862
|
+
if (object.gas != null) {
|
119863
|
+
if (typeof object.gas !== "object")
|
119864
|
+
throw TypeError(".TW.Sui.Proto.TransferObject.gas: object expected");
|
119865
|
+
message.gas = $root.TW.Sui.Proto.ObjectRef.fromObject(object.gas);
|
119866
|
+
}
|
119867
|
+
return message;
|
119868
|
+
};
|
119869
|
+
|
119870
|
+
/**
|
119871
|
+
* Creates a plain object from a TransferObject message. Also converts values to other types if specified.
|
119872
|
+
* @function toObject
|
119873
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119874
|
+
* @static
|
119875
|
+
* @param {TW.Sui.Proto.TransferObject} message TransferObject
|
119876
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
119877
|
+
* @returns {Object.<string,*>} Plain object
|
119878
|
+
*/
|
119879
|
+
TransferObject.toObject = function toObject(message, options) {
|
119880
|
+
if (!options)
|
119881
|
+
options = {};
|
119882
|
+
var object = {};
|
119883
|
+
if (options.defaults) {
|
119884
|
+
object.object = null;
|
119885
|
+
object.recipient = "";
|
119886
|
+
object.gas = null;
|
119887
|
+
}
|
119888
|
+
if (message.object != null && message.hasOwnProperty("object"))
|
119889
|
+
object.object = $root.TW.Sui.Proto.ObjectRef.toObject(message.object, options);
|
119890
|
+
if (message.recipient != null && message.hasOwnProperty("recipient"))
|
119891
|
+
object.recipient = message.recipient;
|
119892
|
+
if (message.gas != null && message.hasOwnProperty("gas"))
|
119893
|
+
object.gas = $root.TW.Sui.Proto.ObjectRef.toObject(message.gas, options);
|
119894
|
+
return object;
|
119895
|
+
};
|
119896
|
+
|
119897
|
+
/**
|
119898
|
+
* Converts this TransferObject to JSON.
|
119899
|
+
* @function toJSON
|
119900
|
+
* @memberof TW.Sui.Proto.TransferObject
|
119901
|
+
* @instance
|
119902
|
+
* @returns {Object.<string,*>} JSON object
|
119903
|
+
*/
|
119904
|
+
TransferObject.prototype.toJSON = function toJSON() {
|
119905
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
119906
|
+
};
|
119907
|
+
|
119908
|
+
return TransferObject;
|
119909
|
+
})();
|
119910
|
+
|
117725
119911
|
Proto.SigningInput = (function() {
|
117726
119912
|
|
117727
119913
|
/**
|
@@ -117729,7 +119915,16 @@
|
|
117729
119915
|
* @memberof TW.Sui.Proto
|
117730
119916
|
* @interface ISigningInput
|
117731
119917
|
* @property {Uint8Array|null} [privateKey] SigningInput privateKey
|
119918
|
+
* @property {string|null} [signer] SigningInput signer
|
117732
119919
|
* @property {TW.Sui.Proto.ISignDirect|null} [signDirectMessage] SigningInput signDirectMessage
|
119920
|
+
* @property {TW.Sui.Proto.IPay|null} [pay] SigningInput pay
|
119921
|
+
* @property {TW.Sui.Proto.IPaySui|null} [paySui] SigningInput paySui
|
119922
|
+
* @property {TW.Sui.Proto.IPayAllSui|null} [payAllSui] SigningInput payAllSui
|
119923
|
+
* @property {TW.Sui.Proto.IRequestAddStake|null} [requestAddStake] SigningInput requestAddStake
|
119924
|
+
* @property {TW.Sui.Proto.IRequestWithdrawStake|null} [requestWithdrawStake] SigningInput requestWithdrawStake
|
119925
|
+
* @property {TW.Sui.Proto.ITransferObject|null} [transferObject] SigningInput transferObject
|
119926
|
+
* @property {Long|null} [gasBudget] SigningInput gasBudget
|
119927
|
+
* @property {Long|null} [referenceGasPrice] SigningInput referenceGasPrice
|
117733
119928
|
*/
|
117734
119929
|
|
117735
119930
|
/**
|
@@ -117755,6 +119950,14 @@
|
|
117755
119950
|
*/
|
117756
119951
|
SigningInput.prototype.privateKey = $util.newBuffer([]);
|
117757
119952
|
|
119953
|
+
/**
|
119954
|
+
* SigningInput signer.
|
119955
|
+
* @member {string} signer
|
119956
|
+
* @memberof TW.Sui.Proto.SigningInput
|
119957
|
+
* @instance
|
119958
|
+
*/
|
119959
|
+
SigningInput.prototype.signer = "";
|
119960
|
+
|
117758
119961
|
/**
|
117759
119962
|
* SigningInput signDirectMessage.
|
117760
119963
|
* @member {TW.Sui.Proto.ISignDirect|null|undefined} signDirectMessage
|
@@ -117763,17 +119966,81 @@
|
|
117763
119966
|
*/
|
117764
119967
|
SigningInput.prototype.signDirectMessage = null;
|
117765
119968
|
|
119969
|
+
/**
|
119970
|
+
* SigningInput pay.
|
119971
|
+
* @member {TW.Sui.Proto.IPay|null|undefined} pay
|
119972
|
+
* @memberof TW.Sui.Proto.SigningInput
|
119973
|
+
* @instance
|
119974
|
+
*/
|
119975
|
+
SigningInput.prototype.pay = null;
|
119976
|
+
|
119977
|
+
/**
|
119978
|
+
* SigningInput paySui.
|
119979
|
+
* @member {TW.Sui.Proto.IPaySui|null|undefined} paySui
|
119980
|
+
* @memberof TW.Sui.Proto.SigningInput
|
119981
|
+
* @instance
|
119982
|
+
*/
|
119983
|
+
SigningInput.prototype.paySui = null;
|
119984
|
+
|
119985
|
+
/**
|
119986
|
+
* SigningInput payAllSui.
|
119987
|
+
* @member {TW.Sui.Proto.IPayAllSui|null|undefined} payAllSui
|
119988
|
+
* @memberof TW.Sui.Proto.SigningInput
|
119989
|
+
* @instance
|
119990
|
+
*/
|
119991
|
+
SigningInput.prototype.payAllSui = null;
|
119992
|
+
|
119993
|
+
/**
|
119994
|
+
* SigningInput requestAddStake.
|
119995
|
+
* @member {TW.Sui.Proto.IRequestAddStake|null|undefined} requestAddStake
|
119996
|
+
* @memberof TW.Sui.Proto.SigningInput
|
119997
|
+
* @instance
|
119998
|
+
*/
|
119999
|
+
SigningInput.prototype.requestAddStake = null;
|
120000
|
+
|
120001
|
+
/**
|
120002
|
+
* SigningInput requestWithdrawStake.
|
120003
|
+
* @member {TW.Sui.Proto.IRequestWithdrawStake|null|undefined} requestWithdrawStake
|
120004
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120005
|
+
* @instance
|
120006
|
+
*/
|
120007
|
+
SigningInput.prototype.requestWithdrawStake = null;
|
120008
|
+
|
120009
|
+
/**
|
120010
|
+
* SigningInput transferObject.
|
120011
|
+
* @member {TW.Sui.Proto.ITransferObject|null|undefined} transferObject
|
120012
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120013
|
+
* @instance
|
120014
|
+
*/
|
120015
|
+
SigningInput.prototype.transferObject = null;
|
120016
|
+
|
120017
|
+
/**
|
120018
|
+
* SigningInput gasBudget.
|
120019
|
+
* @member {Long} gasBudget
|
120020
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120021
|
+
* @instance
|
120022
|
+
*/
|
120023
|
+
SigningInput.prototype.gasBudget = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
120024
|
+
|
120025
|
+
/**
|
120026
|
+
* SigningInput referenceGasPrice.
|
120027
|
+
* @member {Long} referenceGasPrice
|
120028
|
+
* @memberof TW.Sui.Proto.SigningInput
|
120029
|
+
* @instance
|
120030
|
+
*/
|
120031
|
+
SigningInput.prototype.referenceGasPrice = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
120032
|
+
|
117766
120033
|
// OneOf field names bound to virtual getters and setters
|
117767
120034
|
var $oneOfFields;
|
117768
120035
|
|
117769
120036
|
/**
|
117770
120037
|
* SigningInput transactionPayload.
|
117771
|
-
* @member {"signDirectMessage"|undefined} transactionPayload
|
120038
|
+
* @member {"signDirectMessage"|"pay"|"paySui"|"payAllSui"|"requestAddStake"|"requestWithdrawStake"|"transferObject"|undefined} transactionPayload
|
117772
120039
|
* @memberof TW.Sui.Proto.SigningInput
|
117773
120040
|
* @instance
|
117774
120041
|
*/
|
117775
120042
|
Object.defineProperty(SigningInput.prototype, "transactionPayload", {
|
117776
|
-
get: $util.oneOfGetter($oneOfFields = ["signDirectMessage"]),
|
120043
|
+
get: $util.oneOfGetter($oneOfFields = ["signDirectMessage", "pay", "paySui", "payAllSui", "requestAddStake", "requestWithdrawStake", "transferObject"]),
|
117777
120044
|
set: $util.oneOfSetter($oneOfFields)
|
117778
120045
|
});
|
117779
120046
|
|
@@ -117803,8 +120070,26 @@
|
|
117803
120070
|
writer = $Writer.create();
|
117804
120071
|
if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
|
117805
120072
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
|
120073
|
+
if (message.signer != null && Object.hasOwnProperty.call(message, "signer"))
|
120074
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.signer);
|
117806
120075
|
if (message.signDirectMessage != null && Object.hasOwnProperty.call(message, "signDirectMessage"))
|
117807
|
-
$root.TW.Sui.Proto.SignDirect.encode(message.signDirectMessage, writer.uint32(/* id
|
120076
|
+
$root.TW.Sui.Proto.SignDirect.encode(message.signDirectMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
120077
|
+
if (message.pay != null && Object.hasOwnProperty.call(message, "pay"))
|
120078
|
+
$root.TW.Sui.Proto.Pay.encode(message.pay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
120079
|
+
if (message.paySui != null && Object.hasOwnProperty.call(message, "paySui"))
|
120080
|
+
$root.TW.Sui.Proto.PaySui.encode(message.paySui, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
120081
|
+
if (message.payAllSui != null && Object.hasOwnProperty.call(message, "payAllSui"))
|
120082
|
+
$root.TW.Sui.Proto.PayAllSui.encode(message.payAllSui, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
120083
|
+
if (message.requestAddStake != null && Object.hasOwnProperty.call(message, "requestAddStake"))
|
120084
|
+
$root.TW.Sui.Proto.RequestAddStake.encode(message.requestAddStake, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
120085
|
+
if (message.requestWithdrawStake != null && Object.hasOwnProperty.call(message, "requestWithdrawStake"))
|
120086
|
+
$root.TW.Sui.Proto.RequestWithdrawStake.encode(message.requestWithdrawStake, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
120087
|
+
if (message.transferObject != null && Object.hasOwnProperty.call(message, "transferObject"))
|
120088
|
+
$root.TW.Sui.Proto.TransferObject.encode(message.transferObject, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
120089
|
+
if (message.gasBudget != null && Object.hasOwnProperty.call(message, "gasBudget"))
|
120090
|
+
writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.gasBudget);
|
120091
|
+
if (message.referenceGasPrice != null && Object.hasOwnProperty.call(message, "referenceGasPrice"))
|
120092
|
+
writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.referenceGasPrice);
|
117808
120093
|
return writer;
|
117809
120094
|
};
|
117810
120095
|
|
@@ -117830,8 +120115,35 @@
|
|
117830
120115
|
message.privateKey = reader.bytes();
|
117831
120116
|
break;
|
117832
120117
|
case 2:
|
120118
|
+
message.signer = reader.string();
|
120119
|
+
break;
|
120120
|
+
case 3:
|
117833
120121
|
message.signDirectMessage = $root.TW.Sui.Proto.SignDirect.decode(reader, reader.uint32());
|
117834
120122
|
break;
|
120123
|
+
case 4:
|
120124
|
+
message.pay = $root.TW.Sui.Proto.Pay.decode(reader, reader.uint32());
|
120125
|
+
break;
|
120126
|
+
case 5:
|
120127
|
+
message.paySui = $root.TW.Sui.Proto.PaySui.decode(reader, reader.uint32());
|
120128
|
+
break;
|
120129
|
+
case 6:
|
120130
|
+
message.payAllSui = $root.TW.Sui.Proto.PayAllSui.decode(reader, reader.uint32());
|
120131
|
+
break;
|
120132
|
+
case 7:
|
120133
|
+
message.requestAddStake = $root.TW.Sui.Proto.RequestAddStake.decode(reader, reader.uint32());
|
120134
|
+
break;
|
120135
|
+
case 8:
|
120136
|
+
message.requestWithdrawStake = $root.TW.Sui.Proto.RequestWithdrawStake.decode(reader, reader.uint32());
|
120137
|
+
break;
|
120138
|
+
case 9:
|
120139
|
+
message.transferObject = $root.TW.Sui.Proto.TransferObject.decode(reader, reader.uint32());
|
120140
|
+
break;
|
120141
|
+
case 12:
|
120142
|
+
message.gasBudget = reader.uint64();
|
120143
|
+
break;
|
120144
|
+
case 13:
|
120145
|
+
message.referenceGasPrice = reader.uint64();
|
120146
|
+
break;
|
117835
120147
|
default:
|
117836
120148
|
reader.skipType(tag & 7);
|
117837
120149
|
break;
|
@@ -117855,6 +120167,9 @@
|
|
117855
120167
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
117856
120168
|
if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
|
117857
120169
|
return "privateKey: buffer expected";
|
120170
|
+
if (message.signer != null && message.hasOwnProperty("signer"))
|
120171
|
+
if (!$util.isString(message.signer))
|
120172
|
+
return "signer: string expected";
|
117858
120173
|
if (message.signDirectMessage != null && message.hasOwnProperty("signDirectMessage")) {
|
117859
120174
|
properties.transactionPayload = 1;
|
117860
120175
|
{
|
@@ -117863,6 +120178,72 @@
|
|
117863
120178
|
return "signDirectMessage." + error;
|
117864
120179
|
}
|
117865
120180
|
}
|
120181
|
+
if (message.pay != null && message.hasOwnProperty("pay")) {
|
120182
|
+
if (properties.transactionPayload === 1)
|
120183
|
+
return "transactionPayload: multiple values";
|
120184
|
+
properties.transactionPayload = 1;
|
120185
|
+
{
|
120186
|
+
var error = $root.TW.Sui.Proto.Pay.verify(message.pay);
|
120187
|
+
if (error)
|
120188
|
+
return "pay." + error;
|
120189
|
+
}
|
120190
|
+
}
|
120191
|
+
if (message.paySui != null && message.hasOwnProperty("paySui")) {
|
120192
|
+
if (properties.transactionPayload === 1)
|
120193
|
+
return "transactionPayload: multiple values";
|
120194
|
+
properties.transactionPayload = 1;
|
120195
|
+
{
|
120196
|
+
var error = $root.TW.Sui.Proto.PaySui.verify(message.paySui);
|
120197
|
+
if (error)
|
120198
|
+
return "paySui." + error;
|
120199
|
+
}
|
120200
|
+
}
|
120201
|
+
if (message.payAllSui != null && message.hasOwnProperty("payAllSui")) {
|
120202
|
+
if (properties.transactionPayload === 1)
|
120203
|
+
return "transactionPayload: multiple values";
|
120204
|
+
properties.transactionPayload = 1;
|
120205
|
+
{
|
120206
|
+
var error = $root.TW.Sui.Proto.PayAllSui.verify(message.payAllSui);
|
120207
|
+
if (error)
|
120208
|
+
return "payAllSui." + error;
|
120209
|
+
}
|
120210
|
+
}
|
120211
|
+
if (message.requestAddStake != null && message.hasOwnProperty("requestAddStake")) {
|
120212
|
+
if (properties.transactionPayload === 1)
|
120213
|
+
return "transactionPayload: multiple values";
|
120214
|
+
properties.transactionPayload = 1;
|
120215
|
+
{
|
120216
|
+
var error = $root.TW.Sui.Proto.RequestAddStake.verify(message.requestAddStake);
|
120217
|
+
if (error)
|
120218
|
+
return "requestAddStake." + error;
|
120219
|
+
}
|
120220
|
+
}
|
120221
|
+
if (message.requestWithdrawStake != null && message.hasOwnProperty("requestWithdrawStake")) {
|
120222
|
+
if (properties.transactionPayload === 1)
|
120223
|
+
return "transactionPayload: multiple values";
|
120224
|
+
properties.transactionPayload = 1;
|
120225
|
+
{
|
120226
|
+
var error = $root.TW.Sui.Proto.RequestWithdrawStake.verify(message.requestWithdrawStake);
|
120227
|
+
if (error)
|
120228
|
+
return "requestWithdrawStake." + error;
|
120229
|
+
}
|
120230
|
+
}
|
120231
|
+
if (message.transferObject != null && message.hasOwnProperty("transferObject")) {
|
120232
|
+
if (properties.transactionPayload === 1)
|
120233
|
+
return "transactionPayload: multiple values";
|
120234
|
+
properties.transactionPayload = 1;
|
120235
|
+
{
|
120236
|
+
var error = $root.TW.Sui.Proto.TransferObject.verify(message.transferObject);
|
120237
|
+
if (error)
|
120238
|
+
return "transferObject." + error;
|
120239
|
+
}
|
120240
|
+
}
|
120241
|
+
if (message.gasBudget != null && message.hasOwnProperty("gasBudget"))
|
120242
|
+
if (!$util.isInteger(message.gasBudget) && !(message.gasBudget && $util.isInteger(message.gasBudget.low) && $util.isInteger(message.gasBudget.high)))
|
120243
|
+
return "gasBudget: integer|Long expected";
|
120244
|
+
if (message.referenceGasPrice != null && message.hasOwnProperty("referenceGasPrice"))
|
120245
|
+
if (!$util.isInteger(message.referenceGasPrice) && !(message.referenceGasPrice && $util.isInteger(message.referenceGasPrice.low) && $util.isInteger(message.referenceGasPrice.high)))
|
120246
|
+
return "referenceGasPrice: integer|Long expected";
|
117866
120247
|
return null;
|
117867
120248
|
};
|
117868
120249
|
|
@@ -117883,11 +120264,61 @@
|
|
117883
120264
|
$util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
|
117884
120265
|
else if (object.privateKey.length)
|
117885
120266
|
message.privateKey = object.privateKey;
|
120267
|
+
if (object.signer != null)
|
120268
|
+
message.signer = String(object.signer);
|
117886
120269
|
if (object.signDirectMessage != null) {
|
117887
120270
|
if (typeof object.signDirectMessage !== "object")
|
117888
120271
|
throw TypeError(".TW.Sui.Proto.SigningInput.signDirectMessage: object expected");
|
117889
120272
|
message.signDirectMessage = $root.TW.Sui.Proto.SignDirect.fromObject(object.signDirectMessage);
|
117890
120273
|
}
|
120274
|
+
if (object.pay != null) {
|
120275
|
+
if (typeof object.pay !== "object")
|
120276
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.pay: object expected");
|
120277
|
+
message.pay = $root.TW.Sui.Proto.Pay.fromObject(object.pay);
|
120278
|
+
}
|
120279
|
+
if (object.paySui != null) {
|
120280
|
+
if (typeof object.paySui !== "object")
|
120281
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.paySui: object expected");
|
120282
|
+
message.paySui = $root.TW.Sui.Proto.PaySui.fromObject(object.paySui);
|
120283
|
+
}
|
120284
|
+
if (object.payAllSui != null) {
|
120285
|
+
if (typeof object.payAllSui !== "object")
|
120286
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.payAllSui: object expected");
|
120287
|
+
message.payAllSui = $root.TW.Sui.Proto.PayAllSui.fromObject(object.payAllSui);
|
120288
|
+
}
|
120289
|
+
if (object.requestAddStake != null) {
|
120290
|
+
if (typeof object.requestAddStake !== "object")
|
120291
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.requestAddStake: object expected");
|
120292
|
+
message.requestAddStake = $root.TW.Sui.Proto.RequestAddStake.fromObject(object.requestAddStake);
|
120293
|
+
}
|
120294
|
+
if (object.requestWithdrawStake != null) {
|
120295
|
+
if (typeof object.requestWithdrawStake !== "object")
|
120296
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.requestWithdrawStake: object expected");
|
120297
|
+
message.requestWithdrawStake = $root.TW.Sui.Proto.RequestWithdrawStake.fromObject(object.requestWithdrawStake);
|
120298
|
+
}
|
120299
|
+
if (object.transferObject != null) {
|
120300
|
+
if (typeof object.transferObject !== "object")
|
120301
|
+
throw TypeError(".TW.Sui.Proto.SigningInput.transferObject: object expected");
|
120302
|
+
message.transferObject = $root.TW.Sui.Proto.TransferObject.fromObject(object.transferObject);
|
120303
|
+
}
|
120304
|
+
if (object.gasBudget != null)
|
120305
|
+
if ($util.Long)
|
120306
|
+
(message.gasBudget = $util.Long.fromValue(object.gasBudget)).unsigned = true;
|
120307
|
+
else if (typeof object.gasBudget === "string")
|
120308
|
+
message.gasBudget = parseInt(object.gasBudget, 10);
|
120309
|
+
else if (typeof object.gasBudget === "number")
|
120310
|
+
message.gasBudget = object.gasBudget;
|
120311
|
+
else if (typeof object.gasBudget === "object")
|
120312
|
+
message.gasBudget = new $util.LongBits(object.gasBudget.low >>> 0, object.gasBudget.high >>> 0).toNumber(true);
|
120313
|
+
if (object.referenceGasPrice != null)
|
120314
|
+
if ($util.Long)
|
120315
|
+
(message.referenceGasPrice = $util.Long.fromValue(object.referenceGasPrice)).unsigned = true;
|
120316
|
+
else if (typeof object.referenceGasPrice === "string")
|
120317
|
+
message.referenceGasPrice = parseInt(object.referenceGasPrice, 10);
|
120318
|
+
else if (typeof object.referenceGasPrice === "number")
|
120319
|
+
message.referenceGasPrice = object.referenceGasPrice;
|
120320
|
+
else if (typeof object.referenceGasPrice === "object")
|
120321
|
+
message.referenceGasPrice = new $util.LongBits(object.referenceGasPrice.low >>> 0, object.referenceGasPrice.high >>> 0).toNumber(true);
|
117891
120322
|
return message;
|
117892
120323
|
};
|
117893
120324
|
|
@@ -117904,7 +120335,7 @@
|
|
117904
120335
|
if (!options)
|
117905
120336
|
options = {};
|
117906
120337
|
var object = {};
|
117907
|
-
if (options.defaults)
|
120338
|
+
if (options.defaults) {
|
117908
120339
|
if (options.bytes === String)
|
117909
120340
|
object.privateKey = "";
|
117910
120341
|
else {
|
@@ -117912,13 +120343,67 @@
|
|
117912
120343
|
if (options.bytes !== Array)
|
117913
120344
|
object.privateKey = $util.newBuffer(object.privateKey);
|
117914
120345
|
}
|
120346
|
+
object.signer = "";
|
120347
|
+
if ($util.Long) {
|
120348
|
+
var long = new $util.Long(0, 0, true);
|
120349
|
+
object.gasBudget = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
120350
|
+
} else
|
120351
|
+
object.gasBudget = options.longs === String ? "0" : 0;
|
120352
|
+
if ($util.Long) {
|
120353
|
+
var long = new $util.Long(0, 0, true);
|
120354
|
+
object.referenceGasPrice = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
120355
|
+
} else
|
120356
|
+
object.referenceGasPrice = options.longs === String ? "0" : 0;
|
120357
|
+
}
|
117915
120358
|
if (message.privateKey != null && message.hasOwnProperty("privateKey"))
|
117916
120359
|
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;
|
120360
|
+
if (message.signer != null && message.hasOwnProperty("signer"))
|
120361
|
+
object.signer = message.signer;
|
117917
120362
|
if (message.signDirectMessage != null && message.hasOwnProperty("signDirectMessage")) {
|
117918
120363
|
object.signDirectMessage = $root.TW.Sui.Proto.SignDirect.toObject(message.signDirectMessage, options);
|
117919
120364
|
if (options.oneofs)
|
117920
120365
|
object.transactionPayload = "signDirectMessage";
|
117921
120366
|
}
|
120367
|
+
if (message.pay != null && message.hasOwnProperty("pay")) {
|
120368
|
+
object.pay = $root.TW.Sui.Proto.Pay.toObject(message.pay, options);
|
120369
|
+
if (options.oneofs)
|
120370
|
+
object.transactionPayload = "pay";
|
120371
|
+
}
|
120372
|
+
if (message.paySui != null && message.hasOwnProperty("paySui")) {
|
120373
|
+
object.paySui = $root.TW.Sui.Proto.PaySui.toObject(message.paySui, options);
|
120374
|
+
if (options.oneofs)
|
120375
|
+
object.transactionPayload = "paySui";
|
120376
|
+
}
|
120377
|
+
if (message.payAllSui != null && message.hasOwnProperty("payAllSui")) {
|
120378
|
+
object.payAllSui = $root.TW.Sui.Proto.PayAllSui.toObject(message.payAllSui, options);
|
120379
|
+
if (options.oneofs)
|
120380
|
+
object.transactionPayload = "payAllSui";
|
120381
|
+
}
|
120382
|
+
if (message.requestAddStake != null && message.hasOwnProperty("requestAddStake")) {
|
120383
|
+
object.requestAddStake = $root.TW.Sui.Proto.RequestAddStake.toObject(message.requestAddStake, options);
|
120384
|
+
if (options.oneofs)
|
120385
|
+
object.transactionPayload = "requestAddStake";
|
120386
|
+
}
|
120387
|
+
if (message.requestWithdrawStake != null && message.hasOwnProperty("requestWithdrawStake")) {
|
120388
|
+
object.requestWithdrawStake = $root.TW.Sui.Proto.RequestWithdrawStake.toObject(message.requestWithdrawStake, options);
|
120389
|
+
if (options.oneofs)
|
120390
|
+
object.transactionPayload = "requestWithdrawStake";
|
120391
|
+
}
|
120392
|
+
if (message.transferObject != null && message.hasOwnProperty("transferObject")) {
|
120393
|
+
object.transferObject = $root.TW.Sui.Proto.TransferObject.toObject(message.transferObject, options);
|
120394
|
+
if (options.oneofs)
|
120395
|
+
object.transactionPayload = "transferObject";
|
120396
|
+
}
|
120397
|
+
if (message.gasBudget != null && message.hasOwnProperty("gasBudget"))
|
120398
|
+
if (typeof message.gasBudget === "number")
|
120399
|
+
object.gasBudget = options.longs === String ? String(message.gasBudget) : message.gasBudget;
|
120400
|
+
else
|
120401
|
+
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;
|
120402
|
+
if (message.referenceGasPrice != null && message.hasOwnProperty("referenceGasPrice"))
|
120403
|
+
if (typeof message.referenceGasPrice === "number")
|
120404
|
+
object.referenceGasPrice = options.longs === String ? String(message.referenceGasPrice) : message.referenceGasPrice;
|
120405
|
+
else
|
120406
|
+
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
120407
|
return object;
|
117923
120408
|
};
|
117924
120409
|
|