@trustwallet/wallet-core 3.1.18 → 3.1.19

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.
@@ -80482,6 +80482,1098 @@
80482
80482
  return FreezeBalanceContract;
80483
80483
  })();
80484
80484
 
80485
+ Proto.FreezeBalanceV2Contract = (function() {
80486
+
80487
+ /**
80488
+ * Properties of a FreezeBalanceV2Contract.
80489
+ * @memberof TW.Tron.Proto
80490
+ * @interface IFreezeBalanceV2Contract
80491
+ * @property {string|null} [ownerAddress] FreezeBalanceV2Contract ownerAddress
80492
+ * @property {Long|null} [frozenBalance] FreezeBalanceV2Contract frozenBalance
80493
+ * @property {string|null} [resource] FreezeBalanceV2Contract resource
80494
+ */
80495
+
80496
+ /**
80497
+ * Constructs a new FreezeBalanceV2Contract.
80498
+ * @memberof TW.Tron.Proto
80499
+ * @classdesc Represents a FreezeBalanceV2Contract.
80500
+ * @implements IFreezeBalanceV2Contract
80501
+ * @constructor
80502
+ * @param {TW.Tron.Proto.IFreezeBalanceV2Contract=} [properties] Properties to set
80503
+ */
80504
+ function FreezeBalanceV2Contract(properties) {
80505
+ if (properties)
80506
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
80507
+ if (properties[keys[i]] != null)
80508
+ this[keys[i]] = properties[keys[i]];
80509
+ }
80510
+
80511
+ /**
80512
+ * FreezeBalanceV2Contract ownerAddress.
80513
+ * @member {string} ownerAddress
80514
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80515
+ * @instance
80516
+ */
80517
+ FreezeBalanceV2Contract.prototype.ownerAddress = "";
80518
+
80519
+ /**
80520
+ * FreezeBalanceV2Contract frozenBalance.
80521
+ * @member {Long} frozenBalance
80522
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80523
+ * @instance
80524
+ */
80525
+ FreezeBalanceV2Contract.prototype.frozenBalance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
80526
+
80527
+ /**
80528
+ * FreezeBalanceV2Contract resource.
80529
+ * @member {string} resource
80530
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80531
+ * @instance
80532
+ */
80533
+ FreezeBalanceV2Contract.prototype.resource = "";
80534
+
80535
+ /**
80536
+ * Creates a new FreezeBalanceV2Contract instance using the specified properties.
80537
+ * @function create
80538
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80539
+ * @static
80540
+ * @param {TW.Tron.Proto.IFreezeBalanceV2Contract=} [properties] Properties to set
80541
+ * @returns {TW.Tron.Proto.FreezeBalanceV2Contract} FreezeBalanceV2Contract instance
80542
+ */
80543
+ FreezeBalanceV2Contract.create = function create(properties) {
80544
+ return new FreezeBalanceV2Contract(properties);
80545
+ };
80546
+
80547
+ /**
80548
+ * Encodes the specified FreezeBalanceV2Contract message. Does not implicitly {@link TW.Tron.Proto.FreezeBalanceV2Contract.verify|verify} messages.
80549
+ * @function encode
80550
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80551
+ * @static
80552
+ * @param {TW.Tron.Proto.IFreezeBalanceV2Contract} message FreezeBalanceV2Contract message or plain object to encode
80553
+ * @param {$protobuf.Writer} [writer] Writer to encode to
80554
+ * @returns {$protobuf.Writer} Writer
80555
+ */
80556
+ FreezeBalanceV2Contract.encode = function encode(message, writer) {
80557
+ if (!writer)
80558
+ writer = $Writer.create();
80559
+ if (message.ownerAddress != null && Object.hasOwnProperty.call(message, "ownerAddress"))
80560
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.ownerAddress);
80561
+ if (message.frozenBalance != null && Object.hasOwnProperty.call(message, "frozenBalance"))
80562
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.frozenBalance);
80563
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
80564
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource);
80565
+ return writer;
80566
+ };
80567
+
80568
+ /**
80569
+ * Decodes a FreezeBalanceV2Contract message from the specified reader or buffer.
80570
+ * @function decode
80571
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80572
+ * @static
80573
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
80574
+ * @param {number} [length] Message length if known beforehand
80575
+ * @returns {TW.Tron.Proto.FreezeBalanceV2Contract} FreezeBalanceV2Contract
80576
+ * @throws {Error} If the payload is not a reader or valid buffer
80577
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
80578
+ */
80579
+ FreezeBalanceV2Contract.decode = function decode(reader, length) {
80580
+ if (!(reader instanceof $Reader))
80581
+ reader = $Reader.create(reader);
80582
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Tron.Proto.FreezeBalanceV2Contract();
80583
+ while (reader.pos < end) {
80584
+ var tag = reader.uint32();
80585
+ switch (tag >>> 3) {
80586
+ case 1:
80587
+ message.ownerAddress = reader.string();
80588
+ break;
80589
+ case 2:
80590
+ message.frozenBalance = reader.int64();
80591
+ break;
80592
+ case 3:
80593
+ message.resource = reader.string();
80594
+ break;
80595
+ default:
80596
+ reader.skipType(tag & 7);
80597
+ break;
80598
+ }
80599
+ }
80600
+ return message;
80601
+ };
80602
+
80603
+ /**
80604
+ * Verifies a FreezeBalanceV2Contract message.
80605
+ * @function verify
80606
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80607
+ * @static
80608
+ * @param {Object.<string,*>} message Plain object to verify
80609
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
80610
+ */
80611
+ FreezeBalanceV2Contract.verify = function verify(message) {
80612
+ if (typeof message !== "object" || message === null)
80613
+ return "object expected";
80614
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
80615
+ if (!$util.isString(message.ownerAddress))
80616
+ return "ownerAddress: string expected";
80617
+ if (message.frozenBalance != null && message.hasOwnProperty("frozenBalance"))
80618
+ if (!$util.isInteger(message.frozenBalance) && !(message.frozenBalance && $util.isInteger(message.frozenBalance.low) && $util.isInteger(message.frozenBalance.high)))
80619
+ return "frozenBalance: integer|Long expected";
80620
+ if (message.resource != null && message.hasOwnProperty("resource"))
80621
+ if (!$util.isString(message.resource))
80622
+ return "resource: string expected";
80623
+ return null;
80624
+ };
80625
+
80626
+ /**
80627
+ * Creates a FreezeBalanceV2Contract message from a plain object. Also converts values to their respective internal types.
80628
+ * @function fromObject
80629
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80630
+ * @static
80631
+ * @param {Object.<string,*>} object Plain object
80632
+ * @returns {TW.Tron.Proto.FreezeBalanceV2Contract} FreezeBalanceV2Contract
80633
+ */
80634
+ FreezeBalanceV2Contract.fromObject = function fromObject(object) {
80635
+ if (object instanceof $root.TW.Tron.Proto.FreezeBalanceV2Contract)
80636
+ return object;
80637
+ var message = new $root.TW.Tron.Proto.FreezeBalanceV2Contract();
80638
+ if (object.ownerAddress != null)
80639
+ message.ownerAddress = String(object.ownerAddress);
80640
+ if (object.frozenBalance != null)
80641
+ if ($util.Long)
80642
+ (message.frozenBalance = $util.Long.fromValue(object.frozenBalance)).unsigned = false;
80643
+ else if (typeof object.frozenBalance === "string")
80644
+ message.frozenBalance = parseInt(object.frozenBalance, 10);
80645
+ else if (typeof object.frozenBalance === "number")
80646
+ message.frozenBalance = object.frozenBalance;
80647
+ else if (typeof object.frozenBalance === "object")
80648
+ message.frozenBalance = new $util.LongBits(object.frozenBalance.low >>> 0, object.frozenBalance.high >>> 0).toNumber();
80649
+ if (object.resource != null)
80650
+ message.resource = String(object.resource);
80651
+ return message;
80652
+ };
80653
+
80654
+ /**
80655
+ * Creates a plain object from a FreezeBalanceV2Contract message. Also converts values to other types if specified.
80656
+ * @function toObject
80657
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80658
+ * @static
80659
+ * @param {TW.Tron.Proto.FreezeBalanceV2Contract} message FreezeBalanceV2Contract
80660
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
80661
+ * @returns {Object.<string,*>} Plain object
80662
+ */
80663
+ FreezeBalanceV2Contract.toObject = function toObject(message, options) {
80664
+ if (!options)
80665
+ options = {};
80666
+ var object = {};
80667
+ if (options.defaults) {
80668
+ object.ownerAddress = "";
80669
+ if ($util.Long) {
80670
+ var long = new $util.Long(0, 0, false);
80671
+ object.frozenBalance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
80672
+ } else
80673
+ object.frozenBalance = options.longs === String ? "0" : 0;
80674
+ object.resource = "";
80675
+ }
80676
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
80677
+ object.ownerAddress = message.ownerAddress;
80678
+ if (message.frozenBalance != null && message.hasOwnProperty("frozenBalance"))
80679
+ if (typeof message.frozenBalance === "number")
80680
+ object.frozenBalance = options.longs === String ? String(message.frozenBalance) : message.frozenBalance;
80681
+ else
80682
+ object.frozenBalance = options.longs === String ? $util.Long.prototype.toString.call(message.frozenBalance) : options.longs === Number ? new $util.LongBits(message.frozenBalance.low >>> 0, message.frozenBalance.high >>> 0).toNumber() : message.frozenBalance;
80683
+ if (message.resource != null && message.hasOwnProperty("resource"))
80684
+ object.resource = message.resource;
80685
+ return object;
80686
+ };
80687
+
80688
+ /**
80689
+ * Converts this FreezeBalanceV2Contract to JSON.
80690
+ * @function toJSON
80691
+ * @memberof TW.Tron.Proto.FreezeBalanceV2Contract
80692
+ * @instance
80693
+ * @returns {Object.<string,*>} JSON object
80694
+ */
80695
+ FreezeBalanceV2Contract.prototype.toJSON = function toJSON() {
80696
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
80697
+ };
80698
+
80699
+ return FreezeBalanceV2Contract;
80700
+ })();
80701
+
80702
+ Proto.UnfreezeBalanceV2Contract = (function() {
80703
+
80704
+ /**
80705
+ * Properties of an UnfreezeBalanceV2Contract.
80706
+ * @memberof TW.Tron.Proto
80707
+ * @interface IUnfreezeBalanceV2Contract
80708
+ * @property {string|null} [ownerAddress] UnfreezeBalanceV2Contract ownerAddress
80709
+ * @property {Long|null} [unfreezeBalance] UnfreezeBalanceV2Contract unfreezeBalance
80710
+ * @property {string|null} [resource] UnfreezeBalanceV2Contract resource
80711
+ */
80712
+
80713
+ /**
80714
+ * Constructs a new UnfreezeBalanceV2Contract.
80715
+ * @memberof TW.Tron.Proto
80716
+ * @classdesc Represents an UnfreezeBalanceV2Contract.
80717
+ * @implements IUnfreezeBalanceV2Contract
80718
+ * @constructor
80719
+ * @param {TW.Tron.Proto.IUnfreezeBalanceV2Contract=} [properties] Properties to set
80720
+ */
80721
+ function UnfreezeBalanceV2Contract(properties) {
80722
+ if (properties)
80723
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
80724
+ if (properties[keys[i]] != null)
80725
+ this[keys[i]] = properties[keys[i]];
80726
+ }
80727
+
80728
+ /**
80729
+ * UnfreezeBalanceV2Contract ownerAddress.
80730
+ * @member {string} ownerAddress
80731
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80732
+ * @instance
80733
+ */
80734
+ UnfreezeBalanceV2Contract.prototype.ownerAddress = "";
80735
+
80736
+ /**
80737
+ * UnfreezeBalanceV2Contract unfreezeBalance.
80738
+ * @member {Long} unfreezeBalance
80739
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80740
+ * @instance
80741
+ */
80742
+ UnfreezeBalanceV2Contract.prototype.unfreezeBalance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
80743
+
80744
+ /**
80745
+ * UnfreezeBalanceV2Contract resource.
80746
+ * @member {string} resource
80747
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80748
+ * @instance
80749
+ */
80750
+ UnfreezeBalanceV2Contract.prototype.resource = "";
80751
+
80752
+ /**
80753
+ * Creates a new UnfreezeBalanceV2Contract instance using the specified properties.
80754
+ * @function create
80755
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80756
+ * @static
80757
+ * @param {TW.Tron.Proto.IUnfreezeBalanceV2Contract=} [properties] Properties to set
80758
+ * @returns {TW.Tron.Proto.UnfreezeBalanceV2Contract} UnfreezeBalanceV2Contract instance
80759
+ */
80760
+ UnfreezeBalanceV2Contract.create = function create(properties) {
80761
+ return new UnfreezeBalanceV2Contract(properties);
80762
+ };
80763
+
80764
+ /**
80765
+ * Encodes the specified UnfreezeBalanceV2Contract message. Does not implicitly {@link TW.Tron.Proto.UnfreezeBalanceV2Contract.verify|verify} messages.
80766
+ * @function encode
80767
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80768
+ * @static
80769
+ * @param {TW.Tron.Proto.IUnfreezeBalanceV2Contract} message UnfreezeBalanceV2Contract message or plain object to encode
80770
+ * @param {$protobuf.Writer} [writer] Writer to encode to
80771
+ * @returns {$protobuf.Writer} Writer
80772
+ */
80773
+ UnfreezeBalanceV2Contract.encode = function encode(message, writer) {
80774
+ if (!writer)
80775
+ writer = $Writer.create();
80776
+ if (message.ownerAddress != null && Object.hasOwnProperty.call(message, "ownerAddress"))
80777
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.ownerAddress);
80778
+ if (message.unfreezeBalance != null && Object.hasOwnProperty.call(message, "unfreezeBalance"))
80779
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.unfreezeBalance);
80780
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
80781
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource);
80782
+ return writer;
80783
+ };
80784
+
80785
+ /**
80786
+ * Decodes an UnfreezeBalanceV2Contract message from the specified reader or buffer.
80787
+ * @function decode
80788
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80789
+ * @static
80790
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
80791
+ * @param {number} [length] Message length if known beforehand
80792
+ * @returns {TW.Tron.Proto.UnfreezeBalanceV2Contract} UnfreezeBalanceV2Contract
80793
+ * @throws {Error} If the payload is not a reader or valid buffer
80794
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
80795
+ */
80796
+ UnfreezeBalanceV2Contract.decode = function decode(reader, length) {
80797
+ if (!(reader instanceof $Reader))
80798
+ reader = $Reader.create(reader);
80799
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Tron.Proto.UnfreezeBalanceV2Contract();
80800
+ while (reader.pos < end) {
80801
+ var tag = reader.uint32();
80802
+ switch (tag >>> 3) {
80803
+ case 1:
80804
+ message.ownerAddress = reader.string();
80805
+ break;
80806
+ case 2:
80807
+ message.unfreezeBalance = reader.int64();
80808
+ break;
80809
+ case 3:
80810
+ message.resource = reader.string();
80811
+ break;
80812
+ default:
80813
+ reader.skipType(tag & 7);
80814
+ break;
80815
+ }
80816
+ }
80817
+ return message;
80818
+ };
80819
+
80820
+ /**
80821
+ * Verifies an UnfreezeBalanceV2Contract message.
80822
+ * @function verify
80823
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80824
+ * @static
80825
+ * @param {Object.<string,*>} message Plain object to verify
80826
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
80827
+ */
80828
+ UnfreezeBalanceV2Contract.verify = function verify(message) {
80829
+ if (typeof message !== "object" || message === null)
80830
+ return "object expected";
80831
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
80832
+ if (!$util.isString(message.ownerAddress))
80833
+ return "ownerAddress: string expected";
80834
+ if (message.unfreezeBalance != null && message.hasOwnProperty("unfreezeBalance"))
80835
+ if (!$util.isInteger(message.unfreezeBalance) && !(message.unfreezeBalance && $util.isInteger(message.unfreezeBalance.low) && $util.isInteger(message.unfreezeBalance.high)))
80836
+ return "unfreezeBalance: integer|Long expected";
80837
+ if (message.resource != null && message.hasOwnProperty("resource"))
80838
+ if (!$util.isString(message.resource))
80839
+ return "resource: string expected";
80840
+ return null;
80841
+ };
80842
+
80843
+ /**
80844
+ * Creates an UnfreezeBalanceV2Contract message from a plain object. Also converts values to their respective internal types.
80845
+ * @function fromObject
80846
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80847
+ * @static
80848
+ * @param {Object.<string,*>} object Plain object
80849
+ * @returns {TW.Tron.Proto.UnfreezeBalanceV2Contract} UnfreezeBalanceV2Contract
80850
+ */
80851
+ UnfreezeBalanceV2Contract.fromObject = function fromObject(object) {
80852
+ if (object instanceof $root.TW.Tron.Proto.UnfreezeBalanceV2Contract)
80853
+ return object;
80854
+ var message = new $root.TW.Tron.Proto.UnfreezeBalanceV2Contract();
80855
+ if (object.ownerAddress != null)
80856
+ message.ownerAddress = String(object.ownerAddress);
80857
+ if (object.unfreezeBalance != null)
80858
+ if ($util.Long)
80859
+ (message.unfreezeBalance = $util.Long.fromValue(object.unfreezeBalance)).unsigned = false;
80860
+ else if (typeof object.unfreezeBalance === "string")
80861
+ message.unfreezeBalance = parseInt(object.unfreezeBalance, 10);
80862
+ else if (typeof object.unfreezeBalance === "number")
80863
+ message.unfreezeBalance = object.unfreezeBalance;
80864
+ else if (typeof object.unfreezeBalance === "object")
80865
+ message.unfreezeBalance = new $util.LongBits(object.unfreezeBalance.low >>> 0, object.unfreezeBalance.high >>> 0).toNumber();
80866
+ if (object.resource != null)
80867
+ message.resource = String(object.resource);
80868
+ return message;
80869
+ };
80870
+
80871
+ /**
80872
+ * Creates a plain object from an UnfreezeBalanceV2Contract message. Also converts values to other types if specified.
80873
+ * @function toObject
80874
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80875
+ * @static
80876
+ * @param {TW.Tron.Proto.UnfreezeBalanceV2Contract} message UnfreezeBalanceV2Contract
80877
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
80878
+ * @returns {Object.<string,*>} Plain object
80879
+ */
80880
+ UnfreezeBalanceV2Contract.toObject = function toObject(message, options) {
80881
+ if (!options)
80882
+ options = {};
80883
+ var object = {};
80884
+ if (options.defaults) {
80885
+ object.ownerAddress = "";
80886
+ if ($util.Long) {
80887
+ var long = new $util.Long(0, 0, false);
80888
+ object.unfreezeBalance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
80889
+ } else
80890
+ object.unfreezeBalance = options.longs === String ? "0" : 0;
80891
+ object.resource = "";
80892
+ }
80893
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
80894
+ object.ownerAddress = message.ownerAddress;
80895
+ if (message.unfreezeBalance != null && message.hasOwnProperty("unfreezeBalance"))
80896
+ if (typeof message.unfreezeBalance === "number")
80897
+ object.unfreezeBalance = options.longs === String ? String(message.unfreezeBalance) : message.unfreezeBalance;
80898
+ else
80899
+ object.unfreezeBalance = options.longs === String ? $util.Long.prototype.toString.call(message.unfreezeBalance) : options.longs === Number ? new $util.LongBits(message.unfreezeBalance.low >>> 0, message.unfreezeBalance.high >>> 0).toNumber() : message.unfreezeBalance;
80900
+ if (message.resource != null && message.hasOwnProperty("resource"))
80901
+ object.resource = message.resource;
80902
+ return object;
80903
+ };
80904
+
80905
+ /**
80906
+ * Converts this UnfreezeBalanceV2Contract to JSON.
80907
+ * @function toJSON
80908
+ * @memberof TW.Tron.Proto.UnfreezeBalanceV2Contract
80909
+ * @instance
80910
+ * @returns {Object.<string,*>} JSON object
80911
+ */
80912
+ UnfreezeBalanceV2Contract.prototype.toJSON = function toJSON() {
80913
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
80914
+ };
80915
+
80916
+ return UnfreezeBalanceV2Contract;
80917
+ })();
80918
+
80919
+ Proto.WithdrawExpireUnfreezeContract = (function() {
80920
+
80921
+ /**
80922
+ * Properties of a WithdrawExpireUnfreezeContract.
80923
+ * @memberof TW.Tron.Proto
80924
+ * @interface IWithdrawExpireUnfreezeContract
80925
+ * @property {string|null} [ownerAddress] WithdrawExpireUnfreezeContract ownerAddress
80926
+ */
80927
+
80928
+ /**
80929
+ * Constructs a new WithdrawExpireUnfreezeContract.
80930
+ * @memberof TW.Tron.Proto
80931
+ * @classdesc Represents a WithdrawExpireUnfreezeContract.
80932
+ * @implements IWithdrawExpireUnfreezeContract
80933
+ * @constructor
80934
+ * @param {TW.Tron.Proto.IWithdrawExpireUnfreezeContract=} [properties] Properties to set
80935
+ */
80936
+ function WithdrawExpireUnfreezeContract(properties) {
80937
+ if (properties)
80938
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
80939
+ if (properties[keys[i]] != null)
80940
+ this[keys[i]] = properties[keys[i]];
80941
+ }
80942
+
80943
+ /**
80944
+ * WithdrawExpireUnfreezeContract ownerAddress.
80945
+ * @member {string} ownerAddress
80946
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
80947
+ * @instance
80948
+ */
80949
+ WithdrawExpireUnfreezeContract.prototype.ownerAddress = "";
80950
+
80951
+ /**
80952
+ * Creates a new WithdrawExpireUnfreezeContract instance using the specified properties.
80953
+ * @function create
80954
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
80955
+ * @static
80956
+ * @param {TW.Tron.Proto.IWithdrawExpireUnfreezeContract=} [properties] Properties to set
80957
+ * @returns {TW.Tron.Proto.WithdrawExpireUnfreezeContract} WithdrawExpireUnfreezeContract instance
80958
+ */
80959
+ WithdrawExpireUnfreezeContract.create = function create(properties) {
80960
+ return new WithdrawExpireUnfreezeContract(properties);
80961
+ };
80962
+
80963
+ /**
80964
+ * Encodes the specified WithdrawExpireUnfreezeContract message. Does not implicitly {@link TW.Tron.Proto.WithdrawExpireUnfreezeContract.verify|verify} messages.
80965
+ * @function encode
80966
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
80967
+ * @static
80968
+ * @param {TW.Tron.Proto.IWithdrawExpireUnfreezeContract} message WithdrawExpireUnfreezeContract message or plain object to encode
80969
+ * @param {$protobuf.Writer} [writer] Writer to encode to
80970
+ * @returns {$protobuf.Writer} Writer
80971
+ */
80972
+ WithdrawExpireUnfreezeContract.encode = function encode(message, writer) {
80973
+ if (!writer)
80974
+ writer = $Writer.create();
80975
+ if (message.ownerAddress != null && Object.hasOwnProperty.call(message, "ownerAddress"))
80976
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.ownerAddress);
80977
+ return writer;
80978
+ };
80979
+
80980
+ /**
80981
+ * Decodes a WithdrawExpireUnfreezeContract message from the specified reader or buffer.
80982
+ * @function decode
80983
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
80984
+ * @static
80985
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
80986
+ * @param {number} [length] Message length if known beforehand
80987
+ * @returns {TW.Tron.Proto.WithdrawExpireUnfreezeContract} WithdrawExpireUnfreezeContract
80988
+ * @throws {Error} If the payload is not a reader or valid buffer
80989
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
80990
+ */
80991
+ WithdrawExpireUnfreezeContract.decode = function decode(reader, length) {
80992
+ if (!(reader instanceof $Reader))
80993
+ reader = $Reader.create(reader);
80994
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract();
80995
+ while (reader.pos < end) {
80996
+ var tag = reader.uint32();
80997
+ switch (tag >>> 3) {
80998
+ case 1:
80999
+ message.ownerAddress = reader.string();
81000
+ break;
81001
+ default:
81002
+ reader.skipType(tag & 7);
81003
+ break;
81004
+ }
81005
+ }
81006
+ return message;
81007
+ };
81008
+
81009
+ /**
81010
+ * Verifies a WithdrawExpireUnfreezeContract message.
81011
+ * @function verify
81012
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
81013
+ * @static
81014
+ * @param {Object.<string,*>} message Plain object to verify
81015
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
81016
+ */
81017
+ WithdrawExpireUnfreezeContract.verify = function verify(message) {
81018
+ if (typeof message !== "object" || message === null)
81019
+ return "object expected";
81020
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
81021
+ if (!$util.isString(message.ownerAddress))
81022
+ return "ownerAddress: string expected";
81023
+ return null;
81024
+ };
81025
+
81026
+ /**
81027
+ * Creates a WithdrawExpireUnfreezeContract message from a plain object. Also converts values to their respective internal types.
81028
+ * @function fromObject
81029
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
81030
+ * @static
81031
+ * @param {Object.<string,*>} object Plain object
81032
+ * @returns {TW.Tron.Proto.WithdrawExpireUnfreezeContract} WithdrawExpireUnfreezeContract
81033
+ */
81034
+ WithdrawExpireUnfreezeContract.fromObject = function fromObject(object) {
81035
+ if (object instanceof $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract)
81036
+ return object;
81037
+ var message = new $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract();
81038
+ if (object.ownerAddress != null)
81039
+ message.ownerAddress = String(object.ownerAddress);
81040
+ return message;
81041
+ };
81042
+
81043
+ /**
81044
+ * Creates a plain object from a WithdrawExpireUnfreezeContract message. Also converts values to other types if specified.
81045
+ * @function toObject
81046
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
81047
+ * @static
81048
+ * @param {TW.Tron.Proto.WithdrawExpireUnfreezeContract} message WithdrawExpireUnfreezeContract
81049
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
81050
+ * @returns {Object.<string,*>} Plain object
81051
+ */
81052
+ WithdrawExpireUnfreezeContract.toObject = function toObject(message, options) {
81053
+ if (!options)
81054
+ options = {};
81055
+ var object = {};
81056
+ if (options.defaults)
81057
+ object.ownerAddress = "";
81058
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
81059
+ object.ownerAddress = message.ownerAddress;
81060
+ return object;
81061
+ };
81062
+
81063
+ /**
81064
+ * Converts this WithdrawExpireUnfreezeContract to JSON.
81065
+ * @function toJSON
81066
+ * @memberof TW.Tron.Proto.WithdrawExpireUnfreezeContract
81067
+ * @instance
81068
+ * @returns {Object.<string,*>} JSON object
81069
+ */
81070
+ WithdrawExpireUnfreezeContract.prototype.toJSON = function toJSON() {
81071
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
81072
+ };
81073
+
81074
+ return WithdrawExpireUnfreezeContract;
81075
+ })();
81076
+
81077
+ Proto.DelegateResourceContract = (function() {
81078
+
81079
+ /**
81080
+ * Properties of a DelegateResourceContract.
81081
+ * @memberof TW.Tron.Proto
81082
+ * @interface IDelegateResourceContract
81083
+ * @property {string|null} [ownerAddress] DelegateResourceContract ownerAddress
81084
+ * @property {string|null} [resource] DelegateResourceContract resource
81085
+ * @property {Long|null} [balance] DelegateResourceContract balance
81086
+ * @property {string|null} [receiverAddress] DelegateResourceContract receiverAddress
81087
+ * @property {boolean|null} [lock] DelegateResourceContract lock
81088
+ */
81089
+
81090
+ /**
81091
+ * Constructs a new DelegateResourceContract.
81092
+ * @memberof TW.Tron.Proto
81093
+ * @classdesc Represents a DelegateResourceContract.
81094
+ * @implements IDelegateResourceContract
81095
+ * @constructor
81096
+ * @param {TW.Tron.Proto.IDelegateResourceContract=} [properties] Properties to set
81097
+ */
81098
+ function DelegateResourceContract(properties) {
81099
+ if (properties)
81100
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
81101
+ if (properties[keys[i]] != null)
81102
+ this[keys[i]] = properties[keys[i]];
81103
+ }
81104
+
81105
+ /**
81106
+ * DelegateResourceContract ownerAddress.
81107
+ * @member {string} ownerAddress
81108
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81109
+ * @instance
81110
+ */
81111
+ DelegateResourceContract.prototype.ownerAddress = "";
81112
+
81113
+ /**
81114
+ * DelegateResourceContract resource.
81115
+ * @member {string} resource
81116
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81117
+ * @instance
81118
+ */
81119
+ DelegateResourceContract.prototype.resource = "";
81120
+
81121
+ /**
81122
+ * DelegateResourceContract balance.
81123
+ * @member {Long} balance
81124
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81125
+ * @instance
81126
+ */
81127
+ DelegateResourceContract.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
81128
+
81129
+ /**
81130
+ * DelegateResourceContract receiverAddress.
81131
+ * @member {string} receiverAddress
81132
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81133
+ * @instance
81134
+ */
81135
+ DelegateResourceContract.prototype.receiverAddress = "";
81136
+
81137
+ /**
81138
+ * DelegateResourceContract lock.
81139
+ * @member {boolean} lock
81140
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81141
+ * @instance
81142
+ */
81143
+ DelegateResourceContract.prototype.lock = false;
81144
+
81145
+ /**
81146
+ * Creates a new DelegateResourceContract instance using the specified properties.
81147
+ * @function create
81148
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81149
+ * @static
81150
+ * @param {TW.Tron.Proto.IDelegateResourceContract=} [properties] Properties to set
81151
+ * @returns {TW.Tron.Proto.DelegateResourceContract} DelegateResourceContract instance
81152
+ */
81153
+ DelegateResourceContract.create = function create(properties) {
81154
+ return new DelegateResourceContract(properties);
81155
+ };
81156
+
81157
+ /**
81158
+ * Encodes the specified DelegateResourceContract message. Does not implicitly {@link TW.Tron.Proto.DelegateResourceContract.verify|verify} messages.
81159
+ * @function encode
81160
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81161
+ * @static
81162
+ * @param {TW.Tron.Proto.IDelegateResourceContract} message DelegateResourceContract message or plain object to encode
81163
+ * @param {$protobuf.Writer} [writer] Writer to encode to
81164
+ * @returns {$protobuf.Writer} Writer
81165
+ */
81166
+ DelegateResourceContract.encode = function encode(message, writer) {
81167
+ if (!writer)
81168
+ writer = $Writer.create();
81169
+ if (message.ownerAddress != null && Object.hasOwnProperty.call(message, "ownerAddress"))
81170
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.ownerAddress);
81171
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
81172
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.resource);
81173
+ if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
81174
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.balance);
81175
+ if (message.receiverAddress != null && Object.hasOwnProperty.call(message, "receiverAddress"))
81176
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.receiverAddress);
81177
+ if (message.lock != null && Object.hasOwnProperty.call(message, "lock"))
81178
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lock);
81179
+ return writer;
81180
+ };
81181
+
81182
+ /**
81183
+ * Decodes a DelegateResourceContract message from the specified reader or buffer.
81184
+ * @function decode
81185
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81186
+ * @static
81187
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
81188
+ * @param {number} [length] Message length if known beforehand
81189
+ * @returns {TW.Tron.Proto.DelegateResourceContract} DelegateResourceContract
81190
+ * @throws {Error} If the payload is not a reader or valid buffer
81191
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
81192
+ */
81193
+ DelegateResourceContract.decode = function decode(reader, length) {
81194
+ if (!(reader instanceof $Reader))
81195
+ reader = $Reader.create(reader);
81196
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Tron.Proto.DelegateResourceContract();
81197
+ while (reader.pos < end) {
81198
+ var tag = reader.uint32();
81199
+ switch (tag >>> 3) {
81200
+ case 1:
81201
+ message.ownerAddress = reader.string();
81202
+ break;
81203
+ case 2:
81204
+ message.resource = reader.string();
81205
+ break;
81206
+ case 3:
81207
+ message.balance = reader.int64();
81208
+ break;
81209
+ case 4:
81210
+ message.receiverAddress = reader.string();
81211
+ break;
81212
+ case 5:
81213
+ message.lock = reader.bool();
81214
+ break;
81215
+ default:
81216
+ reader.skipType(tag & 7);
81217
+ break;
81218
+ }
81219
+ }
81220
+ return message;
81221
+ };
81222
+
81223
+ /**
81224
+ * Verifies a DelegateResourceContract message.
81225
+ * @function verify
81226
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81227
+ * @static
81228
+ * @param {Object.<string,*>} message Plain object to verify
81229
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
81230
+ */
81231
+ DelegateResourceContract.verify = function verify(message) {
81232
+ if (typeof message !== "object" || message === null)
81233
+ return "object expected";
81234
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
81235
+ if (!$util.isString(message.ownerAddress))
81236
+ return "ownerAddress: string expected";
81237
+ if (message.resource != null && message.hasOwnProperty("resource"))
81238
+ if (!$util.isString(message.resource))
81239
+ return "resource: string expected";
81240
+ if (message.balance != null && message.hasOwnProperty("balance"))
81241
+ if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high)))
81242
+ return "balance: integer|Long expected";
81243
+ if (message.receiverAddress != null && message.hasOwnProperty("receiverAddress"))
81244
+ if (!$util.isString(message.receiverAddress))
81245
+ return "receiverAddress: string expected";
81246
+ if (message.lock != null && message.hasOwnProperty("lock"))
81247
+ if (typeof message.lock !== "boolean")
81248
+ return "lock: boolean expected";
81249
+ return null;
81250
+ };
81251
+
81252
+ /**
81253
+ * Creates a DelegateResourceContract message from a plain object. Also converts values to their respective internal types.
81254
+ * @function fromObject
81255
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81256
+ * @static
81257
+ * @param {Object.<string,*>} object Plain object
81258
+ * @returns {TW.Tron.Proto.DelegateResourceContract} DelegateResourceContract
81259
+ */
81260
+ DelegateResourceContract.fromObject = function fromObject(object) {
81261
+ if (object instanceof $root.TW.Tron.Proto.DelegateResourceContract)
81262
+ return object;
81263
+ var message = new $root.TW.Tron.Proto.DelegateResourceContract();
81264
+ if (object.ownerAddress != null)
81265
+ message.ownerAddress = String(object.ownerAddress);
81266
+ if (object.resource != null)
81267
+ message.resource = String(object.resource);
81268
+ if (object.balance != null)
81269
+ if ($util.Long)
81270
+ (message.balance = $util.Long.fromValue(object.balance)).unsigned = false;
81271
+ else if (typeof object.balance === "string")
81272
+ message.balance = parseInt(object.balance, 10);
81273
+ else if (typeof object.balance === "number")
81274
+ message.balance = object.balance;
81275
+ else if (typeof object.balance === "object")
81276
+ message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber();
81277
+ if (object.receiverAddress != null)
81278
+ message.receiverAddress = String(object.receiverAddress);
81279
+ if (object.lock != null)
81280
+ message.lock = Boolean(object.lock);
81281
+ return message;
81282
+ };
81283
+
81284
+ /**
81285
+ * Creates a plain object from a DelegateResourceContract message. Also converts values to other types if specified.
81286
+ * @function toObject
81287
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81288
+ * @static
81289
+ * @param {TW.Tron.Proto.DelegateResourceContract} message DelegateResourceContract
81290
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
81291
+ * @returns {Object.<string,*>} Plain object
81292
+ */
81293
+ DelegateResourceContract.toObject = function toObject(message, options) {
81294
+ if (!options)
81295
+ options = {};
81296
+ var object = {};
81297
+ if (options.defaults) {
81298
+ object.ownerAddress = "";
81299
+ object.resource = "";
81300
+ if ($util.Long) {
81301
+ var long = new $util.Long(0, 0, false);
81302
+ object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
81303
+ } else
81304
+ object.balance = options.longs === String ? "0" : 0;
81305
+ object.receiverAddress = "";
81306
+ object.lock = false;
81307
+ }
81308
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
81309
+ object.ownerAddress = message.ownerAddress;
81310
+ if (message.resource != null && message.hasOwnProperty("resource"))
81311
+ object.resource = message.resource;
81312
+ if (message.balance != null && message.hasOwnProperty("balance"))
81313
+ if (typeof message.balance === "number")
81314
+ object.balance = options.longs === String ? String(message.balance) : message.balance;
81315
+ else
81316
+ object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance;
81317
+ if (message.receiverAddress != null && message.hasOwnProperty("receiverAddress"))
81318
+ object.receiverAddress = message.receiverAddress;
81319
+ if (message.lock != null && message.hasOwnProperty("lock"))
81320
+ object.lock = message.lock;
81321
+ return object;
81322
+ };
81323
+
81324
+ /**
81325
+ * Converts this DelegateResourceContract to JSON.
81326
+ * @function toJSON
81327
+ * @memberof TW.Tron.Proto.DelegateResourceContract
81328
+ * @instance
81329
+ * @returns {Object.<string,*>} JSON object
81330
+ */
81331
+ DelegateResourceContract.prototype.toJSON = function toJSON() {
81332
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
81333
+ };
81334
+
81335
+ return DelegateResourceContract;
81336
+ })();
81337
+
81338
+ Proto.UnDelegateResourceContract = (function() {
81339
+
81340
+ /**
81341
+ * Properties of an UnDelegateResourceContract.
81342
+ * @memberof TW.Tron.Proto
81343
+ * @interface IUnDelegateResourceContract
81344
+ * @property {string|null} [ownerAddress] UnDelegateResourceContract ownerAddress
81345
+ * @property {string|null} [resource] UnDelegateResourceContract resource
81346
+ * @property {Long|null} [balance] UnDelegateResourceContract balance
81347
+ * @property {string|null} [receiverAddress] UnDelegateResourceContract receiverAddress
81348
+ */
81349
+
81350
+ /**
81351
+ * Constructs a new UnDelegateResourceContract.
81352
+ * @memberof TW.Tron.Proto
81353
+ * @classdesc Represents an UnDelegateResourceContract.
81354
+ * @implements IUnDelegateResourceContract
81355
+ * @constructor
81356
+ * @param {TW.Tron.Proto.IUnDelegateResourceContract=} [properties] Properties to set
81357
+ */
81358
+ function UnDelegateResourceContract(properties) {
81359
+ if (properties)
81360
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
81361
+ if (properties[keys[i]] != null)
81362
+ this[keys[i]] = properties[keys[i]];
81363
+ }
81364
+
81365
+ /**
81366
+ * UnDelegateResourceContract ownerAddress.
81367
+ * @member {string} ownerAddress
81368
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81369
+ * @instance
81370
+ */
81371
+ UnDelegateResourceContract.prototype.ownerAddress = "";
81372
+
81373
+ /**
81374
+ * UnDelegateResourceContract resource.
81375
+ * @member {string} resource
81376
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81377
+ * @instance
81378
+ */
81379
+ UnDelegateResourceContract.prototype.resource = "";
81380
+
81381
+ /**
81382
+ * UnDelegateResourceContract balance.
81383
+ * @member {Long} balance
81384
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81385
+ * @instance
81386
+ */
81387
+ UnDelegateResourceContract.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
81388
+
81389
+ /**
81390
+ * UnDelegateResourceContract receiverAddress.
81391
+ * @member {string} receiverAddress
81392
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81393
+ * @instance
81394
+ */
81395
+ UnDelegateResourceContract.prototype.receiverAddress = "";
81396
+
81397
+ /**
81398
+ * Creates a new UnDelegateResourceContract instance using the specified properties.
81399
+ * @function create
81400
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81401
+ * @static
81402
+ * @param {TW.Tron.Proto.IUnDelegateResourceContract=} [properties] Properties to set
81403
+ * @returns {TW.Tron.Proto.UnDelegateResourceContract} UnDelegateResourceContract instance
81404
+ */
81405
+ UnDelegateResourceContract.create = function create(properties) {
81406
+ return new UnDelegateResourceContract(properties);
81407
+ };
81408
+
81409
+ /**
81410
+ * Encodes the specified UnDelegateResourceContract message. Does not implicitly {@link TW.Tron.Proto.UnDelegateResourceContract.verify|verify} messages.
81411
+ * @function encode
81412
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81413
+ * @static
81414
+ * @param {TW.Tron.Proto.IUnDelegateResourceContract} message UnDelegateResourceContract message or plain object to encode
81415
+ * @param {$protobuf.Writer} [writer] Writer to encode to
81416
+ * @returns {$protobuf.Writer} Writer
81417
+ */
81418
+ UnDelegateResourceContract.encode = function encode(message, writer) {
81419
+ if (!writer)
81420
+ writer = $Writer.create();
81421
+ if (message.ownerAddress != null && Object.hasOwnProperty.call(message, "ownerAddress"))
81422
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.ownerAddress);
81423
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
81424
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.resource);
81425
+ if (message.balance != null && Object.hasOwnProperty.call(message, "balance"))
81426
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.balance);
81427
+ if (message.receiverAddress != null && Object.hasOwnProperty.call(message, "receiverAddress"))
81428
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.receiverAddress);
81429
+ return writer;
81430
+ };
81431
+
81432
+ /**
81433
+ * Decodes an UnDelegateResourceContract message from the specified reader or buffer.
81434
+ * @function decode
81435
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81436
+ * @static
81437
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
81438
+ * @param {number} [length] Message length if known beforehand
81439
+ * @returns {TW.Tron.Proto.UnDelegateResourceContract} UnDelegateResourceContract
81440
+ * @throws {Error} If the payload is not a reader or valid buffer
81441
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
81442
+ */
81443
+ UnDelegateResourceContract.decode = function decode(reader, length) {
81444
+ if (!(reader instanceof $Reader))
81445
+ reader = $Reader.create(reader);
81446
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Tron.Proto.UnDelegateResourceContract();
81447
+ while (reader.pos < end) {
81448
+ var tag = reader.uint32();
81449
+ switch (tag >>> 3) {
81450
+ case 1:
81451
+ message.ownerAddress = reader.string();
81452
+ break;
81453
+ case 2:
81454
+ message.resource = reader.string();
81455
+ break;
81456
+ case 3:
81457
+ message.balance = reader.int64();
81458
+ break;
81459
+ case 4:
81460
+ message.receiverAddress = reader.string();
81461
+ break;
81462
+ default:
81463
+ reader.skipType(tag & 7);
81464
+ break;
81465
+ }
81466
+ }
81467
+ return message;
81468
+ };
81469
+
81470
+ /**
81471
+ * Verifies an UnDelegateResourceContract message.
81472
+ * @function verify
81473
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81474
+ * @static
81475
+ * @param {Object.<string,*>} message Plain object to verify
81476
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
81477
+ */
81478
+ UnDelegateResourceContract.verify = function verify(message) {
81479
+ if (typeof message !== "object" || message === null)
81480
+ return "object expected";
81481
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
81482
+ if (!$util.isString(message.ownerAddress))
81483
+ return "ownerAddress: string expected";
81484
+ if (message.resource != null && message.hasOwnProperty("resource"))
81485
+ if (!$util.isString(message.resource))
81486
+ return "resource: string expected";
81487
+ if (message.balance != null && message.hasOwnProperty("balance"))
81488
+ if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high)))
81489
+ return "balance: integer|Long expected";
81490
+ if (message.receiverAddress != null && message.hasOwnProperty("receiverAddress"))
81491
+ if (!$util.isString(message.receiverAddress))
81492
+ return "receiverAddress: string expected";
81493
+ return null;
81494
+ };
81495
+
81496
+ /**
81497
+ * Creates an UnDelegateResourceContract message from a plain object. Also converts values to their respective internal types.
81498
+ * @function fromObject
81499
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81500
+ * @static
81501
+ * @param {Object.<string,*>} object Plain object
81502
+ * @returns {TW.Tron.Proto.UnDelegateResourceContract} UnDelegateResourceContract
81503
+ */
81504
+ UnDelegateResourceContract.fromObject = function fromObject(object) {
81505
+ if (object instanceof $root.TW.Tron.Proto.UnDelegateResourceContract)
81506
+ return object;
81507
+ var message = new $root.TW.Tron.Proto.UnDelegateResourceContract();
81508
+ if (object.ownerAddress != null)
81509
+ message.ownerAddress = String(object.ownerAddress);
81510
+ if (object.resource != null)
81511
+ message.resource = String(object.resource);
81512
+ if (object.balance != null)
81513
+ if ($util.Long)
81514
+ (message.balance = $util.Long.fromValue(object.balance)).unsigned = false;
81515
+ else if (typeof object.balance === "string")
81516
+ message.balance = parseInt(object.balance, 10);
81517
+ else if (typeof object.balance === "number")
81518
+ message.balance = object.balance;
81519
+ else if (typeof object.balance === "object")
81520
+ message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber();
81521
+ if (object.receiverAddress != null)
81522
+ message.receiverAddress = String(object.receiverAddress);
81523
+ return message;
81524
+ };
81525
+
81526
+ /**
81527
+ * Creates a plain object from an UnDelegateResourceContract message. Also converts values to other types if specified.
81528
+ * @function toObject
81529
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81530
+ * @static
81531
+ * @param {TW.Tron.Proto.UnDelegateResourceContract} message UnDelegateResourceContract
81532
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
81533
+ * @returns {Object.<string,*>} Plain object
81534
+ */
81535
+ UnDelegateResourceContract.toObject = function toObject(message, options) {
81536
+ if (!options)
81537
+ options = {};
81538
+ var object = {};
81539
+ if (options.defaults) {
81540
+ object.ownerAddress = "";
81541
+ object.resource = "";
81542
+ if ($util.Long) {
81543
+ var long = new $util.Long(0, 0, false);
81544
+ object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
81545
+ } else
81546
+ object.balance = options.longs === String ? "0" : 0;
81547
+ object.receiverAddress = "";
81548
+ }
81549
+ if (message.ownerAddress != null && message.hasOwnProperty("ownerAddress"))
81550
+ object.ownerAddress = message.ownerAddress;
81551
+ if (message.resource != null && message.hasOwnProperty("resource"))
81552
+ object.resource = message.resource;
81553
+ if (message.balance != null && message.hasOwnProperty("balance"))
81554
+ if (typeof message.balance === "number")
81555
+ object.balance = options.longs === String ? String(message.balance) : message.balance;
81556
+ else
81557
+ object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance;
81558
+ if (message.receiverAddress != null && message.hasOwnProperty("receiverAddress"))
81559
+ object.receiverAddress = message.receiverAddress;
81560
+ return object;
81561
+ };
81562
+
81563
+ /**
81564
+ * Converts this UnDelegateResourceContract to JSON.
81565
+ * @function toJSON
81566
+ * @memberof TW.Tron.Proto.UnDelegateResourceContract
81567
+ * @instance
81568
+ * @returns {Object.<string,*>} JSON object
81569
+ */
81570
+ UnDelegateResourceContract.prototype.toJSON = function toJSON() {
81571
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
81572
+ };
81573
+
81574
+ return UnDelegateResourceContract;
81575
+ })();
81576
+
80485
81577
  Proto.UnfreezeBalanceContract = (function() {
80486
81578
 
80487
81579
  /**
@@ -82327,6 +83419,11 @@
82327
83419
  * @property {TW.Tron.Proto.IVoteWitnessContract|null} [voteWitness] Transaction voteWitness
82328
83420
  * @property {TW.Tron.Proto.ITriggerSmartContract|null} [triggerSmartContract] Transaction triggerSmartContract
82329
83421
  * @property {TW.Tron.Proto.ITransferTRC20Contract|null} [transferTrc20Contract] Transaction transferTrc20Contract
83422
+ * @property {TW.Tron.Proto.IFreezeBalanceV2Contract|null} [freezeBalanceV2] Transaction freezeBalanceV2
83423
+ * @property {TW.Tron.Proto.IUnfreezeBalanceV2Contract|null} [unfreezeBalanceV2] Transaction unfreezeBalanceV2
83424
+ * @property {TW.Tron.Proto.IWithdrawExpireUnfreezeContract|null} [withdrawExpireUnfreeze] Transaction withdrawExpireUnfreeze
83425
+ * @property {TW.Tron.Proto.IDelegateResourceContract|null} [delegateResource] Transaction delegateResource
83426
+ * @property {TW.Tron.Proto.IUnDelegateResourceContract|null} [undelegateResource] Transaction undelegateResource
82330
83427
  */
82331
83428
 
82332
83429
  /**
@@ -82456,17 +83553,57 @@
82456
83553
  */
82457
83554
  Transaction.prototype.transferTrc20Contract = null;
82458
83555
 
83556
+ /**
83557
+ * Transaction freezeBalanceV2.
83558
+ * @member {TW.Tron.Proto.IFreezeBalanceV2Contract|null|undefined} freezeBalanceV2
83559
+ * @memberof TW.Tron.Proto.Transaction
83560
+ * @instance
83561
+ */
83562
+ Transaction.prototype.freezeBalanceV2 = null;
83563
+
83564
+ /**
83565
+ * Transaction unfreezeBalanceV2.
83566
+ * @member {TW.Tron.Proto.IUnfreezeBalanceV2Contract|null|undefined} unfreezeBalanceV2
83567
+ * @memberof TW.Tron.Proto.Transaction
83568
+ * @instance
83569
+ */
83570
+ Transaction.prototype.unfreezeBalanceV2 = null;
83571
+
83572
+ /**
83573
+ * Transaction withdrawExpireUnfreeze.
83574
+ * @member {TW.Tron.Proto.IWithdrawExpireUnfreezeContract|null|undefined} withdrawExpireUnfreeze
83575
+ * @memberof TW.Tron.Proto.Transaction
83576
+ * @instance
83577
+ */
83578
+ Transaction.prototype.withdrawExpireUnfreeze = null;
83579
+
83580
+ /**
83581
+ * Transaction delegateResource.
83582
+ * @member {TW.Tron.Proto.IDelegateResourceContract|null|undefined} delegateResource
83583
+ * @memberof TW.Tron.Proto.Transaction
83584
+ * @instance
83585
+ */
83586
+ Transaction.prototype.delegateResource = null;
83587
+
83588
+ /**
83589
+ * Transaction undelegateResource.
83590
+ * @member {TW.Tron.Proto.IUnDelegateResourceContract|null|undefined} undelegateResource
83591
+ * @memberof TW.Tron.Proto.Transaction
83592
+ * @instance
83593
+ */
83594
+ Transaction.prototype.undelegateResource = null;
83595
+
82459
83596
  // OneOf field names bound to virtual getters and setters
82460
83597
  var $oneOfFields;
82461
83598
 
82462
83599
  /**
82463
83600
  * Transaction contractOneof.
82464
- * @member {"transfer"|"transferAsset"|"freezeBalance"|"unfreezeBalance"|"unfreezeAsset"|"withdrawBalance"|"voteAsset"|"voteWitness"|"triggerSmartContract"|"transferTrc20Contract"|undefined} contractOneof
83601
+ * @member {"transfer"|"transferAsset"|"freezeBalance"|"unfreezeBalance"|"unfreezeAsset"|"withdrawBalance"|"voteAsset"|"voteWitness"|"triggerSmartContract"|"transferTrc20Contract"|"freezeBalanceV2"|"unfreezeBalanceV2"|"withdrawExpireUnfreeze"|"delegateResource"|"undelegateResource"|undefined} contractOneof
82465
83602
  * @memberof TW.Tron.Proto.Transaction
82466
83603
  * @instance
82467
83604
  */
82468
83605
  Object.defineProperty(Transaction.prototype, "contractOneof", {
82469
- get: $util.oneOfGetter($oneOfFields = ["transfer", "transferAsset", "freezeBalance", "unfreezeBalance", "unfreezeAsset", "withdrawBalance", "voteAsset", "voteWitness", "triggerSmartContract", "transferTrc20Contract"]),
83606
+ get: $util.oneOfGetter($oneOfFields = ["transfer", "transferAsset", "freezeBalance", "unfreezeBalance", "unfreezeAsset", "withdrawBalance", "voteAsset", "voteWitness", "triggerSmartContract", "transferTrc20Contract", "freezeBalanceV2", "unfreezeBalanceV2", "withdrawExpireUnfreeze", "delegateResource", "undelegateResource"]),
82470
83607
  set: $util.oneOfSetter($oneOfFields)
82471
83608
  });
82472
83609
 
@@ -82522,6 +83659,16 @@
82522
83659
  $root.TW.Tron.Proto.TriggerSmartContract.encode(message.triggerSmartContract, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
82523
83660
  if (message.transferTrc20Contract != null && Object.hasOwnProperty.call(message, "transferTrc20Contract"))
82524
83661
  $root.TW.Tron.Proto.TransferTRC20Contract.encode(message.transferTrc20Contract, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
83662
+ if (message.freezeBalanceV2 != null && Object.hasOwnProperty.call(message, "freezeBalanceV2"))
83663
+ $root.TW.Tron.Proto.FreezeBalanceV2Contract.encode(message.freezeBalanceV2, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
83664
+ if (message.unfreezeBalanceV2 != null && Object.hasOwnProperty.call(message, "unfreezeBalanceV2"))
83665
+ $root.TW.Tron.Proto.UnfreezeBalanceV2Contract.encode(message.unfreezeBalanceV2, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
83666
+ if (message.withdrawExpireUnfreeze != null && Object.hasOwnProperty.call(message, "withdrawExpireUnfreeze"))
83667
+ $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract.encode(message.withdrawExpireUnfreeze, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
83668
+ if (message.delegateResource != null && Object.hasOwnProperty.call(message, "delegateResource"))
83669
+ $root.TW.Tron.Proto.DelegateResourceContract.encode(message.delegateResource, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
83670
+ if (message.undelegateResource != null && Object.hasOwnProperty.call(message, "undelegateResource"))
83671
+ $root.TW.Tron.Proto.UnDelegateResourceContract.encode(message.undelegateResource, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
82525
83672
  return writer;
82526
83673
  };
82527
83674
 
@@ -82585,6 +83732,21 @@
82585
83732
  case 19:
82586
83733
  message.transferTrc20Contract = $root.TW.Tron.Proto.TransferTRC20Contract.decode(reader, reader.uint32());
82587
83734
  break;
83735
+ case 20:
83736
+ message.freezeBalanceV2 = $root.TW.Tron.Proto.FreezeBalanceV2Contract.decode(reader, reader.uint32());
83737
+ break;
83738
+ case 21:
83739
+ message.unfreezeBalanceV2 = $root.TW.Tron.Proto.UnfreezeBalanceV2Contract.decode(reader, reader.uint32());
83740
+ break;
83741
+ case 23:
83742
+ message.withdrawExpireUnfreeze = $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract.decode(reader, reader.uint32());
83743
+ break;
83744
+ case 24:
83745
+ message.delegateResource = $root.TW.Tron.Proto.DelegateResourceContract.decode(reader, reader.uint32());
83746
+ break;
83747
+ case 25:
83748
+ message.undelegateResource = $root.TW.Tron.Proto.UnDelegateResourceContract.decode(reader, reader.uint32());
83749
+ break;
82588
83750
  default:
82589
83751
  reader.skipType(tag & 7);
82590
83752
  break;
@@ -82717,6 +83879,56 @@
82717
83879
  return "transferTrc20Contract." + error;
82718
83880
  }
82719
83881
  }
83882
+ if (message.freezeBalanceV2 != null && message.hasOwnProperty("freezeBalanceV2")) {
83883
+ if (properties.contractOneof === 1)
83884
+ return "contractOneof: multiple values";
83885
+ properties.contractOneof = 1;
83886
+ {
83887
+ var error = $root.TW.Tron.Proto.FreezeBalanceV2Contract.verify(message.freezeBalanceV2);
83888
+ if (error)
83889
+ return "freezeBalanceV2." + error;
83890
+ }
83891
+ }
83892
+ if (message.unfreezeBalanceV2 != null && message.hasOwnProperty("unfreezeBalanceV2")) {
83893
+ if (properties.contractOneof === 1)
83894
+ return "contractOneof: multiple values";
83895
+ properties.contractOneof = 1;
83896
+ {
83897
+ var error = $root.TW.Tron.Proto.UnfreezeBalanceV2Contract.verify(message.unfreezeBalanceV2);
83898
+ if (error)
83899
+ return "unfreezeBalanceV2." + error;
83900
+ }
83901
+ }
83902
+ if (message.withdrawExpireUnfreeze != null && message.hasOwnProperty("withdrawExpireUnfreeze")) {
83903
+ if (properties.contractOneof === 1)
83904
+ return "contractOneof: multiple values";
83905
+ properties.contractOneof = 1;
83906
+ {
83907
+ var error = $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract.verify(message.withdrawExpireUnfreeze);
83908
+ if (error)
83909
+ return "withdrawExpireUnfreeze." + error;
83910
+ }
83911
+ }
83912
+ if (message.delegateResource != null && message.hasOwnProperty("delegateResource")) {
83913
+ if (properties.contractOneof === 1)
83914
+ return "contractOneof: multiple values";
83915
+ properties.contractOneof = 1;
83916
+ {
83917
+ var error = $root.TW.Tron.Proto.DelegateResourceContract.verify(message.delegateResource);
83918
+ if (error)
83919
+ return "delegateResource." + error;
83920
+ }
83921
+ }
83922
+ if (message.undelegateResource != null && message.hasOwnProperty("undelegateResource")) {
83923
+ if (properties.contractOneof === 1)
83924
+ return "contractOneof: multiple values";
83925
+ properties.contractOneof = 1;
83926
+ {
83927
+ var error = $root.TW.Tron.Proto.UnDelegateResourceContract.verify(message.undelegateResource);
83928
+ if (error)
83929
+ return "undelegateResource." + error;
83930
+ }
83931
+ }
82720
83932
  return null;
82721
83933
  };
82722
83934
 
@@ -82814,6 +84026,31 @@
82814
84026
  throw TypeError(".TW.Tron.Proto.Transaction.transferTrc20Contract: object expected");
82815
84027
  message.transferTrc20Contract = $root.TW.Tron.Proto.TransferTRC20Contract.fromObject(object.transferTrc20Contract);
82816
84028
  }
84029
+ if (object.freezeBalanceV2 != null) {
84030
+ if (typeof object.freezeBalanceV2 !== "object")
84031
+ throw TypeError(".TW.Tron.Proto.Transaction.freezeBalanceV2: object expected");
84032
+ message.freezeBalanceV2 = $root.TW.Tron.Proto.FreezeBalanceV2Contract.fromObject(object.freezeBalanceV2);
84033
+ }
84034
+ if (object.unfreezeBalanceV2 != null) {
84035
+ if (typeof object.unfreezeBalanceV2 !== "object")
84036
+ throw TypeError(".TW.Tron.Proto.Transaction.unfreezeBalanceV2: object expected");
84037
+ message.unfreezeBalanceV2 = $root.TW.Tron.Proto.UnfreezeBalanceV2Contract.fromObject(object.unfreezeBalanceV2);
84038
+ }
84039
+ if (object.withdrawExpireUnfreeze != null) {
84040
+ if (typeof object.withdrawExpireUnfreeze !== "object")
84041
+ throw TypeError(".TW.Tron.Proto.Transaction.withdrawExpireUnfreeze: object expected");
84042
+ message.withdrawExpireUnfreeze = $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract.fromObject(object.withdrawExpireUnfreeze);
84043
+ }
84044
+ if (object.delegateResource != null) {
84045
+ if (typeof object.delegateResource !== "object")
84046
+ throw TypeError(".TW.Tron.Proto.Transaction.delegateResource: object expected");
84047
+ message.delegateResource = $root.TW.Tron.Proto.DelegateResourceContract.fromObject(object.delegateResource);
84048
+ }
84049
+ if (object.undelegateResource != null) {
84050
+ if (typeof object.undelegateResource !== "object")
84051
+ throw TypeError(".TW.Tron.Proto.Transaction.undelegateResource: object expected");
84052
+ message.undelegateResource = $root.TW.Tron.Proto.UnDelegateResourceContract.fromObject(object.undelegateResource);
84053
+ }
82817
84054
  return message;
82818
84055
  };
82819
84056
 
@@ -82915,6 +84152,31 @@
82915
84152
  if (options.oneofs)
82916
84153
  object.contractOneof = "transferTrc20Contract";
82917
84154
  }
84155
+ if (message.freezeBalanceV2 != null && message.hasOwnProperty("freezeBalanceV2")) {
84156
+ object.freezeBalanceV2 = $root.TW.Tron.Proto.FreezeBalanceV2Contract.toObject(message.freezeBalanceV2, options);
84157
+ if (options.oneofs)
84158
+ object.contractOneof = "freezeBalanceV2";
84159
+ }
84160
+ if (message.unfreezeBalanceV2 != null && message.hasOwnProperty("unfreezeBalanceV2")) {
84161
+ object.unfreezeBalanceV2 = $root.TW.Tron.Proto.UnfreezeBalanceV2Contract.toObject(message.unfreezeBalanceV2, options);
84162
+ if (options.oneofs)
84163
+ object.contractOneof = "unfreezeBalanceV2";
84164
+ }
84165
+ if (message.withdrawExpireUnfreeze != null && message.hasOwnProperty("withdrawExpireUnfreeze")) {
84166
+ object.withdrawExpireUnfreeze = $root.TW.Tron.Proto.WithdrawExpireUnfreezeContract.toObject(message.withdrawExpireUnfreeze, options);
84167
+ if (options.oneofs)
84168
+ object.contractOneof = "withdrawExpireUnfreeze";
84169
+ }
84170
+ if (message.delegateResource != null && message.hasOwnProperty("delegateResource")) {
84171
+ object.delegateResource = $root.TW.Tron.Proto.DelegateResourceContract.toObject(message.delegateResource, options);
84172
+ if (options.oneofs)
84173
+ object.contractOneof = "delegateResource";
84174
+ }
84175
+ if (message.undelegateResource != null && message.hasOwnProperty("undelegateResource")) {
84176
+ object.undelegateResource = $root.TW.Tron.Proto.UnDelegateResourceContract.toObject(message.undelegateResource, options);
84177
+ if (options.oneofs)
84178
+ object.contractOneof = "undelegateResource";
84179
+ }
82918
84180
  return object;
82919
84181
  };
82920
84182