@trustwallet/wallet-core 4.2.0-dev-rc2 → 4.2.0-dev-rc4

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.
@@ -90644,6 +90644,22 @@
90644
90644
  */
90645
90645
  var Proto = {};
90646
90646
 
90647
+ /**
90648
+ * NetworkId enum.
90649
+ * @name TW.Nimiq.Proto.NetworkId
90650
+ * @enum {number}
90651
+ * @property {number} UseDefault=0 UseDefault value
90652
+ * @property {number} Mainnet=42 Mainnet value
90653
+ * @property {number} MainnetAlbatross=24 MainnetAlbatross value
90654
+ */
90655
+ Proto.NetworkId = (function() {
90656
+ var valuesById = {}, values = Object.create(valuesById);
90657
+ values[valuesById[0] = "UseDefault"] = 0;
90658
+ values[valuesById[42] = "Mainnet"] = 42;
90659
+ values[valuesById[24] = "MainnetAlbatross"] = 24;
90660
+ return values;
90661
+ })();
90662
+
90647
90663
  Proto.SigningInput = (function() {
90648
90664
 
90649
90665
  /**
@@ -90655,6 +90671,7 @@
90655
90671
  * @property {Long|null} [value] SigningInput value
90656
90672
  * @property {Long|null} [fee] SigningInput fee
90657
90673
  * @property {number|null} [validityStartHeight] SigningInput validityStartHeight
90674
+ * @property {TW.Nimiq.Proto.NetworkId|null} [networkId] SigningInput networkId
90658
90675
  */
90659
90676
 
90660
90677
  /**
@@ -90712,6 +90729,14 @@
90712
90729
  */
90713
90730
  SigningInput.prototype.validityStartHeight = 0;
90714
90731
 
90732
+ /**
90733
+ * SigningInput networkId.
90734
+ * @member {TW.Nimiq.Proto.NetworkId} networkId
90735
+ * @memberof TW.Nimiq.Proto.SigningInput
90736
+ * @instance
90737
+ */
90738
+ SigningInput.prototype.networkId = 0;
90739
+
90715
90740
  /**
90716
90741
  * Creates a new SigningInput instance using the specified properties.
90717
90742
  * @function create
@@ -90746,6 +90771,8 @@
90746
90771
  writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fee);
90747
90772
  if (message.validityStartHeight != null && Object.hasOwnProperty.call(message, "validityStartHeight"))
90748
90773
  writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.validityStartHeight);
90774
+ if (message.networkId != null && Object.hasOwnProperty.call(message, "networkId"))
90775
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.networkId);
90749
90776
  return writer;
90750
90777
  };
90751
90778
 
@@ -90782,6 +90809,9 @@
90782
90809
  case 5:
90783
90810
  message.validityStartHeight = reader.uint32();
90784
90811
  break;
90812
+ case 6:
90813
+ message.networkId = reader.int32();
90814
+ break;
90785
90815
  default:
90786
90816
  reader.skipType(tag & 7);
90787
90817
  break;
@@ -90816,6 +90846,15 @@
90816
90846
  if (message.validityStartHeight != null && message.hasOwnProperty("validityStartHeight"))
90817
90847
  if (!$util.isInteger(message.validityStartHeight))
90818
90848
  return "validityStartHeight: integer expected";
90849
+ if (message.networkId != null && message.hasOwnProperty("networkId"))
90850
+ switch (message.networkId) {
90851
+ default:
90852
+ return "networkId: enum value expected";
90853
+ case 0:
90854
+ case 42:
90855
+ case 24:
90856
+ break;
90857
+ }
90819
90858
  return null;
90820
90859
  };
90821
90860
 
@@ -90858,6 +90897,20 @@
90858
90897
  message.fee = new $util.LongBits(object.fee.low >>> 0, object.fee.high >>> 0).toNumber(true);
90859
90898
  if (object.validityStartHeight != null)
90860
90899
  message.validityStartHeight = object.validityStartHeight >>> 0;
90900
+ switch (object.networkId) {
90901
+ case "UseDefault":
90902
+ case 0:
90903
+ message.networkId = 0;
90904
+ break;
90905
+ case "Mainnet":
90906
+ case 42:
90907
+ message.networkId = 42;
90908
+ break;
90909
+ case "MainnetAlbatross":
90910
+ case 24:
90911
+ message.networkId = 24;
90912
+ break;
90913
+ }
90861
90914
  return message;
90862
90915
  };
90863
90916
 
@@ -90894,6 +90947,7 @@
90894
90947
  } else
90895
90948
  object.fee = options.longs === String ? "0" : 0;
90896
90949
  object.validityStartHeight = 0;
90950
+ object.networkId = options.enums === String ? "UseDefault" : 0;
90897
90951
  }
90898
90952
  if (message.privateKey != null && message.hasOwnProperty("privateKey"))
90899
90953
  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;
@@ -90911,6 +90965,8 @@
90911
90965
  object.fee = options.longs === String ? $util.Long.prototype.toString.call(message.fee) : options.longs === Number ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber(true) : message.fee;
90912
90966
  if (message.validityStartHeight != null && message.hasOwnProperty("validityStartHeight"))
90913
90967
  object.validityStartHeight = message.validityStartHeight;
90968
+ if (message.networkId != null && message.hasOwnProperty("networkId"))
90969
+ object.networkId = options.enums === String ? $root.TW.Nimiq.Proto.NetworkId[message.networkId] : message.networkId;
90914
90970
  return object;
90915
90971
  };
90916
90972
 
@@ -95507,59 +95563,46 @@
95507
95563
  return Ontology;
95508
95564
  })();
95509
95565
 
95510
- TW.Polkadot = (function() {
95566
+ TW.Pactus = (function() {
95511
95567
 
95512
95568
  /**
95513
- * Namespace Polkadot.
95569
+ * Namespace Pactus.
95514
95570
  * @memberof TW
95515
95571
  * @namespace
95516
95572
  */
95517
- var Polkadot = {};
95573
+ var Pactus = {};
95518
95574
 
95519
- Polkadot.Proto = (function() {
95575
+ Pactus.Proto = (function() {
95520
95576
 
95521
95577
  /**
95522
95578
  * Namespace Proto.
95523
- * @memberof TW.Polkadot
95579
+ * @memberof TW.Pactus
95524
95580
  * @namespace
95525
95581
  */
95526
95582
  var Proto = {};
95527
95583
 
95528
- /**
95529
- * RewardDestination enum.
95530
- * @name TW.Polkadot.Proto.RewardDestination
95531
- * @enum {number}
95532
- * @property {number} STAKED=0 STAKED value
95533
- * @property {number} STASH=1 STASH value
95534
- * @property {number} CONTROLLER=2 CONTROLLER value
95535
- */
95536
- Proto.RewardDestination = (function() {
95537
- var valuesById = {}, values = Object.create(valuesById);
95538
- values[valuesById[0] = "STAKED"] = 0;
95539
- values[valuesById[1] = "STASH"] = 1;
95540
- values[valuesById[2] = "CONTROLLER"] = 2;
95541
- return values;
95542
- })();
95543
-
95544
- Proto.Era = (function() {
95584
+ Proto.TransactionMessage = (function() {
95545
95585
 
95546
95586
  /**
95547
- * Properties of an Era.
95548
- * @memberof TW.Polkadot.Proto
95549
- * @interface IEra
95550
- * @property {Long|null} [blockNumber] Era blockNumber
95551
- * @property {Long|null} [period] Era period
95587
+ * Properties of a TransactionMessage.
95588
+ * @memberof TW.Pactus.Proto
95589
+ * @interface ITransactionMessage
95590
+ * @property {number|null} [lockTime] TransactionMessage lockTime
95591
+ * @property {Long|null} [fee] TransactionMessage fee
95592
+ * @property {string|null} [memo] TransactionMessage memo
95593
+ * @property {TW.Pactus.Proto.ITransferPayload|null} [transfer] TransactionMessage transfer
95594
+ * @property {TW.Pactus.Proto.IBondPayload|null} [bond] TransactionMessage bond
95552
95595
  */
95553
95596
 
95554
95597
  /**
95555
- * Constructs a new Era.
95556
- * @memberof TW.Polkadot.Proto
95557
- * @classdesc Represents an Era.
95558
- * @implements IEra
95598
+ * Constructs a new TransactionMessage.
95599
+ * @memberof TW.Pactus.Proto
95600
+ * @classdesc Represents a TransactionMessage.
95601
+ * @implements ITransactionMessage
95559
95602
  * @constructor
95560
- * @param {TW.Polkadot.Proto.IEra=} [properties] Properties to set
95603
+ * @param {TW.Pactus.Proto.ITransactionMessage=} [properties] Properties to set
95561
95604
  */
95562
- function Era(properties) {
95605
+ function TransactionMessage(properties) {
95563
95606
  if (properties)
95564
95607
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
95565
95608
  if (properties[keys[i]] != null)
@@ -95567,75 +95610,128 @@
95567
95610
  }
95568
95611
 
95569
95612
  /**
95570
- * Era blockNumber.
95571
- * @member {Long} blockNumber
95572
- * @memberof TW.Polkadot.Proto.Era
95613
+ * TransactionMessage lockTime.
95614
+ * @member {number} lockTime
95615
+ * @memberof TW.Pactus.Proto.TransactionMessage
95573
95616
  * @instance
95574
95617
  */
95575
- Era.prototype.blockNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
95618
+ TransactionMessage.prototype.lockTime = 0;
95576
95619
 
95577
95620
  /**
95578
- * Era period.
95579
- * @member {Long} period
95580
- * @memberof TW.Polkadot.Proto.Era
95621
+ * TransactionMessage fee.
95622
+ * @member {Long} fee
95623
+ * @memberof TW.Pactus.Proto.TransactionMessage
95581
95624
  * @instance
95582
95625
  */
95583
- Era.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
95626
+ TransactionMessage.prototype.fee = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
95584
95627
 
95585
95628
  /**
95586
- * Creates a new Era instance using the specified properties.
95629
+ * TransactionMessage memo.
95630
+ * @member {string} memo
95631
+ * @memberof TW.Pactus.Proto.TransactionMessage
95632
+ * @instance
95633
+ */
95634
+ TransactionMessage.prototype.memo = "";
95635
+
95636
+ /**
95637
+ * TransactionMessage transfer.
95638
+ * @member {TW.Pactus.Proto.ITransferPayload|null|undefined} transfer
95639
+ * @memberof TW.Pactus.Proto.TransactionMessage
95640
+ * @instance
95641
+ */
95642
+ TransactionMessage.prototype.transfer = null;
95643
+
95644
+ /**
95645
+ * TransactionMessage bond.
95646
+ * @member {TW.Pactus.Proto.IBondPayload|null|undefined} bond
95647
+ * @memberof TW.Pactus.Proto.TransactionMessage
95648
+ * @instance
95649
+ */
95650
+ TransactionMessage.prototype.bond = null;
95651
+
95652
+ // OneOf field names bound to virtual getters and setters
95653
+ var $oneOfFields;
95654
+
95655
+ /**
95656
+ * TransactionMessage payload.
95657
+ * @member {"transfer"|"bond"|undefined} payload
95658
+ * @memberof TW.Pactus.Proto.TransactionMessage
95659
+ * @instance
95660
+ */
95661
+ Object.defineProperty(TransactionMessage.prototype, "payload", {
95662
+ get: $util.oneOfGetter($oneOfFields = ["transfer", "bond"]),
95663
+ set: $util.oneOfSetter($oneOfFields)
95664
+ });
95665
+
95666
+ /**
95667
+ * Creates a new TransactionMessage instance using the specified properties.
95587
95668
  * @function create
95588
- * @memberof TW.Polkadot.Proto.Era
95669
+ * @memberof TW.Pactus.Proto.TransactionMessage
95589
95670
  * @static
95590
- * @param {TW.Polkadot.Proto.IEra=} [properties] Properties to set
95591
- * @returns {TW.Polkadot.Proto.Era} Era instance
95671
+ * @param {TW.Pactus.Proto.ITransactionMessage=} [properties] Properties to set
95672
+ * @returns {TW.Pactus.Proto.TransactionMessage} TransactionMessage instance
95592
95673
  */
95593
- Era.create = function create(properties) {
95594
- return new Era(properties);
95674
+ TransactionMessage.create = function create(properties) {
95675
+ return new TransactionMessage(properties);
95595
95676
  };
95596
95677
 
95597
95678
  /**
95598
- * Encodes the specified Era message. Does not implicitly {@link TW.Polkadot.Proto.Era.verify|verify} messages.
95679
+ * Encodes the specified TransactionMessage message. Does not implicitly {@link TW.Pactus.Proto.TransactionMessage.verify|verify} messages.
95599
95680
  * @function encode
95600
- * @memberof TW.Polkadot.Proto.Era
95681
+ * @memberof TW.Pactus.Proto.TransactionMessage
95601
95682
  * @static
95602
- * @param {TW.Polkadot.Proto.IEra} message Era message or plain object to encode
95683
+ * @param {TW.Pactus.Proto.ITransactionMessage} message TransactionMessage message or plain object to encode
95603
95684
  * @param {$protobuf.Writer} [writer] Writer to encode to
95604
95685
  * @returns {$protobuf.Writer} Writer
95605
95686
  */
95606
- Era.encode = function encode(message, writer) {
95687
+ TransactionMessage.encode = function encode(message, writer) {
95607
95688
  if (!writer)
95608
95689
  writer = $Writer.create();
95609
- if (message.blockNumber != null && Object.hasOwnProperty.call(message, "blockNumber"))
95610
- writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.blockNumber);
95611
- if (message.period != null && Object.hasOwnProperty.call(message, "period"))
95612
- writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period);
95690
+ if (message.lockTime != null && Object.hasOwnProperty.call(message, "lockTime"))
95691
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.lockTime);
95692
+ if (message.fee != null && Object.hasOwnProperty.call(message, "fee"))
95693
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.fee);
95694
+ if (message.memo != null && Object.hasOwnProperty.call(message, "memo"))
95695
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.memo);
95696
+ if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
95697
+ $root.TW.Pactus.Proto.TransferPayload.encode(message.transfer, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
95698
+ if (message.bond != null && Object.hasOwnProperty.call(message, "bond"))
95699
+ $root.TW.Pactus.Proto.BondPayload.encode(message.bond, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
95613
95700
  return writer;
95614
95701
  };
95615
95702
 
95616
95703
  /**
95617
- * Decodes an Era message from the specified reader or buffer.
95704
+ * Decodes a TransactionMessage message from the specified reader or buffer.
95618
95705
  * @function decode
95619
- * @memberof TW.Polkadot.Proto.Era
95706
+ * @memberof TW.Pactus.Proto.TransactionMessage
95620
95707
  * @static
95621
95708
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
95622
95709
  * @param {number} [length] Message length if known beforehand
95623
- * @returns {TW.Polkadot.Proto.Era} Era
95710
+ * @returns {TW.Pactus.Proto.TransactionMessage} TransactionMessage
95624
95711
  * @throws {Error} If the payload is not a reader or valid buffer
95625
95712
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
95626
95713
  */
95627
- Era.decode = function decode(reader, length) {
95714
+ TransactionMessage.decode = function decode(reader, length) {
95628
95715
  if (!(reader instanceof $Reader))
95629
95716
  reader = $Reader.create(reader);
95630
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.Era();
95717
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Pactus.Proto.TransactionMessage();
95631
95718
  while (reader.pos < end) {
95632
95719
  var tag = reader.uint32();
95633
95720
  switch (tag >>> 3) {
95634
95721
  case 1:
95635
- message.blockNumber = reader.uint64();
95722
+ message.lockTime = reader.uint32();
95636
95723
  break;
95637
95724
  case 2:
95638
- message.period = reader.uint64();
95725
+ message.fee = reader.int64();
95726
+ break;
95727
+ case 3:
95728
+ message.memo = reader.string();
95729
+ break;
95730
+ case 10:
95731
+ message.transfer = $root.TW.Pactus.Proto.TransferPayload.decode(reader, reader.uint32());
95732
+ break;
95733
+ case 11:
95734
+ message.bond = $root.TW.Pactus.Proto.BondPayload.decode(reader, reader.uint32());
95639
95735
  break;
95640
95736
  default:
95641
95737
  reader.skipType(tag & 7);
@@ -95646,129 +95742,163 @@
95646
95742
  };
95647
95743
 
95648
95744
  /**
95649
- * Verifies an Era message.
95745
+ * Verifies a TransactionMessage message.
95650
95746
  * @function verify
95651
- * @memberof TW.Polkadot.Proto.Era
95747
+ * @memberof TW.Pactus.Proto.TransactionMessage
95652
95748
  * @static
95653
95749
  * @param {Object.<string,*>} message Plain object to verify
95654
95750
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
95655
95751
  */
95656
- Era.verify = function verify(message) {
95752
+ TransactionMessage.verify = function verify(message) {
95657
95753
  if (typeof message !== "object" || message === null)
95658
95754
  return "object expected";
95659
- if (message.blockNumber != null && message.hasOwnProperty("blockNumber"))
95660
- if (!$util.isInteger(message.blockNumber) && !(message.blockNumber && $util.isInteger(message.blockNumber.low) && $util.isInteger(message.blockNumber.high)))
95661
- return "blockNumber: integer|Long expected";
95662
- if (message.period != null && message.hasOwnProperty("period"))
95663
- if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high)))
95664
- return "period: integer|Long expected";
95755
+ var properties = {};
95756
+ if (message.lockTime != null && message.hasOwnProperty("lockTime"))
95757
+ if (!$util.isInteger(message.lockTime))
95758
+ return "lockTime: integer expected";
95759
+ if (message.fee != null && message.hasOwnProperty("fee"))
95760
+ if (!$util.isInteger(message.fee) && !(message.fee && $util.isInteger(message.fee.low) && $util.isInteger(message.fee.high)))
95761
+ return "fee: integer|Long expected";
95762
+ if (message.memo != null && message.hasOwnProperty("memo"))
95763
+ if (!$util.isString(message.memo))
95764
+ return "memo: string expected";
95765
+ if (message.transfer != null && message.hasOwnProperty("transfer")) {
95766
+ properties.payload = 1;
95767
+ {
95768
+ var error = $root.TW.Pactus.Proto.TransferPayload.verify(message.transfer);
95769
+ if (error)
95770
+ return "transfer." + error;
95771
+ }
95772
+ }
95773
+ if (message.bond != null && message.hasOwnProperty("bond")) {
95774
+ if (properties.payload === 1)
95775
+ return "payload: multiple values";
95776
+ properties.payload = 1;
95777
+ {
95778
+ var error = $root.TW.Pactus.Proto.BondPayload.verify(message.bond);
95779
+ if (error)
95780
+ return "bond." + error;
95781
+ }
95782
+ }
95665
95783
  return null;
95666
95784
  };
95667
95785
 
95668
95786
  /**
95669
- * Creates an Era message from a plain object. Also converts values to their respective internal types.
95787
+ * Creates a TransactionMessage message from a plain object. Also converts values to their respective internal types.
95670
95788
  * @function fromObject
95671
- * @memberof TW.Polkadot.Proto.Era
95789
+ * @memberof TW.Pactus.Proto.TransactionMessage
95672
95790
  * @static
95673
95791
  * @param {Object.<string,*>} object Plain object
95674
- * @returns {TW.Polkadot.Proto.Era} Era
95792
+ * @returns {TW.Pactus.Proto.TransactionMessage} TransactionMessage
95675
95793
  */
95676
- Era.fromObject = function fromObject(object) {
95677
- if (object instanceof $root.TW.Polkadot.Proto.Era)
95794
+ TransactionMessage.fromObject = function fromObject(object) {
95795
+ if (object instanceof $root.TW.Pactus.Proto.TransactionMessage)
95678
95796
  return object;
95679
- var message = new $root.TW.Polkadot.Proto.Era();
95680
- if (object.blockNumber != null)
95681
- if ($util.Long)
95682
- (message.blockNumber = $util.Long.fromValue(object.blockNumber)).unsigned = true;
95683
- else if (typeof object.blockNumber === "string")
95684
- message.blockNumber = parseInt(object.blockNumber, 10);
95685
- else if (typeof object.blockNumber === "number")
95686
- message.blockNumber = object.blockNumber;
95687
- else if (typeof object.blockNumber === "object")
95688
- message.blockNumber = new $util.LongBits(object.blockNumber.low >>> 0, object.blockNumber.high >>> 0).toNumber(true);
95689
- if (object.period != null)
95797
+ var message = new $root.TW.Pactus.Proto.TransactionMessage();
95798
+ if (object.lockTime != null)
95799
+ message.lockTime = object.lockTime >>> 0;
95800
+ if (object.fee != null)
95690
95801
  if ($util.Long)
95691
- (message.period = $util.Long.fromValue(object.period)).unsigned = true;
95692
- else if (typeof object.period === "string")
95693
- message.period = parseInt(object.period, 10);
95694
- else if (typeof object.period === "number")
95695
- message.period = object.period;
95696
- else if (typeof object.period === "object")
95697
- message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true);
95802
+ (message.fee = $util.Long.fromValue(object.fee)).unsigned = false;
95803
+ else if (typeof object.fee === "string")
95804
+ message.fee = parseInt(object.fee, 10);
95805
+ else if (typeof object.fee === "number")
95806
+ message.fee = object.fee;
95807
+ else if (typeof object.fee === "object")
95808
+ message.fee = new $util.LongBits(object.fee.low >>> 0, object.fee.high >>> 0).toNumber();
95809
+ if (object.memo != null)
95810
+ message.memo = String(object.memo);
95811
+ if (object.transfer != null) {
95812
+ if (typeof object.transfer !== "object")
95813
+ throw TypeError(".TW.Pactus.Proto.TransactionMessage.transfer: object expected");
95814
+ message.transfer = $root.TW.Pactus.Proto.TransferPayload.fromObject(object.transfer);
95815
+ }
95816
+ if (object.bond != null) {
95817
+ if (typeof object.bond !== "object")
95818
+ throw TypeError(".TW.Pactus.Proto.TransactionMessage.bond: object expected");
95819
+ message.bond = $root.TW.Pactus.Proto.BondPayload.fromObject(object.bond);
95820
+ }
95698
95821
  return message;
95699
95822
  };
95700
95823
 
95701
95824
  /**
95702
- * Creates a plain object from an Era message. Also converts values to other types if specified.
95825
+ * Creates a plain object from a TransactionMessage message. Also converts values to other types if specified.
95703
95826
  * @function toObject
95704
- * @memberof TW.Polkadot.Proto.Era
95827
+ * @memberof TW.Pactus.Proto.TransactionMessage
95705
95828
  * @static
95706
- * @param {TW.Polkadot.Proto.Era} message Era
95829
+ * @param {TW.Pactus.Proto.TransactionMessage} message TransactionMessage
95707
95830
  * @param {$protobuf.IConversionOptions} [options] Conversion options
95708
95831
  * @returns {Object.<string,*>} Plain object
95709
95832
  */
95710
- Era.toObject = function toObject(message, options) {
95833
+ TransactionMessage.toObject = function toObject(message, options) {
95711
95834
  if (!options)
95712
95835
  options = {};
95713
95836
  var object = {};
95714
95837
  if (options.defaults) {
95838
+ object.lockTime = 0;
95715
95839
  if ($util.Long) {
95716
- var long = new $util.Long(0, 0, true);
95717
- object.blockNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
95718
- } else
95719
- object.blockNumber = options.longs === String ? "0" : 0;
95720
- if ($util.Long) {
95721
- var long = new $util.Long(0, 0, true);
95722
- object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
95840
+ var long = new $util.Long(0, 0, false);
95841
+ object.fee = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
95723
95842
  } else
95724
- object.period = options.longs === String ? "0" : 0;
95843
+ object.fee = options.longs === String ? "0" : 0;
95844
+ object.memo = "";
95725
95845
  }
95726
- if (message.blockNumber != null && message.hasOwnProperty("blockNumber"))
95727
- if (typeof message.blockNumber === "number")
95728
- object.blockNumber = options.longs === String ? String(message.blockNumber) : message.blockNumber;
95729
- else
95730
- object.blockNumber = options.longs === String ? $util.Long.prototype.toString.call(message.blockNumber) : options.longs === Number ? new $util.LongBits(message.blockNumber.low >>> 0, message.blockNumber.high >>> 0).toNumber(true) : message.blockNumber;
95731
- if (message.period != null && message.hasOwnProperty("period"))
95732
- if (typeof message.period === "number")
95733
- object.period = options.longs === String ? String(message.period) : message.period;
95846
+ if (message.lockTime != null && message.hasOwnProperty("lockTime"))
95847
+ object.lockTime = message.lockTime;
95848
+ if (message.fee != null && message.hasOwnProperty("fee"))
95849
+ if (typeof message.fee === "number")
95850
+ object.fee = options.longs === String ? String(message.fee) : message.fee;
95734
95851
  else
95735
- object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period;
95852
+ object.fee = options.longs === String ? $util.Long.prototype.toString.call(message.fee) : options.longs === Number ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber() : message.fee;
95853
+ if (message.memo != null && message.hasOwnProperty("memo"))
95854
+ object.memo = message.memo;
95855
+ if (message.transfer != null && message.hasOwnProperty("transfer")) {
95856
+ object.transfer = $root.TW.Pactus.Proto.TransferPayload.toObject(message.transfer, options);
95857
+ if (options.oneofs)
95858
+ object.payload = "transfer";
95859
+ }
95860
+ if (message.bond != null && message.hasOwnProperty("bond")) {
95861
+ object.bond = $root.TW.Pactus.Proto.BondPayload.toObject(message.bond, options);
95862
+ if (options.oneofs)
95863
+ object.payload = "bond";
95864
+ }
95736
95865
  return object;
95737
95866
  };
95738
95867
 
95739
95868
  /**
95740
- * Converts this Era to JSON.
95869
+ * Converts this TransactionMessage to JSON.
95741
95870
  * @function toJSON
95742
- * @memberof TW.Polkadot.Proto.Era
95871
+ * @memberof TW.Pactus.Proto.TransactionMessage
95743
95872
  * @instance
95744
95873
  * @returns {Object.<string,*>} JSON object
95745
95874
  */
95746
- Era.prototype.toJSON = function toJSON() {
95875
+ TransactionMessage.prototype.toJSON = function toJSON() {
95747
95876
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
95748
95877
  };
95749
95878
 
95750
- return Era;
95879
+ return TransactionMessage;
95751
95880
  })();
95752
95881
 
95753
- Proto.CustomCallIndices = (function() {
95882
+ Proto.TransferPayload = (function() {
95754
95883
 
95755
95884
  /**
95756
- * Properties of a CustomCallIndices.
95757
- * @memberof TW.Polkadot.Proto
95758
- * @interface ICustomCallIndices
95759
- * @property {number|null} [moduleIndex] CustomCallIndices moduleIndex
95760
- * @property {number|null} [methodIndex] CustomCallIndices methodIndex
95885
+ * Properties of a TransferPayload.
95886
+ * @memberof TW.Pactus.Proto
95887
+ * @interface ITransferPayload
95888
+ * @property {string|null} [sender] TransferPayload sender
95889
+ * @property {string|null} [receiver] TransferPayload receiver
95890
+ * @property {Long|null} [amount] TransferPayload amount
95761
95891
  */
95762
95892
 
95763
95893
  /**
95764
- * Constructs a new CustomCallIndices.
95765
- * @memberof TW.Polkadot.Proto
95766
- * @classdesc Represents a CustomCallIndices.
95767
- * @implements ICustomCallIndices
95894
+ * Constructs a new TransferPayload.
95895
+ * @memberof TW.Pactus.Proto
95896
+ * @classdesc Represents a TransferPayload.
95897
+ * @implements ITransferPayload
95768
95898
  * @constructor
95769
- * @param {TW.Polkadot.Proto.ICustomCallIndices=} [properties] Properties to set
95899
+ * @param {TW.Pactus.Proto.ITransferPayload=} [properties] Properties to set
95770
95900
  */
95771
- function CustomCallIndices(properties) {
95901
+ function TransferPayload(properties) {
95772
95902
  if (properties)
95773
95903
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
95774
95904
  if (properties[keys[i]] != null)
@@ -95776,75 +95906,88 @@
95776
95906
  }
95777
95907
 
95778
95908
  /**
95779
- * CustomCallIndices moduleIndex.
95780
- * @member {number} moduleIndex
95781
- * @memberof TW.Polkadot.Proto.CustomCallIndices
95909
+ * TransferPayload sender.
95910
+ * @member {string} sender
95911
+ * @memberof TW.Pactus.Proto.TransferPayload
95782
95912
  * @instance
95783
95913
  */
95784
- CustomCallIndices.prototype.moduleIndex = 0;
95914
+ TransferPayload.prototype.sender = "";
95785
95915
 
95786
95916
  /**
95787
- * CustomCallIndices methodIndex.
95788
- * @member {number} methodIndex
95789
- * @memberof TW.Polkadot.Proto.CustomCallIndices
95917
+ * TransferPayload receiver.
95918
+ * @member {string} receiver
95919
+ * @memberof TW.Pactus.Proto.TransferPayload
95790
95920
  * @instance
95791
95921
  */
95792
- CustomCallIndices.prototype.methodIndex = 0;
95922
+ TransferPayload.prototype.receiver = "";
95793
95923
 
95794
95924
  /**
95795
- * Creates a new CustomCallIndices instance using the specified properties.
95925
+ * TransferPayload amount.
95926
+ * @member {Long} amount
95927
+ * @memberof TW.Pactus.Proto.TransferPayload
95928
+ * @instance
95929
+ */
95930
+ TransferPayload.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
95931
+
95932
+ /**
95933
+ * Creates a new TransferPayload instance using the specified properties.
95796
95934
  * @function create
95797
- * @memberof TW.Polkadot.Proto.CustomCallIndices
95935
+ * @memberof TW.Pactus.Proto.TransferPayload
95798
95936
  * @static
95799
- * @param {TW.Polkadot.Proto.ICustomCallIndices=} [properties] Properties to set
95800
- * @returns {TW.Polkadot.Proto.CustomCallIndices} CustomCallIndices instance
95937
+ * @param {TW.Pactus.Proto.ITransferPayload=} [properties] Properties to set
95938
+ * @returns {TW.Pactus.Proto.TransferPayload} TransferPayload instance
95801
95939
  */
95802
- CustomCallIndices.create = function create(properties) {
95803
- return new CustomCallIndices(properties);
95940
+ TransferPayload.create = function create(properties) {
95941
+ return new TransferPayload(properties);
95804
95942
  };
95805
95943
 
95806
95944
  /**
95807
- * Encodes the specified CustomCallIndices message. Does not implicitly {@link TW.Polkadot.Proto.CustomCallIndices.verify|verify} messages.
95945
+ * Encodes the specified TransferPayload message. Does not implicitly {@link TW.Pactus.Proto.TransferPayload.verify|verify} messages.
95808
95946
  * @function encode
95809
- * @memberof TW.Polkadot.Proto.CustomCallIndices
95947
+ * @memberof TW.Pactus.Proto.TransferPayload
95810
95948
  * @static
95811
- * @param {TW.Polkadot.Proto.ICustomCallIndices} message CustomCallIndices message or plain object to encode
95949
+ * @param {TW.Pactus.Proto.ITransferPayload} message TransferPayload message or plain object to encode
95812
95950
  * @param {$protobuf.Writer} [writer] Writer to encode to
95813
95951
  * @returns {$protobuf.Writer} Writer
95814
95952
  */
95815
- CustomCallIndices.encode = function encode(message, writer) {
95953
+ TransferPayload.encode = function encode(message, writer) {
95816
95954
  if (!writer)
95817
95955
  writer = $Writer.create();
95818
- if (message.moduleIndex != null && Object.hasOwnProperty.call(message, "moduleIndex"))
95819
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.moduleIndex);
95820
- if (message.methodIndex != null && Object.hasOwnProperty.call(message, "methodIndex"))
95821
- writer.uint32(/* id 5, wireType 0 =*/40).int32(message.methodIndex);
95956
+ if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
95957
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
95958
+ if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver"))
95959
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.receiver);
95960
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
95961
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.amount);
95822
95962
  return writer;
95823
95963
  };
95824
95964
 
95825
95965
  /**
95826
- * Decodes a CustomCallIndices message from the specified reader or buffer.
95966
+ * Decodes a TransferPayload message from the specified reader or buffer.
95827
95967
  * @function decode
95828
- * @memberof TW.Polkadot.Proto.CustomCallIndices
95968
+ * @memberof TW.Pactus.Proto.TransferPayload
95829
95969
  * @static
95830
95970
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
95831
95971
  * @param {number} [length] Message length if known beforehand
95832
- * @returns {TW.Polkadot.Proto.CustomCallIndices} CustomCallIndices
95972
+ * @returns {TW.Pactus.Proto.TransferPayload} TransferPayload
95833
95973
  * @throws {Error} If the payload is not a reader or valid buffer
95834
95974
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
95835
95975
  */
95836
- CustomCallIndices.decode = function decode(reader, length) {
95976
+ TransferPayload.decode = function decode(reader, length) {
95837
95977
  if (!(reader instanceof $Reader))
95838
95978
  reader = $Reader.create(reader);
95839
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.CustomCallIndices();
95979
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Pactus.Proto.TransferPayload();
95840
95980
  while (reader.pos < end) {
95841
95981
  var tag = reader.uint32();
95842
95982
  switch (tag >>> 3) {
95843
- case 4:
95844
- message.moduleIndex = reader.int32();
95983
+ case 1:
95984
+ message.sender = reader.string();
95845
95985
  break;
95846
- case 5:
95847
- message.methodIndex = reader.int32();
95986
+ case 2:
95987
+ message.receiver = reader.string();
95988
+ break;
95989
+ case 3:
95990
+ message.amount = reader.int64();
95848
95991
  break;
95849
95992
  default:
95850
95993
  reader.skipType(tag & 7);
@@ -95855,100 +95998,125 @@
95855
95998
  };
95856
95999
 
95857
96000
  /**
95858
- * Verifies a CustomCallIndices message.
96001
+ * Verifies a TransferPayload message.
95859
96002
  * @function verify
95860
- * @memberof TW.Polkadot.Proto.CustomCallIndices
96003
+ * @memberof TW.Pactus.Proto.TransferPayload
95861
96004
  * @static
95862
96005
  * @param {Object.<string,*>} message Plain object to verify
95863
96006
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
95864
96007
  */
95865
- CustomCallIndices.verify = function verify(message) {
96008
+ TransferPayload.verify = function verify(message) {
95866
96009
  if (typeof message !== "object" || message === null)
95867
96010
  return "object expected";
95868
- if (message.moduleIndex != null && message.hasOwnProperty("moduleIndex"))
95869
- if (!$util.isInteger(message.moduleIndex))
95870
- return "moduleIndex: integer expected";
95871
- if (message.methodIndex != null && message.hasOwnProperty("methodIndex"))
95872
- if (!$util.isInteger(message.methodIndex))
95873
- return "methodIndex: integer expected";
96011
+ if (message.sender != null && message.hasOwnProperty("sender"))
96012
+ if (!$util.isString(message.sender))
96013
+ return "sender: string expected";
96014
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
96015
+ if (!$util.isString(message.receiver))
96016
+ return "receiver: string expected";
96017
+ if (message.amount != null && message.hasOwnProperty("amount"))
96018
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
96019
+ return "amount: integer|Long expected";
95874
96020
  return null;
95875
96021
  };
95876
96022
 
95877
96023
  /**
95878
- * Creates a CustomCallIndices message from a plain object. Also converts values to their respective internal types.
96024
+ * Creates a TransferPayload message from a plain object. Also converts values to their respective internal types.
95879
96025
  * @function fromObject
95880
- * @memberof TW.Polkadot.Proto.CustomCallIndices
96026
+ * @memberof TW.Pactus.Proto.TransferPayload
95881
96027
  * @static
95882
96028
  * @param {Object.<string,*>} object Plain object
95883
- * @returns {TW.Polkadot.Proto.CustomCallIndices} CustomCallIndices
96029
+ * @returns {TW.Pactus.Proto.TransferPayload} TransferPayload
95884
96030
  */
95885
- CustomCallIndices.fromObject = function fromObject(object) {
95886
- if (object instanceof $root.TW.Polkadot.Proto.CustomCallIndices)
96031
+ TransferPayload.fromObject = function fromObject(object) {
96032
+ if (object instanceof $root.TW.Pactus.Proto.TransferPayload)
95887
96033
  return object;
95888
- var message = new $root.TW.Polkadot.Proto.CustomCallIndices();
95889
- if (object.moduleIndex != null)
95890
- message.moduleIndex = object.moduleIndex | 0;
95891
- if (object.methodIndex != null)
95892
- message.methodIndex = object.methodIndex | 0;
96034
+ var message = new $root.TW.Pactus.Proto.TransferPayload();
96035
+ if (object.sender != null)
96036
+ message.sender = String(object.sender);
96037
+ if (object.receiver != null)
96038
+ message.receiver = String(object.receiver);
96039
+ if (object.amount != null)
96040
+ if ($util.Long)
96041
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = false;
96042
+ else if (typeof object.amount === "string")
96043
+ message.amount = parseInt(object.amount, 10);
96044
+ else if (typeof object.amount === "number")
96045
+ message.amount = object.amount;
96046
+ else if (typeof object.amount === "object")
96047
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber();
95893
96048
  return message;
95894
96049
  };
95895
96050
 
95896
96051
  /**
95897
- * Creates a plain object from a CustomCallIndices message. Also converts values to other types if specified.
96052
+ * Creates a plain object from a TransferPayload message. Also converts values to other types if specified.
95898
96053
  * @function toObject
95899
- * @memberof TW.Polkadot.Proto.CustomCallIndices
96054
+ * @memberof TW.Pactus.Proto.TransferPayload
95900
96055
  * @static
95901
- * @param {TW.Polkadot.Proto.CustomCallIndices} message CustomCallIndices
96056
+ * @param {TW.Pactus.Proto.TransferPayload} message TransferPayload
95902
96057
  * @param {$protobuf.IConversionOptions} [options] Conversion options
95903
96058
  * @returns {Object.<string,*>} Plain object
95904
96059
  */
95905
- CustomCallIndices.toObject = function toObject(message, options) {
96060
+ TransferPayload.toObject = function toObject(message, options) {
95906
96061
  if (!options)
95907
96062
  options = {};
95908
96063
  var object = {};
95909
96064
  if (options.defaults) {
95910
- object.moduleIndex = 0;
95911
- object.methodIndex = 0;
96065
+ object.sender = "";
96066
+ object.receiver = "";
96067
+ if ($util.Long) {
96068
+ var long = new $util.Long(0, 0, false);
96069
+ object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
96070
+ } else
96071
+ object.amount = options.longs === String ? "0" : 0;
95912
96072
  }
95913
- if (message.moduleIndex != null && message.hasOwnProperty("moduleIndex"))
95914
- object.moduleIndex = message.moduleIndex;
95915
- if (message.methodIndex != null && message.hasOwnProperty("methodIndex"))
95916
- object.methodIndex = message.methodIndex;
96073
+ if (message.sender != null && message.hasOwnProperty("sender"))
96074
+ object.sender = message.sender;
96075
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
96076
+ object.receiver = message.receiver;
96077
+ if (message.amount != null && message.hasOwnProperty("amount"))
96078
+ if (typeof message.amount === "number")
96079
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
96080
+ else
96081
+ 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() : message.amount;
95917
96082
  return object;
95918
96083
  };
95919
96084
 
95920
96085
  /**
95921
- * Converts this CustomCallIndices to JSON.
96086
+ * Converts this TransferPayload to JSON.
95922
96087
  * @function toJSON
95923
- * @memberof TW.Polkadot.Proto.CustomCallIndices
96088
+ * @memberof TW.Pactus.Proto.TransferPayload
95924
96089
  * @instance
95925
96090
  * @returns {Object.<string,*>} JSON object
95926
96091
  */
95927
- CustomCallIndices.prototype.toJSON = function toJSON() {
96092
+ TransferPayload.prototype.toJSON = function toJSON() {
95928
96093
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
95929
96094
  };
95930
96095
 
95931
- return CustomCallIndices;
96096
+ return TransferPayload;
95932
96097
  })();
95933
96098
 
95934
- Proto.CallIndices = (function() {
96099
+ Proto.BondPayload = (function() {
95935
96100
 
95936
96101
  /**
95937
- * Properties of a CallIndices.
95938
- * @memberof TW.Polkadot.Proto
95939
- * @interface ICallIndices
95940
- * @property {TW.Polkadot.Proto.ICustomCallIndices|null} [custom] CallIndices custom
96102
+ * Properties of a BondPayload.
96103
+ * @memberof TW.Pactus.Proto
96104
+ * @interface IBondPayload
96105
+ * @property {string|null} [sender] BondPayload sender
96106
+ * @property {string|null} [receiver] BondPayload receiver
96107
+ * @property {Long|null} [stake] BondPayload stake
96108
+ * @property {string|null} [publicKey] BondPayload publicKey
95941
96109
  */
95942
96110
 
95943
96111
  /**
95944
- * Constructs a new CallIndices.
95945
- * @memberof TW.Polkadot.Proto
95946
- * @classdesc Represents a CallIndices.
95947
- * @implements ICallIndices
96112
+ * Constructs a new BondPayload.
96113
+ * @memberof TW.Pactus.Proto
96114
+ * @classdesc Represents a BondPayload.
96115
+ * @implements IBondPayload
95948
96116
  * @constructor
95949
- * @param {TW.Polkadot.Proto.ICallIndices=} [properties] Properties to set
96117
+ * @param {TW.Pactus.Proto.IBondPayload=} [properties] Properties to set
95950
96118
  */
95951
- function CallIndices(properties) {
96119
+ function BondPayload(properties) {
95952
96120
  if (properties)
95953
96121
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
95954
96122
  if (properties[keys[i]] != null)
@@ -95956,76 +96124,101 @@
95956
96124
  }
95957
96125
 
95958
96126
  /**
95959
- * CallIndices custom.
95960
- * @member {TW.Polkadot.Proto.ICustomCallIndices|null|undefined} custom
95961
- * @memberof TW.Polkadot.Proto.CallIndices
96127
+ * BondPayload sender.
96128
+ * @member {string} sender
96129
+ * @memberof TW.Pactus.Proto.BondPayload
95962
96130
  * @instance
95963
96131
  */
95964
- CallIndices.prototype.custom = null;
96132
+ BondPayload.prototype.sender = "";
95965
96133
 
95966
- // OneOf field names bound to virtual getters and setters
95967
- var $oneOfFields;
96134
+ /**
96135
+ * BondPayload receiver.
96136
+ * @member {string} receiver
96137
+ * @memberof TW.Pactus.Proto.BondPayload
96138
+ * @instance
96139
+ */
96140
+ BondPayload.prototype.receiver = "";
95968
96141
 
95969
96142
  /**
95970
- * CallIndices variant.
95971
- * @member {"custom"|undefined} variant
95972
- * @memberof TW.Polkadot.Proto.CallIndices
96143
+ * BondPayload stake.
96144
+ * @member {Long} stake
96145
+ * @memberof TW.Pactus.Proto.BondPayload
95973
96146
  * @instance
95974
96147
  */
95975
- Object.defineProperty(CallIndices.prototype, "variant", {
95976
- get: $util.oneOfGetter($oneOfFields = ["custom"]),
95977
- set: $util.oneOfSetter($oneOfFields)
95978
- });
96148
+ BondPayload.prototype.stake = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
95979
96149
 
95980
96150
  /**
95981
- * Creates a new CallIndices instance using the specified properties.
96151
+ * BondPayload publicKey.
96152
+ * @member {string} publicKey
96153
+ * @memberof TW.Pactus.Proto.BondPayload
96154
+ * @instance
96155
+ */
96156
+ BondPayload.prototype.publicKey = "";
96157
+
96158
+ /**
96159
+ * Creates a new BondPayload instance using the specified properties.
95982
96160
  * @function create
95983
- * @memberof TW.Polkadot.Proto.CallIndices
96161
+ * @memberof TW.Pactus.Proto.BondPayload
95984
96162
  * @static
95985
- * @param {TW.Polkadot.Proto.ICallIndices=} [properties] Properties to set
95986
- * @returns {TW.Polkadot.Proto.CallIndices} CallIndices instance
96163
+ * @param {TW.Pactus.Proto.IBondPayload=} [properties] Properties to set
96164
+ * @returns {TW.Pactus.Proto.BondPayload} BondPayload instance
95987
96165
  */
95988
- CallIndices.create = function create(properties) {
95989
- return new CallIndices(properties);
96166
+ BondPayload.create = function create(properties) {
96167
+ return new BondPayload(properties);
95990
96168
  };
95991
96169
 
95992
96170
  /**
95993
- * Encodes the specified CallIndices message. Does not implicitly {@link TW.Polkadot.Proto.CallIndices.verify|verify} messages.
96171
+ * Encodes the specified BondPayload message. Does not implicitly {@link TW.Pactus.Proto.BondPayload.verify|verify} messages.
95994
96172
  * @function encode
95995
- * @memberof TW.Polkadot.Proto.CallIndices
96173
+ * @memberof TW.Pactus.Proto.BondPayload
95996
96174
  * @static
95997
- * @param {TW.Polkadot.Proto.ICallIndices} message CallIndices message or plain object to encode
96175
+ * @param {TW.Pactus.Proto.IBondPayload} message BondPayload message or plain object to encode
95998
96176
  * @param {$protobuf.Writer} [writer] Writer to encode to
95999
96177
  * @returns {$protobuf.Writer} Writer
96000
96178
  */
96001
- CallIndices.encode = function encode(message, writer) {
96179
+ BondPayload.encode = function encode(message, writer) {
96002
96180
  if (!writer)
96003
96181
  writer = $Writer.create();
96004
- if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
96005
- $root.TW.Polkadot.Proto.CustomCallIndices.encode(message.custom, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
96182
+ if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
96183
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
96184
+ if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver"))
96185
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.receiver);
96186
+ if (message.stake != null && Object.hasOwnProperty.call(message, "stake"))
96187
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.stake);
96188
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
96189
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.publicKey);
96006
96190
  return writer;
96007
96191
  };
96008
96192
 
96009
96193
  /**
96010
- * Decodes a CallIndices message from the specified reader or buffer.
96194
+ * Decodes a BondPayload message from the specified reader or buffer.
96011
96195
  * @function decode
96012
- * @memberof TW.Polkadot.Proto.CallIndices
96196
+ * @memberof TW.Pactus.Proto.BondPayload
96013
96197
  * @static
96014
96198
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
96015
96199
  * @param {number} [length] Message length if known beforehand
96016
- * @returns {TW.Polkadot.Proto.CallIndices} CallIndices
96200
+ * @returns {TW.Pactus.Proto.BondPayload} BondPayload
96017
96201
  * @throws {Error} If the payload is not a reader or valid buffer
96018
96202
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
96019
96203
  */
96020
- CallIndices.decode = function decode(reader, length) {
96204
+ BondPayload.decode = function decode(reader, length) {
96021
96205
  if (!(reader instanceof $Reader))
96022
96206
  reader = $Reader.create(reader);
96023
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.CallIndices();
96207
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Pactus.Proto.BondPayload();
96024
96208
  while (reader.pos < end) {
96025
96209
  var tag = reader.uint32();
96026
96210
  switch (tag >>> 3) {
96027
96211
  case 1:
96028
- message.custom = $root.TW.Polkadot.Proto.CustomCallIndices.decode(reader, reader.uint32());
96212
+ message.sender = reader.string();
96213
+ break;
96214
+ case 2:
96215
+ message.receiver = reader.string();
96216
+ break;
96217
+ case 3:
96218
+ message.stake = reader.int64();
96219
+ break;
96220
+ case 4:
96221
+ message.publicKey = reader.string();
96029
96222
  break;
96030
96223
  default:
96031
96224
  reader.skipType(tag & 7);
@@ -96036,46 +96229,1289 @@
96036
96229
  };
96037
96230
 
96038
96231
  /**
96039
- * Verifies a CallIndices message.
96232
+ * Verifies a BondPayload message.
96040
96233
  * @function verify
96041
- * @memberof TW.Polkadot.Proto.CallIndices
96234
+ * @memberof TW.Pactus.Proto.BondPayload
96042
96235
  * @static
96043
96236
  * @param {Object.<string,*>} message Plain object to verify
96044
96237
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
96045
96238
  */
96046
- CallIndices.verify = function verify(message) {
96239
+ BondPayload.verify = function verify(message) {
96047
96240
  if (typeof message !== "object" || message === null)
96048
96241
  return "object expected";
96049
- var properties = {};
96050
- if (message.custom != null && message.hasOwnProperty("custom")) {
96051
- properties.variant = 1;
96052
- {
96053
- var error = $root.TW.Polkadot.Proto.CustomCallIndices.verify(message.custom);
96054
- if (error)
96055
- return "custom." + error;
96056
- }
96057
- }
96242
+ if (message.sender != null && message.hasOwnProperty("sender"))
96243
+ if (!$util.isString(message.sender))
96244
+ return "sender: string expected";
96245
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
96246
+ if (!$util.isString(message.receiver))
96247
+ return "receiver: string expected";
96248
+ if (message.stake != null && message.hasOwnProperty("stake"))
96249
+ if (!$util.isInteger(message.stake) && !(message.stake && $util.isInteger(message.stake.low) && $util.isInteger(message.stake.high)))
96250
+ return "stake: integer|Long expected";
96251
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
96252
+ if (!$util.isString(message.publicKey))
96253
+ return "publicKey: string expected";
96058
96254
  return null;
96059
96255
  };
96060
96256
 
96061
96257
  /**
96062
- * Creates a CallIndices message from a plain object. Also converts values to their respective internal types.
96258
+ * Creates a BondPayload message from a plain object. Also converts values to their respective internal types.
96063
96259
  * @function fromObject
96064
- * @memberof TW.Polkadot.Proto.CallIndices
96260
+ * @memberof TW.Pactus.Proto.BondPayload
96065
96261
  * @static
96066
96262
  * @param {Object.<string,*>} object Plain object
96067
- * @returns {TW.Polkadot.Proto.CallIndices} CallIndices
96263
+ * @returns {TW.Pactus.Proto.BondPayload} BondPayload
96068
96264
  */
96069
- CallIndices.fromObject = function fromObject(object) {
96070
- if (object instanceof $root.TW.Polkadot.Proto.CallIndices)
96265
+ BondPayload.fromObject = function fromObject(object) {
96266
+ if (object instanceof $root.TW.Pactus.Proto.BondPayload)
96071
96267
  return object;
96072
- var message = new $root.TW.Polkadot.Proto.CallIndices();
96073
- if (object.custom != null) {
96074
- if (typeof object.custom !== "object")
96075
- throw TypeError(".TW.Polkadot.Proto.CallIndices.custom: object expected");
96076
- message.custom = $root.TW.Polkadot.Proto.CustomCallIndices.fromObject(object.custom);
96077
- }
96078
- return message;
96268
+ var message = new $root.TW.Pactus.Proto.BondPayload();
96269
+ if (object.sender != null)
96270
+ message.sender = String(object.sender);
96271
+ if (object.receiver != null)
96272
+ message.receiver = String(object.receiver);
96273
+ if (object.stake != null)
96274
+ if ($util.Long)
96275
+ (message.stake = $util.Long.fromValue(object.stake)).unsigned = false;
96276
+ else if (typeof object.stake === "string")
96277
+ message.stake = parseInt(object.stake, 10);
96278
+ else if (typeof object.stake === "number")
96279
+ message.stake = object.stake;
96280
+ else if (typeof object.stake === "object")
96281
+ message.stake = new $util.LongBits(object.stake.low >>> 0, object.stake.high >>> 0).toNumber();
96282
+ if (object.publicKey != null)
96283
+ message.publicKey = String(object.publicKey);
96284
+ return message;
96285
+ };
96286
+
96287
+ /**
96288
+ * Creates a plain object from a BondPayload message. Also converts values to other types if specified.
96289
+ * @function toObject
96290
+ * @memberof TW.Pactus.Proto.BondPayload
96291
+ * @static
96292
+ * @param {TW.Pactus.Proto.BondPayload} message BondPayload
96293
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
96294
+ * @returns {Object.<string,*>} Plain object
96295
+ */
96296
+ BondPayload.toObject = function toObject(message, options) {
96297
+ if (!options)
96298
+ options = {};
96299
+ var object = {};
96300
+ if (options.defaults) {
96301
+ object.sender = "";
96302
+ object.receiver = "";
96303
+ if ($util.Long) {
96304
+ var long = new $util.Long(0, 0, false);
96305
+ object.stake = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
96306
+ } else
96307
+ object.stake = options.longs === String ? "0" : 0;
96308
+ object.publicKey = "";
96309
+ }
96310
+ if (message.sender != null && message.hasOwnProperty("sender"))
96311
+ object.sender = message.sender;
96312
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
96313
+ object.receiver = message.receiver;
96314
+ if (message.stake != null && message.hasOwnProperty("stake"))
96315
+ if (typeof message.stake === "number")
96316
+ object.stake = options.longs === String ? String(message.stake) : message.stake;
96317
+ else
96318
+ object.stake = options.longs === String ? $util.Long.prototype.toString.call(message.stake) : options.longs === Number ? new $util.LongBits(message.stake.low >>> 0, message.stake.high >>> 0).toNumber() : message.stake;
96319
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
96320
+ object.publicKey = message.publicKey;
96321
+ return object;
96322
+ };
96323
+
96324
+ /**
96325
+ * Converts this BondPayload to JSON.
96326
+ * @function toJSON
96327
+ * @memberof TW.Pactus.Proto.BondPayload
96328
+ * @instance
96329
+ * @returns {Object.<string,*>} JSON object
96330
+ */
96331
+ BondPayload.prototype.toJSON = function toJSON() {
96332
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
96333
+ };
96334
+
96335
+ return BondPayload;
96336
+ })();
96337
+
96338
+ Proto.SigningInput = (function() {
96339
+
96340
+ /**
96341
+ * Properties of a SigningInput.
96342
+ * @memberof TW.Pactus.Proto
96343
+ * @interface ISigningInput
96344
+ * @property {Uint8Array|null} [privateKey] SigningInput privateKey
96345
+ * @property {TW.Pactus.Proto.ITransactionMessage|null} [transaction] SigningInput transaction
96346
+ */
96347
+
96348
+ /**
96349
+ * Constructs a new SigningInput.
96350
+ * @memberof TW.Pactus.Proto
96351
+ * @classdesc Represents a SigningInput.
96352
+ * @implements ISigningInput
96353
+ * @constructor
96354
+ * @param {TW.Pactus.Proto.ISigningInput=} [properties] Properties to set
96355
+ */
96356
+ function SigningInput(properties) {
96357
+ if (properties)
96358
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
96359
+ if (properties[keys[i]] != null)
96360
+ this[keys[i]] = properties[keys[i]];
96361
+ }
96362
+
96363
+ /**
96364
+ * SigningInput privateKey.
96365
+ * @member {Uint8Array} privateKey
96366
+ * @memberof TW.Pactus.Proto.SigningInput
96367
+ * @instance
96368
+ */
96369
+ SigningInput.prototype.privateKey = $util.newBuffer([]);
96370
+
96371
+ /**
96372
+ * SigningInput transaction.
96373
+ * @member {TW.Pactus.Proto.ITransactionMessage|null|undefined} transaction
96374
+ * @memberof TW.Pactus.Proto.SigningInput
96375
+ * @instance
96376
+ */
96377
+ SigningInput.prototype.transaction = null;
96378
+
96379
+ /**
96380
+ * Creates a new SigningInput instance using the specified properties.
96381
+ * @function create
96382
+ * @memberof TW.Pactus.Proto.SigningInput
96383
+ * @static
96384
+ * @param {TW.Pactus.Proto.ISigningInput=} [properties] Properties to set
96385
+ * @returns {TW.Pactus.Proto.SigningInput} SigningInput instance
96386
+ */
96387
+ SigningInput.create = function create(properties) {
96388
+ return new SigningInput(properties);
96389
+ };
96390
+
96391
+ /**
96392
+ * Encodes the specified SigningInput message. Does not implicitly {@link TW.Pactus.Proto.SigningInput.verify|verify} messages.
96393
+ * @function encode
96394
+ * @memberof TW.Pactus.Proto.SigningInput
96395
+ * @static
96396
+ * @param {TW.Pactus.Proto.ISigningInput} message SigningInput message or plain object to encode
96397
+ * @param {$protobuf.Writer} [writer] Writer to encode to
96398
+ * @returns {$protobuf.Writer} Writer
96399
+ */
96400
+ SigningInput.encode = function encode(message, writer) {
96401
+ if (!writer)
96402
+ writer = $Writer.create();
96403
+ if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
96404
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
96405
+ if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
96406
+ $root.TW.Pactus.Proto.TransactionMessage.encode(message.transaction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
96407
+ return writer;
96408
+ };
96409
+
96410
+ /**
96411
+ * Decodes a SigningInput message from the specified reader or buffer.
96412
+ * @function decode
96413
+ * @memberof TW.Pactus.Proto.SigningInput
96414
+ * @static
96415
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
96416
+ * @param {number} [length] Message length if known beforehand
96417
+ * @returns {TW.Pactus.Proto.SigningInput} SigningInput
96418
+ * @throws {Error} If the payload is not a reader or valid buffer
96419
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
96420
+ */
96421
+ SigningInput.decode = function decode(reader, length) {
96422
+ if (!(reader instanceof $Reader))
96423
+ reader = $Reader.create(reader);
96424
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Pactus.Proto.SigningInput();
96425
+ while (reader.pos < end) {
96426
+ var tag = reader.uint32();
96427
+ switch (tag >>> 3) {
96428
+ case 1:
96429
+ message.privateKey = reader.bytes();
96430
+ break;
96431
+ case 2:
96432
+ message.transaction = $root.TW.Pactus.Proto.TransactionMessage.decode(reader, reader.uint32());
96433
+ break;
96434
+ default:
96435
+ reader.skipType(tag & 7);
96436
+ break;
96437
+ }
96438
+ }
96439
+ return message;
96440
+ };
96441
+
96442
+ /**
96443
+ * Verifies a SigningInput message.
96444
+ * @function verify
96445
+ * @memberof TW.Pactus.Proto.SigningInput
96446
+ * @static
96447
+ * @param {Object.<string,*>} message Plain object to verify
96448
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
96449
+ */
96450
+ SigningInput.verify = function verify(message) {
96451
+ if (typeof message !== "object" || message === null)
96452
+ return "object expected";
96453
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
96454
+ if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
96455
+ return "privateKey: buffer expected";
96456
+ if (message.transaction != null && message.hasOwnProperty("transaction")) {
96457
+ var error = $root.TW.Pactus.Proto.TransactionMessage.verify(message.transaction);
96458
+ if (error)
96459
+ return "transaction." + error;
96460
+ }
96461
+ return null;
96462
+ };
96463
+
96464
+ /**
96465
+ * Creates a SigningInput message from a plain object. Also converts values to their respective internal types.
96466
+ * @function fromObject
96467
+ * @memberof TW.Pactus.Proto.SigningInput
96468
+ * @static
96469
+ * @param {Object.<string,*>} object Plain object
96470
+ * @returns {TW.Pactus.Proto.SigningInput} SigningInput
96471
+ */
96472
+ SigningInput.fromObject = function fromObject(object) {
96473
+ if (object instanceof $root.TW.Pactus.Proto.SigningInput)
96474
+ return object;
96475
+ var message = new $root.TW.Pactus.Proto.SigningInput();
96476
+ if (object.privateKey != null)
96477
+ if (typeof object.privateKey === "string")
96478
+ $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
96479
+ else if (object.privateKey.length)
96480
+ message.privateKey = object.privateKey;
96481
+ if (object.transaction != null) {
96482
+ if (typeof object.transaction !== "object")
96483
+ throw TypeError(".TW.Pactus.Proto.SigningInput.transaction: object expected");
96484
+ message.transaction = $root.TW.Pactus.Proto.TransactionMessage.fromObject(object.transaction);
96485
+ }
96486
+ return message;
96487
+ };
96488
+
96489
+ /**
96490
+ * Creates a plain object from a SigningInput message. Also converts values to other types if specified.
96491
+ * @function toObject
96492
+ * @memberof TW.Pactus.Proto.SigningInput
96493
+ * @static
96494
+ * @param {TW.Pactus.Proto.SigningInput} message SigningInput
96495
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
96496
+ * @returns {Object.<string,*>} Plain object
96497
+ */
96498
+ SigningInput.toObject = function toObject(message, options) {
96499
+ if (!options)
96500
+ options = {};
96501
+ var object = {};
96502
+ if (options.defaults) {
96503
+ if (options.bytes === String)
96504
+ object.privateKey = "";
96505
+ else {
96506
+ object.privateKey = [];
96507
+ if (options.bytes !== Array)
96508
+ object.privateKey = $util.newBuffer(object.privateKey);
96509
+ }
96510
+ object.transaction = null;
96511
+ }
96512
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
96513
+ 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;
96514
+ if (message.transaction != null && message.hasOwnProperty("transaction"))
96515
+ object.transaction = $root.TW.Pactus.Proto.TransactionMessage.toObject(message.transaction, options);
96516
+ return object;
96517
+ };
96518
+
96519
+ /**
96520
+ * Converts this SigningInput to JSON.
96521
+ * @function toJSON
96522
+ * @memberof TW.Pactus.Proto.SigningInput
96523
+ * @instance
96524
+ * @returns {Object.<string,*>} JSON object
96525
+ */
96526
+ SigningInput.prototype.toJSON = function toJSON() {
96527
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
96528
+ };
96529
+
96530
+ return SigningInput;
96531
+ })();
96532
+
96533
+ Proto.SigningOutput = (function() {
96534
+
96535
+ /**
96536
+ * Properties of a SigningOutput.
96537
+ * @memberof TW.Pactus.Proto
96538
+ * @interface ISigningOutput
96539
+ * @property {Uint8Array|null} [transactionId] SigningOutput transactionId
96540
+ * @property {Uint8Array|null} [signedTransactionData] SigningOutput signedTransactionData
96541
+ * @property {Uint8Array|null} [signature] SigningOutput signature
96542
+ * @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
96543
+ * @property {string|null} [errorMessage] SigningOutput errorMessage
96544
+ */
96545
+
96546
+ /**
96547
+ * Constructs a new SigningOutput.
96548
+ * @memberof TW.Pactus.Proto
96549
+ * @classdesc Represents a SigningOutput.
96550
+ * @implements ISigningOutput
96551
+ * @constructor
96552
+ * @param {TW.Pactus.Proto.ISigningOutput=} [properties] Properties to set
96553
+ */
96554
+ function SigningOutput(properties) {
96555
+ if (properties)
96556
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
96557
+ if (properties[keys[i]] != null)
96558
+ this[keys[i]] = properties[keys[i]];
96559
+ }
96560
+
96561
+ /**
96562
+ * SigningOutput transactionId.
96563
+ * @member {Uint8Array} transactionId
96564
+ * @memberof TW.Pactus.Proto.SigningOutput
96565
+ * @instance
96566
+ */
96567
+ SigningOutput.prototype.transactionId = $util.newBuffer([]);
96568
+
96569
+ /**
96570
+ * SigningOutput signedTransactionData.
96571
+ * @member {Uint8Array} signedTransactionData
96572
+ * @memberof TW.Pactus.Proto.SigningOutput
96573
+ * @instance
96574
+ */
96575
+ SigningOutput.prototype.signedTransactionData = $util.newBuffer([]);
96576
+
96577
+ /**
96578
+ * SigningOutput signature.
96579
+ * @member {Uint8Array} signature
96580
+ * @memberof TW.Pactus.Proto.SigningOutput
96581
+ * @instance
96582
+ */
96583
+ SigningOutput.prototype.signature = $util.newBuffer([]);
96584
+
96585
+ /**
96586
+ * SigningOutput error.
96587
+ * @member {TW.Common.Proto.SigningError} error
96588
+ * @memberof TW.Pactus.Proto.SigningOutput
96589
+ * @instance
96590
+ */
96591
+ SigningOutput.prototype.error = 0;
96592
+
96593
+ /**
96594
+ * SigningOutput errorMessage.
96595
+ * @member {string} errorMessage
96596
+ * @memberof TW.Pactus.Proto.SigningOutput
96597
+ * @instance
96598
+ */
96599
+ SigningOutput.prototype.errorMessage = "";
96600
+
96601
+ /**
96602
+ * Creates a new SigningOutput instance using the specified properties.
96603
+ * @function create
96604
+ * @memberof TW.Pactus.Proto.SigningOutput
96605
+ * @static
96606
+ * @param {TW.Pactus.Proto.ISigningOutput=} [properties] Properties to set
96607
+ * @returns {TW.Pactus.Proto.SigningOutput} SigningOutput instance
96608
+ */
96609
+ SigningOutput.create = function create(properties) {
96610
+ return new SigningOutput(properties);
96611
+ };
96612
+
96613
+ /**
96614
+ * Encodes the specified SigningOutput message. Does not implicitly {@link TW.Pactus.Proto.SigningOutput.verify|verify} messages.
96615
+ * @function encode
96616
+ * @memberof TW.Pactus.Proto.SigningOutput
96617
+ * @static
96618
+ * @param {TW.Pactus.Proto.ISigningOutput} message SigningOutput message or plain object to encode
96619
+ * @param {$protobuf.Writer} [writer] Writer to encode to
96620
+ * @returns {$protobuf.Writer} Writer
96621
+ */
96622
+ SigningOutput.encode = function encode(message, writer) {
96623
+ if (!writer)
96624
+ writer = $Writer.create();
96625
+ if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId"))
96626
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.transactionId);
96627
+ if (message.signedTransactionData != null && Object.hasOwnProperty.call(message, "signedTransactionData"))
96628
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signedTransactionData);
96629
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
96630
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature);
96631
+ if (message.error != null && Object.hasOwnProperty.call(message, "error"))
96632
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.error);
96633
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
96634
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorMessage);
96635
+ return writer;
96636
+ };
96637
+
96638
+ /**
96639
+ * Decodes a SigningOutput message from the specified reader or buffer.
96640
+ * @function decode
96641
+ * @memberof TW.Pactus.Proto.SigningOutput
96642
+ * @static
96643
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
96644
+ * @param {number} [length] Message length if known beforehand
96645
+ * @returns {TW.Pactus.Proto.SigningOutput} SigningOutput
96646
+ * @throws {Error} If the payload is not a reader or valid buffer
96647
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
96648
+ */
96649
+ SigningOutput.decode = function decode(reader, length) {
96650
+ if (!(reader instanceof $Reader))
96651
+ reader = $Reader.create(reader);
96652
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Pactus.Proto.SigningOutput();
96653
+ while (reader.pos < end) {
96654
+ var tag = reader.uint32();
96655
+ switch (tag >>> 3) {
96656
+ case 1:
96657
+ message.transactionId = reader.bytes();
96658
+ break;
96659
+ case 2:
96660
+ message.signedTransactionData = reader.bytes();
96661
+ break;
96662
+ case 3:
96663
+ message.signature = reader.bytes();
96664
+ break;
96665
+ case 4:
96666
+ message.error = reader.int32();
96667
+ break;
96668
+ case 5:
96669
+ message.errorMessage = reader.string();
96670
+ break;
96671
+ default:
96672
+ reader.skipType(tag & 7);
96673
+ break;
96674
+ }
96675
+ }
96676
+ return message;
96677
+ };
96678
+
96679
+ /**
96680
+ * Verifies a SigningOutput message.
96681
+ * @function verify
96682
+ * @memberof TW.Pactus.Proto.SigningOutput
96683
+ * @static
96684
+ * @param {Object.<string,*>} message Plain object to verify
96685
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
96686
+ */
96687
+ SigningOutput.verify = function verify(message) {
96688
+ if (typeof message !== "object" || message === null)
96689
+ return "object expected";
96690
+ if (message.transactionId != null && message.hasOwnProperty("transactionId"))
96691
+ if (!(message.transactionId && typeof message.transactionId.length === "number" || $util.isString(message.transactionId)))
96692
+ return "transactionId: buffer expected";
96693
+ if (message.signedTransactionData != null && message.hasOwnProperty("signedTransactionData"))
96694
+ if (!(message.signedTransactionData && typeof message.signedTransactionData.length === "number" || $util.isString(message.signedTransactionData)))
96695
+ return "signedTransactionData: buffer expected";
96696
+ if (message.signature != null && message.hasOwnProperty("signature"))
96697
+ if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
96698
+ return "signature: buffer expected";
96699
+ if (message.error != null && message.hasOwnProperty("error"))
96700
+ switch (message.error) {
96701
+ default:
96702
+ return "error: enum value expected";
96703
+ case 0:
96704
+ case 1:
96705
+ case 2:
96706
+ case 3:
96707
+ case 4:
96708
+ case 5:
96709
+ case 15:
96710
+ case 16:
96711
+ case 17:
96712
+ case 18:
96713
+ case 6:
96714
+ case 7:
96715
+ case 8:
96716
+ case 9:
96717
+ case 10:
96718
+ case 11:
96719
+ case 12:
96720
+ case 13:
96721
+ case 14:
96722
+ case 19:
96723
+ case 20:
96724
+ case 21:
96725
+ case 22:
96726
+ case 23:
96727
+ case 24:
96728
+ case 25:
96729
+ break;
96730
+ }
96731
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
96732
+ if (!$util.isString(message.errorMessage))
96733
+ return "errorMessage: string expected";
96734
+ return null;
96735
+ };
96736
+
96737
+ /**
96738
+ * Creates a SigningOutput message from a plain object. Also converts values to their respective internal types.
96739
+ * @function fromObject
96740
+ * @memberof TW.Pactus.Proto.SigningOutput
96741
+ * @static
96742
+ * @param {Object.<string,*>} object Plain object
96743
+ * @returns {TW.Pactus.Proto.SigningOutput} SigningOutput
96744
+ */
96745
+ SigningOutput.fromObject = function fromObject(object) {
96746
+ if (object instanceof $root.TW.Pactus.Proto.SigningOutput)
96747
+ return object;
96748
+ var message = new $root.TW.Pactus.Proto.SigningOutput();
96749
+ if (object.transactionId != null)
96750
+ if (typeof object.transactionId === "string")
96751
+ $util.base64.decode(object.transactionId, message.transactionId = $util.newBuffer($util.base64.length(object.transactionId)), 0);
96752
+ else if (object.transactionId.length)
96753
+ message.transactionId = object.transactionId;
96754
+ if (object.signedTransactionData != null)
96755
+ if (typeof object.signedTransactionData === "string")
96756
+ $util.base64.decode(object.signedTransactionData, message.signedTransactionData = $util.newBuffer($util.base64.length(object.signedTransactionData)), 0);
96757
+ else if (object.signedTransactionData.length)
96758
+ message.signedTransactionData = object.signedTransactionData;
96759
+ if (object.signature != null)
96760
+ if (typeof object.signature === "string")
96761
+ $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
96762
+ else if (object.signature.length)
96763
+ message.signature = object.signature;
96764
+ switch (object.error) {
96765
+ case "OK":
96766
+ case 0:
96767
+ message.error = 0;
96768
+ break;
96769
+ case "Error_general":
96770
+ case 1:
96771
+ message.error = 1;
96772
+ break;
96773
+ case "Error_internal":
96774
+ case 2:
96775
+ message.error = 2;
96776
+ break;
96777
+ case "Error_low_balance":
96778
+ case 3:
96779
+ message.error = 3;
96780
+ break;
96781
+ case "Error_zero_amount_requested":
96782
+ case 4:
96783
+ message.error = 4;
96784
+ break;
96785
+ case "Error_missing_private_key":
96786
+ case 5:
96787
+ message.error = 5;
96788
+ break;
96789
+ case "Error_invalid_private_key":
96790
+ case 15:
96791
+ message.error = 15;
96792
+ break;
96793
+ case "Error_invalid_address":
96794
+ case 16:
96795
+ message.error = 16;
96796
+ break;
96797
+ case "Error_invalid_utxo":
96798
+ case 17:
96799
+ message.error = 17;
96800
+ break;
96801
+ case "Error_invalid_utxo_amount":
96802
+ case 18:
96803
+ message.error = 18;
96804
+ break;
96805
+ case "Error_wrong_fee":
96806
+ case 6:
96807
+ message.error = 6;
96808
+ break;
96809
+ case "Error_signing":
96810
+ case 7:
96811
+ message.error = 7;
96812
+ break;
96813
+ case "Error_tx_too_big":
96814
+ case 8:
96815
+ message.error = 8;
96816
+ break;
96817
+ case "Error_missing_input_utxos":
96818
+ case 9:
96819
+ message.error = 9;
96820
+ break;
96821
+ case "Error_not_enough_utxos":
96822
+ case 10:
96823
+ message.error = 10;
96824
+ break;
96825
+ case "Error_script_redeem":
96826
+ case 11:
96827
+ message.error = 11;
96828
+ break;
96829
+ case "Error_script_output":
96830
+ case 12:
96831
+ message.error = 12;
96832
+ break;
96833
+ case "Error_script_witness_program":
96834
+ case 13:
96835
+ message.error = 13;
96836
+ break;
96837
+ case "Error_invalid_memo":
96838
+ case 14:
96839
+ message.error = 14;
96840
+ break;
96841
+ case "Error_input_parse":
96842
+ case 19:
96843
+ message.error = 19;
96844
+ break;
96845
+ case "Error_no_support_n2n":
96846
+ case 20:
96847
+ message.error = 20;
96848
+ break;
96849
+ case "Error_signatures_count":
96850
+ case 21:
96851
+ message.error = 21;
96852
+ break;
96853
+ case "Error_invalid_params":
96854
+ case 22:
96855
+ message.error = 22;
96856
+ break;
96857
+ case "Error_invalid_requested_token_amount":
96858
+ case 23:
96859
+ message.error = 23;
96860
+ break;
96861
+ case "Error_not_supported":
96862
+ case 24:
96863
+ message.error = 24;
96864
+ break;
96865
+ case "Error_dust_amount_requested":
96866
+ case 25:
96867
+ message.error = 25;
96868
+ break;
96869
+ }
96870
+ if (object.errorMessage != null)
96871
+ message.errorMessage = String(object.errorMessage);
96872
+ return message;
96873
+ };
96874
+
96875
+ /**
96876
+ * Creates a plain object from a SigningOutput message. Also converts values to other types if specified.
96877
+ * @function toObject
96878
+ * @memberof TW.Pactus.Proto.SigningOutput
96879
+ * @static
96880
+ * @param {TW.Pactus.Proto.SigningOutput} message SigningOutput
96881
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
96882
+ * @returns {Object.<string,*>} Plain object
96883
+ */
96884
+ SigningOutput.toObject = function toObject(message, options) {
96885
+ if (!options)
96886
+ options = {};
96887
+ var object = {};
96888
+ if (options.defaults) {
96889
+ if (options.bytes === String)
96890
+ object.transactionId = "";
96891
+ else {
96892
+ object.transactionId = [];
96893
+ if (options.bytes !== Array)
96894
+ object.transactionId = $util.newBuffer(object.transactionId);
96895
+ }
96896
+ if (options.bytes === String)
96897
+ object.signedTransactionData = "";
96898
+ else {
96899
+ object.signedTransactionData = [];
96900
+ if (options.bytes !== Array)
96901
+ object.signedTransactionData = $util.newBuffer(object.signedTransactionData);
96902
+ }
96903
+ if (options.bytes === String)
96904
+ object.signature = "";
96905
+ else {
96906
+ object.signature = [];
96907
+ if (options.bytes !== Array)
96908
+ object.signature = $util.newBuffer(object.signature);
96909
+ }
96910
+ object.error = options.enums === String ? "OK" : 0;
96911
+ object.errorMessage = "";
96912
+ }
96913
+ if (message.transactionId != null && message.hasOwnProperty("transactionId"))
96914
+ object.transactionId = options.bytes === String ? $util.base64.encode(message.transactionId, 0, message.transactionId.length) : options.bytes === Array ? Array.prototype.slice.call(message.transactionId) : message.transactionId;
96915
+ if (message.signedTransactionData != null && message.hasOwnProperty("signedTransactionData"))
96916
+ object.signedTransactionData = options.bytes === String ? $util.base64.encode(message.signedTransactionData, 0, message.signedTransactionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.signedTransactionData) : message.signedTransactionData;
96917
+ if (message.signature != null && message.hasOwnProperty("signature"))
96918
+ object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature;
96919
+ if (message.error != null && message.hasOwnProperty("error"))
96920
+ object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
96921
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
96922
+ object.errorMessage = message.errorMessage;
96923
+ return object;
96924
+ };
96925
+
96926
+ /**
96927
+ * Converts this SigningOutput to JSON.
96928
+ * @function toJSON
96929
+ * @memberof TW.Pactus.Proto.SigningOutput
96930
+ * @instance
96931
+ * @returns {Object.<string,*>} JSON object
96932
+ */
96933
+ SigningOutput.prototype.toJSON = function toJSON() {
96934
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
96935
+ };
96936
+
96937
+ return SigningOutput;
96938
+ })();
96939
+
96940
+ return Proto;
96941
+ })();
96942
+
96943
+ return Pactus;
96944
+ })();
96945
+
96946
+ TW.Polkadot = (function() {
96947
+
96948
+ /**
96949
+ * Namespace Polkadot.
96950
+ * @memberof TW
96951
+ * @namespace
96952
+ */
96953
+ var Polkadot = {};
96954
+
96955
+ Polkadot.Proto = (function() {
96956
+
96957
+ /**
96958
+ * Namespace Proto.
96959
+ * @memberof TW.Polkadot
96960
+ * @namespace
96961
+ */
96962
+ var Proto = {};
96963
+
96964
+ /**
96965
+ * RewardDestination enum.
96966
+ * @name TW.Polkadot.Proto.RewardDestination
96967
+ * @enum {number}
96968
+ * @property {number} STAKED=0 STAKED value
96969
+ * @property {number} STASH=1 STASH value
96970
+ * @property {number} CONTROLLER=2 CONTROLLER value
96971
+ */
96972
+ Proto.RewardDestination = (function() {
96973
+ var valuesById = {}, values = Object.create(valuesById);
96974
+ values[valuesById[0] = "STAKED"] = 0;
96975
+ values[valuesById[1] = "STASH"] = 1;
96976
+ values[valuesById[2] = "CONTROLLER"] = 2;
96977
+ return values;
96978
+ })();
96979
+
96980
+ Proto.Era = (function() {
96981
+
96982
+ /**
96983
+ * Properties of an Era.
96984
+ * @memberof TW.Polkadot.Proto
96985
+ * @interface IEra
96986
+ * @property {Long|null} [blockNumber] Era blockNumber
96987
+ * @property {Long|null} [period] Era period
96988
+ */
96989
+
96990
+ /**
96991
+ * Constructs a new Era.
96992
+ * @memberof TW.Polkadot.Proto
96993
+ * @classdesc Represents an Era.
96994
+ * @implements IEra
96995
+ * @constructor
96996
+ * @param {TW.Polkadot.Proto.IEra=} [properties] Properties to set
96997
+ */
96998
+ function Era(properties) {
96999
+ if (properties)
97000
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
97001
+ if (properties[keys[i]] != null)
97002
+ this[keys[i]] = properties[keys[i]];
97003
+ }
97004
+
97005
+ /**
97006
+ * Era blockNumber.
97007
+ * @member {Long} blockNumber
97008
+ * @memberof TW.Polkadot.Proto.Era
97009
+ * @instance
97010
+ */
97011
+ Era.prototype.blockNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
97012
+
97013
+ /**
97014
+ * Era period.
97015
+ * @member {Long} period
97016
+ * @memberof TW.Polkadot.Proto.Era
97017
+ * @instance
97018
+ */
97019
+ Era.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
97020
+
97021
+ /**
97022
+ * Creates a new Era instance using the specified properties.
97023
+ * @function create
97024
+ * @memberof TW.Polkadot.Proto.Era
97025
+ * @static
97026
+ * @param {TW.Polkadot.Proto.IEra=} [properties] Properties to set
97027
+ * @returns {TW.Polkadot.Proto.Era} Era instance
97028
+ */
97029
+ Era.create = function create(properties) {
97030
+ return new Era(properties);
97031
+ };
97032
+
97033
+ /**
97034
+ * Encodes the specified Era message. Does not implicitly {@link TW.Polkadot.Proto.Era.verify|verify} messages.
97035
+ * @function encode
97036
+ * @memberof TW.Polkadot.Proto.Era
97037
+ * @static
97038
+ * @param {TW.Polkadot.Proto.IEra} message Era message or plain object to encode
97039
+ * @param {$protobuf.Writer} [writer] Writer to encode to
97040
+ * @returns {$protobuf.Writer} Writer
97041
+ */
97042
+ Era.encode = function encode(message, writer) {
97043
+ if (!writer)
97044
+ writer = $Writer.create();
97045
+ if (message.blockNumber != null && Object.hasOwnProperty.call(message, "blockNumber"))
97046
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.blockNumber);
97047
+ if (message.period != null && Object.hasOwnProperty.call(message, "period"))
97048
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period);
97049
+ return writer;
97050
+ };
97051
+
97052
+ /**
97053
+ * Decodes an Era message from the specified reader or buffer.
97054
+ * @function decode
97055
+ * @memberof TW.Polkadot.Proto.Era
97056
+ * @static
97057
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
97058
+ * @param {number} [length] Message length if known beforehand
97059
+ * @returns {TW.Polkadot.Proto.Era} Era
97060
+ * @throws {Error} If the payload is not a reader or valid buffer
97061
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
97062
+ */
97063
+ Era.decode = function decode(reader, length) {
97064
+ if (!(reader instanceof $Reader))
97065
+ reader = $Reader.create(reader);
97066
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.Era();
97067
+ while (reader.pos < end) {
97068
+ var tag = reader.uint32();
97069
+ switch (tag >>> 3) {
97070
+ case 1:
97071
+ message.blockNumber = reader.uint64();
97072
+ break;
97073
+ case 2:
97074
+ message.period = reader.uint64();
97075
+ break;
97076
+ default:
97077
+ reader.skipType(tag & 7);
97078
+ break;
97079
+ }
97080
+ }
97081
+ return message;
97082
+ };
97083
+
97084
+ /**
97085
+ * Verifies an Era message.
97086
+ * @function verify
97087
+ * @memberof TW.Polkadot.Proto.Era
97088
+ * @static
97089
+ * @param {Object.<string,*>} message Plain object to verify
97090
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
97091
+ */
97092
+ Era.verify = function verify(message) {
97093
+ if (typeof message !== "object" || message === null)
97094
+ return "object expected";
97095
+ if (message.blockNumber != null && message.hasOwnProperty("blockNumber"))
97096
+ if (!$util.isInteger(message.blockNumber) && !(message.blockNumber && $util.isInteger(message.blockNumber.low) && $util.isInteger(message.blockNumber.high)))
97097
+ return "blockNumber: integer|Long expected";
97098
+ if (message.period != null && message.hasOwnProperty("period"))
97099
+ if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high)))
97100
+ return "period: integer|Long expected";
97101
+ return null;
97102
+ };
97103
+
97104
+ /**
97105
+ * Creates an Era message from a plain object. Also converts values to their respective internal types.
97106
+ * @function fromObject
97107
+ * @memberof TW.Polkadot.Proto.Era
97108
+ * @static
97109
+ * @param {Object.<string,*>} object Plain object
97110
+ * @returns {TW.Polkadot.Proto.Era} Era
97111
+ */
97112
+ Era.fromObject = function fromObject(object) {
97113
+ if (object instanceof $root.TW.Polkadot.Proto.Era)
97114
+ return object;
97115
+ var message = new $root.TW.Polkadot.Proto.Era();
97116
+ if (object.blockNumber != null)
97117
+ if ($util.Long)
97118
+ (message.blockNumber = $util.Long.fromValue(object.blockNumber)).unsigned = true;
97119
+ else if (typeof object.blockNumber === "string")
97120
+ message.blockNumber = parseInt(object.blockNumber, 10);
97121
+ else if (typeof object.blockNumber === "number")
97122
+ message.blockNumber = object.blockNumber;
97123
+ else if (typeof object.blockNumber === "object")
97124
+ message.blockNumber = new $util.LongBits(object.blockNumber.low >>> 0, object.blockNumber.high >>> 0).toNumber(true);
97125
+ if (object.period != null)
97126
+ if ($util.Long)
97127
+ (message.period = $util.Long.fromValue(object.period)).unsigned = true;
97128
+ else if (typeof object.period === "string")
97129
+ message.period = parseInt(object.period, 10);
97130
+ else if (typeof object.period === "number")
97131
+ message.period = object.period;
97132
+ else if (typeof object.period === "object")
97133
+ message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true);
97134
+ return message;
97135
+ };
97136
+
97137
+ /**
97138
+ * Creates a plain object from an Era message. Also converts values to other types if specified.
97139
+ * @function toObject
97140
+ * @memberof TW.Polkadot.Proto.Era
97141
+ * @static
97142
+ * @param {TW.Polkadot.Proto.Era} message Era
97143
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
97144
+ * @returns {Object.<string,*>} Plain object
97145
+ */
97146
+ Era.toObject = function toObject(message, options) {
97147
+ if (!options)
97148
+ options = {};
97149
+ var object = {};
97150
+ if (options.defaults) {
97151
+ if ($util.Long) {
97152
+ var long = new $util.Long(0, 0, true);
97153
+ object.blockNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
97154
+ } else
97155
+ object.blockNumber = options.longs === String ? "0" : 0;
97156
+ if ($util.Long) {
97157
+ var long = new $util.Long(0, 0, true);
97158
+ object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
97159
+ } else
97160
+ object.period = options.longs === String ? "0" : 0;
97161
+ }
97162
+ if (message.blockNumber != null && message.hasOwnProperty("blockNumber"))
97163
+ if (typeof message.blockNumber === "number")
97164
+ object.blockNumber = options.longs === String ? String(message.blockNumber) : message.blockNumber;
97165
+ else
97166
+ object.blockNumber = options.longs === String ? $util.Long.prototype.toString.call(message.blockNumber) : options.longs === Number ? new $util.LongBits(message.blockNumber.low >>> 0, message.blockNumber.high >>> 0).toNumber(true) : message.blockNumber;
97167
+ if (message.period != null && message.hasOwnProperty("period"))
97168
+ if (typeof message.period === "number")
97169
+ object.period = options.longs === String ? String(message.period) : message.period;
97170
+ else
97171
+ object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period;
97172
+ return object;
97173
+ };
97174
+
97175
+ /**
97176
+ * Converts this Era to JSON.
97177
+ * @function toJSON
97178
+ * @memberof TW.Polkadot.Proto.Era
97179
+ * @instance
97180
+ * @returns {Object.<string,*>} JSON object
97181
+ */
97182
+ Era.prototype.toJSON = function toJSON() {
97183
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
97184
+ };
97185
+
97186
+ return Era;
97187
+ })();
97188
+
97189
+ Proto.CustomCallIndices = (function() {
97190
+
97191
+ /**
97192
+ * Properties of a CustomCallIndices.
97193
+ * @memberof TW.Polkadot.Proto
97194
+ * @interface ICustomCallIndices
97195
+ * @property {number|null} [moduleIndex] CustomCallIndices moduleIndex
97196
+ * @property {number|null} [methodIndex] CustomCallIndices methodIndex
97197
+ */
97198
+
97199
+ /**
97200
+ * Constructs a new CustomCallIndices.
97201
+ * @memberof TW.Polkadot.Proto
97202
+ * @classdesc Represents a CustomCallIndices.
97203
+ * @implements ICustomCallIndices
97204
+ * @constructor
97205
+ * @param {TW.Polkadot.Proto.ICustomCallIndices=} [properties] Properties to set
97206
+ */
97207
+ function CustomCallIndices(properties) {
97208
+ if (properties)
97209
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
97210
+ if (properties[keys[i]] != null)
97211
+ this[keys[i]] = properties[keys[i]];
97212
+ }
97213
+
97214
+ /**
97215
+ * CustomCallIndices moduleIndex.
97216
+ * @member {number} moduleIndex
97217
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97218
+ * @instance
97219
+ */
97220
+ CustomCallIndices.prototype.moduleIndex = 0;
97221
+
97222
+ /**
97223
+ * CustomCallIndices methodIndex.
97224
+ * @member {number} methodIndex
97225
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97226
+ * @instance
97227
+ */
97228
+ CustomCallIndices.prototype.methodIndex = 0;
97229
+
97230
+ /**
97231
+ * Creates a new CustomCallIndices instance using the specified properties.
97232
+ * @function create
97233
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97234
+ * @static
97235
+ * @param {TW.Polkadot.Proto.ICustomCallIndices=} [properties] Properties to set
97236
+ * @returns {TW.Polkadot.Proto.CustomCallIndices} CustomCallIndices instance
97237
+ */
97238
+ CustomCallIndices.create = function create(properties) {
97239
+ return new CustomCallIndices(properties);
97240
+ };
97241
+
97242
+ /**
97243
+ * Encodes the specified CustomCallIndices message. Does not implicitly {@link TW.Polkadot.Proto.CustomCallIndices.verify|verify} messages.
97244
+ * @function encode
97245
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97246
+ * @static
97247
+ * @param {TW.Polkadot.Proto.ICustomCallIndices} message CustomCallIndices message or plain object to encode
97248
+ * @param {$protobuf.Writer} [writer] Writer to encode to
97249
+ * @returns {$protobuf.Writer} Writer
97250
+ */
97251
+ CustomCallIndices.encode = function encode(message, writer) {
97252
+ if (!writer)
97253
+ writer = $Writer.create();
97254
+ if (message.moduleIndex != null && Object.hasOwnProperty.call(message, "moduleIndex"))
97255
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.moduleIndex);
97256
+ if (message.methodIndex != null && Object.hasOwnProperty.call(message, "methodIndex"))
97257
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.methodIndex);
97258
+ return writer;
97259
+ };
97260
+
97261
+ /**
97262
+ * Decodes a CustomCallIndices message from the specified reader or buffer.
97263
+ * @function decode
97264
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97265
+ * @static
97266
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
97267
+ * @param {number} [length] Message length if known beforehand
97268
+ * @returns {TW.Polkadot.Proto.CustomCallIndices} CustomCallIndices
97269
+ * @throws {Error} If the payload is not a reader or valid buffer
97270
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
97271
+ */
97272
+ CustomCallIndices.decode = function decode(reader, length) {
97273
+ if (!(reader instanceof $Reader))
97274
+ reader = $Reader.create(reader);
97275
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.CustomCallIndices();
97276
+ while (reader.pos < end) {
97277
+ var tag = reader.uint32();
97278
+ switch (tag >>> 3) {
97279
+ case 4:
97280
+ message.moduleIndex = reader.int32();
97281
+ break;
97282
+ case 5:
97283
+ message.methodIndex = reader.int32();
97284
+ break;
97285
+ default:
97286
+ reader.skipType(tag & 7);
97287
+ break;
97288
+ }
97289
+ }
97290
+ return message;
97291
+ };
97292
+
97293
+ /**
97294
+ * Verifies a CustomCallIndices message.
97295
+ * @function verify
97296
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97297
+ * @static
97298
+ * @param {Object.<string,*>} message Plain object to verify
97299
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
97300
+ */
97301
+ CustomCallIndices.verify = function verify(message) {
97302
+ if (typeof message !== "object" || message === null)
97303
+ return "object expected";
97304
+ if (message.moduleIndex != null && message.hasOwnProperty("moduleIndex"))
97305
+ if (!$util.isInteger(message.moduleIndex))
97306
+ return "moduleIndex: integer expected";
97307
+ if (message.methodIndex != null && message.hasOwnProperty("methodIndex"))
97308
+ if (!$util.isInteger(message.methodIndex))
97309
+ return "methodIndex: integer expected";
97310
+ return null;
97311
+ };
97312
+
97313
+ /**
97314
+ * Creates a CustomCallIndices message from a plain object. Also converts values to their respective internal types.
97315
+ * @function fromObject
97316
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97317
+ * @static
97318
+ * @param {Object.<string,*>} object Plain object
97319
+ * @returns {TW.Polkadot.Proto.CustomCallIndices} CustomCallIndices
97320
+ */
97321
+ CustomCallIndices.fromObject = function fromObject(object) {
97322
+ if (object instanceof $root.TW.Polkadot.Proto.CustomCallIndices)
97323
+ return object;
97324
+ var message = new $root.TW.Polkadot.Proto.CustomCallIndices();
97325
+ if (object.moduleIndex != null)
97326
+ message.moduleIndex = object.moduleIndex | 0;
97327
+ if (object.methodIndex != null)
97328
+ message.methodIndex = object.methodIndex | 0;
97329
+ return message;
97330
+ };
97331
+
97332
+ /**
97333
+ * Creates a plain object from a CustomCallIndices message. Also converts values to other types if specified.
97334
+ * @function toObject
97335
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97336
+ * @static
97337
+ * @param {TW.Polkadot.Proto.CustomCallIndices} message CustomCallIndices
97338
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
97339
+ * @returns {Object.<string,*>} Plain object
97340
+ */
97341
+ CustomCallIndices.toObject = function toObject(message, options) {
97342
+ if (!options)
97343
+ options = {};
97344
+ var object = {};
97345
+ if (options.defaults) {
97346
+ object.moduleIndex = 0;
97347
+ object.methodIndex = 0;
97348
+ }
97349
+ if (message.moduleIndex != null && message.hasOwnProperty("moduleIndex"))
97350
+ object.moduleIndex = message.moduleIndex;
97351
+ if (message.methodIndex != null && message.hasOwnProperty("methodIndex"))
97352
+ object.methodIndex = message.methodIndex;
97353
+ return object;
97354
+ };
97355
+
97356
+ /**
97357
+ * Converts this CustomCallIndices to JSON.
97358
+ * @function toJSON
97359
+ * @memberof TW.Polkadot.Proto.CustomCallIndices
97360
+ * @instance
97361
+ * @returns {Object.<string,*>} JSON object
97362
+ */
97363
+ CustomCallIndices.prototype.toJSON = function toJSON() {
97364
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
97365
+ };
97366
+
97367
+ return CustomCallIndices;
97368
+ })();
97369
+
97370
+ Proto.CallIndices = (function() {
97371
+
97372
+ /**
97373
+ * Properties of a CallIndices.
97374
+ * @memberof TW.Polkadot.Proto
97375
+ * @interface ICallIndices
97376
+ * @property {TW.Polkadot.Proto.ICustomCallIndices|null} [custom] CallIndices custom
97377
+ */
97378
+
97379
+ /**
97380
+ * Constructs a new CallIndices.
97381
+ * @memberof TW.Polkadot.Proto
97382
+ * @classdesc Represents a CallIndices.
97383
+ * @implements ICallIndices
97384
+ * @constructor
97385
+ * @param {TW.Polkadot.Proto.ICallIndices=} [properties] Properties to set
97386
+ */
97387
+ function CallIndices(properties) {
97388
+ if (properties)
97389
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
97390
+ if (properties[keys[i]] != null)
97391
+ this[keys[i]] = properties[keys[i]];
97392
+ }
97393
+
97394
+ /**
97395
+ * CallIndices custom.
97396
+ * @member {TW.Polkadot.Proto.ICustomCallIndices|null|undefined} custom
97397
+ * @memberof TW.Polkadot.Proto.CallIndices
97398
+ * @instance
97399
+ */
97400
+ CallIndices.prototype.custom = null;
97401
+
97402
+ // OneOf field names bound to virtual getters and setters
97403
+ var $oneOfFields;
97404
+
97405
+ /**
97406
+ * CallIndices variant.
97407
+ * @member {"custom"|undefined} variant
97408
+ * @memberof TW.Polkadot.Proto.CallIndices
97409
+ * @instance
97410
+ */
97411
+ Object.defineProperty(CallIndices.prototype, "variant", {
97412
+ get: $util.oneOfGetter($oneOfFields = ["custom"]),
97413
+ set: $util.oneOfSetter($oneOfFields)
97414
+ });
97415
+
97416
+ /**
97417
+ * Creates a new CallIndices instance using the specified properties.
97418
+ * @function create
97419
+ * @memberof TW.Polkadot.Proto.CallIndices
97420
+ * @static
97421
+ * @param {TW.Polkadot.Proto.ICallIndices=} [properties] Properties to set
97422
+ * @returns {TW.Polkadot.Proto.CallIndices} CallIndices instance
97423
+ */
97424
+ CallIndices.create = function create(properties) {
97425
+ return new CallIndices(properties);
97426
+ };
97427
+
97428
+ /**
97429
+ * Encodes the specified CallIndices message. Does not implicitly {@link TW.Polkadot.Proto.CallIndices.verify|verify} messages.
97430
+ * @function encode
97431
+ * @memberof TW.Polkadot.Proto.CallIndices
97432
+ * @static
97433
+ * @param {TW.Polkadot.Proto.ICallIndices} message CallIndices message or plain object to encode
97434
+ * @param {$protobuf.Writer} [writer] Writer to encode to
97435
+ * @returns {$protobuf.Writer} Writer
97436
+ */
97437
+ CallIndices.encode = function encode(message, writer) {
97438
+ if (!writer)
97439
+ writer = $Writer.create();
97440
+ if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
97441
+ $root.TW.Polkadot.Proto.CustomCallIndices.encode(message.custom, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
97442
+ return writer;
97443
+ };
97444
+
97445
+ /**
97446
+ * Decodes a CallIndices message from the specified reader or buffer.
97447
+ * @function decode
97448
+ * @memberof TW.Polkadot.Proto.CallIndices
97449
+ * @static
97450
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
97451
+ * @param {number} [length] Message length if known beforehand
97452
+ * @returns {TW.Polkadot.Proto.CallIndices} CallIndices
97453
+ * @throws {Error} If the payload is not a reader or valid buffer
97454
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
97455
+ */
97456
+ CallIndices.decode = function decode(reader, length) {
97457
+ if (!(reader instanceof $Reader))
97458
+ reader = $Reader.create(reader);
97459
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Polkadot.Proto.CallIndices();
97460
+ while (reader.pos < end) {
97461
+ var tag = reader.uint32();
97462
+ switch (tag >>> 3) {
97463
+ case 1:
97464
+ message.custom = $root.TW.Polkadot.Proto.CustomCallIndices.decode(reader, reader.uint32());
97465
+ break;
97466
+ default:
97467
+ reader.skipType(tag & 7);
97468
+ break;
97469
+ }
97470
+ }
97471
+ return message;
97472
+ };
97473
+
97474
+ /**
97475
+ * Verifies a CallIndices message.
97476
+ * @function verify
97477
+ * @memberof TW.Polkadot.Proto.CallIndices
97478
+ * @static
97479
+ * @param {Object.<string,*>} message Plain object to verify
97480
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
97481
+ */
97482
+ CallIndices.verify = function verify(message) {
97483
+ if (typeof message !== "object" || message === null)
97484
+ return "object expected";
97485
+ var properties = {};
97486
+ if (message.custom != null && message.hasOwnProperty("custom")) {
97487
+ properties.variant = 1;
97488
+ {
97489
+ var error = $root.TW.Polkadot.Proto.CustomCallIndices.verify(message.custom);
97490
+ if (error)
97491
+ return "custom." + error;
97492
+ }
97493
+ }
97494
+ return null;
97495
+ };
97496
+
97497
+ /**
97498
+ * Creates a CallIndices message from a plain object. Also converts values to their respective internal types.
97499
+ * @function fromObject
97500
+ * @memberof TW.Polkadot.Proto.CallIndices
97501
+ * @static
97502
+ * @param {Object.<string,*>} object Plain object
97503
+ * @returns {TW.Polkadot.Proto.CallIndices} CallIndices
97504
+ */
97505
+ CallIndices.fromObject = function fromObject(object) {
97506
+ if (object instanceof $root.TW.Polkadot.Proto.CallIndices)
97507
+ return object;
97508
+ var message = new $root.TW.Polkadot.Proto.CallIndices();
97509
+ if (object.custom != null) {
97510
+ if (typeof object.custom !== "object")
97511
+ throw TypeError(".TW.Polkadot.Proto.CallIndices.custom: object expected");
97512
+ message.custom = $root.TW.Polkadot.Proto.CustomCallIndices.fromObject(object.custom);
97513
+ }
97514
+ return message;
96079
97515
  };
96080
97516
 
96081
97517
  /**
@@ -98053,6 +99489,8 @@
98053
99489
  * @property {TW.Polkadot.Proto.RewardDestination|null} [rewardDestination] BondAndNominate rewardDestination
98054
99490
  * @property {Array.<string>|null} [nominators] BondAndNominate nominators
98055
99491
  * @property {TW.Polkadot.Proto.ICallIndices|null} [callIndices] BondAndNominate callIndices
99492
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [bondCallIndices] BondAndNominate bondCallIndices
99493
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [nominateCallIndices] BondAndNominate nominateCallIndices
98056
99494
  */
98057
99495
 
98058
99496
  /**
@@ -98111,6 +99549,22 @@
98111
99549
  */
98112
99550
  BondAndNominate.prototype.callIndices = null;
98113
99551
 
99552
+ /**
99553
+ * BondAndNominate bondCallIndices.
99554
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} bondCallIndices
99555
+ * @memberof TW.Polkadot.Proto.Staking.BondAndNominate
99556
+ * @instance
99557
+ */
99558
+ BondAndNominate.prototype.bondCallIndices = null;
99559
+
99560
+ /**
99561
+ * BondAndNominate nominateCallIndices.
99562
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} nominateCallIndices
99563
+ * @memberof TW.Polkadot.Proto.Staking.BondAndNominate
99564
+ * @instance
99565
+ */
99566
+ BondAndNominate.prototype.nominateCallIndices = null;
99567
+
98114
99568
  /**
98115
99569
  * Creates a new BondAndNominate instance using the specified properties.
98116
99570
  * @function create
@@ -98146,6 +99600,10 @@
98146
99600
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.nominators[i]);
98147
99601
  if (message.callIndices != null && Object.hasOwnProperty.call(message, "callIndices"))
98148
99602
  $root.TW.Polkadot.Proto.CallIndices.encode(message.callIndices, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
99603
+ if (message.bondCallIndices != null && Object.hasOwnProperty.call(message, "bondCallIndices"))
99604
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.bondCallIndices, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
99605
+ if (message.nominateCallIndices != null && Object.hasOwnProperty.call(message, "nominateCallIndices"))
99606
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.nominateCallIndices, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
98149
99607
  return writer;
98150
99608
  };
98151
99609
 
@@ -98184,6 +99642,12 @@
98184
99642
  case 5:
98185
99643
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
98186
99644
  break;
99645
+ case 6:
99646
+ message.bondCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
99647
+ break;
99648
+ case 7:
99649
+ message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
99650
+ break;
98187
99651
  default:
98188
99652
  reader.skipType(tag & 7);
98189
99653
  break;
@@ -98230,6 +99694,16 @@
98230
99694
  if (error)
98231
99695
  return "callIndices." + error;
98232
99696
  }
99697
+ if (message.bondCallIndices != null && message.hasOwnProperty("bondCallIndices")) {
99698
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.bondCallIndices);
99699
+ if (error)
99700
+ return "bondCallIndices." + error;
99701
+ }
99702
+ if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices")) {
99703
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.nominateCallIndices);
99704
+ if (error)
99705
+ return "nominateCallIndices." + error;
99706
+ }
98233
99707
  return null;
98234
99708
  };
98235
99709
 
@@ -98278,6 +99752,16 @@
98278
99752
  throw TypeError(".TW.Polkadot.Proto.Staking.BondAndNominate.callIndices: object expected");
98279
99753
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.callIndices);
98280
99754
  }
99755
+ if (object.bondCallIndices != null) {
99756
+ if (typeof object.bondCallIndices !== "object")
99757
+ throw TypeError(".TW.Polkadot.Proto.Staking.BondAndNominate.bondCallIndices: object expected");
99758
+ message.bondCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.bondCallIndices);
99759
+ }
99760
+ if (object.nominateCallIndices != null) {
99761
+ if (typeof object.nominateCallIndices !== "object")
99762
+ throw TypeError(".TW.Polkadot.Proto.Staking.BondAndNominate.nominateCallIndices: object expected");
99763
+ message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.nominateCallIndices);
99764
+ }
98281
99765
  return message;
98282
99766
  };
98283
99767
 
@@ -98307,6 +99791,8 @@
98307
99791
  }
98308
99792
  object.rewardDestination = options.enums === String ? "STAKED" : 0;
98309
99793
  object.callIndices = null;
99794
+ object.bondCallIndices = null;
99795
+ object.nominateCallIndices = null;
98310
99796
  }
98311
99797
  if (message.controller != null && message.hasOwnProperty("controller"))
98312
99798
  object.controller = message.controller;
@@ -98321,6 +99807,10 @@
98321
99807
  }
98322
99808
  if (message.callIndices != null && message.hasOwnProperty("callIndices"))
98323
99809
  object.callIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.callIndices, options);
99810
+ if (message.bondCallIndices != null && message.hasOwnProperty("bondCallIndices"))
99811
+ object.bondCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.bondCallIndices, options);
99812
+ if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices"))
99813
+ object.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.nominateCallIndices, options);
98324
99814
  return object;
98325
99815
  };
98326
99816
 
@@ -99319,6 +100809,8 @@
99319
100809
  * @interface IChillAndUnbond
99320
100810
  * @property {Uint8Array|null} [value] ChillAndUnbond value
99321
100811
  * @property {TW.Polkadot.Proto.ICallIndices|null} [callIndices] ChillAndUnbond callIndices
100812
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [chillCallIndices] ChillAndUnbond chillCallIndices
100813
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [unbondCallIndices] ChillAndUnbond unbondCallIndices
99322
100814
  */
99323
100815
 
99324
100816
  /**
@@ -99352,6 +100844,22 @@
99352
100844
  */
99353
100845
  ChillAndUnbond.prototype.callIndices = null;
99354
100846
 
100847
+ /**
100848
+ * ChillAndUnbond chillCallIndices.
100849
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} chillCallIndices
100850
+ * @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
100851
+ * @instance
100852
+ */
100853
+ ChillAndUnbond.prototype.chillCallIndices = null;
100854
+
100855
+ /**
100856
+ * ChillAndUnbond unbondCallIndices.
100857
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} unbondCallIndices
100858
+ * @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
100859
+ * @instance
100860
+ */
100861
+ ChillAndUnbond.prototype.unbondCallIndices = null;
100862
+
99355
100863
  /**
99356
100864
  * Creates a new ChillAndUnbond instance using the specified properties.
99357
100865
  * @function create
@@ -99380,6 +100888,10 @@
99380
100888
  writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
99381
100889
  if (message.callIndices != null && Object.hasOwnProperty.call(message, "callIndices"))
99382
100890
  $root.TW.Polkadot.Proto.CallIndices.encode(message.callIndices, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
100891
+ if (message.chillCallIndices != null && Object.hasOwnProperty.call(message, "chillCallIndices"))
100892
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.chillCallIndices, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
100893
+ if (message.unbondCallIndices != null && Object.hasOwnProperty.call(message, "unbondCallIndices"))
100894
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.unbondCallIndices, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
99383
100895
  return writer;
99384
100896
  };
99385
100897
 
@@ -99407,6 +100919,12 @@
99407
100919
  case 2:
99408
100920
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
99409
100921
  break;
100922
+ case 3:
100923
+ message.chillCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
100924
+ break;
100925
+ case 4:
100926
+ message.unbondCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
100927
+ break;
99410
100928
  default:
99411
100929
  reader.skipType(tag & 7);
99412
100930
  break;
@@ -99434,6 +100952,16 @@
99434
100952
  if (error)
99435
100953
  return "callIndices." + error;
99436
100954
  }
100955
+ if (message.chillCallIndices != null && message.hasOwnProperty("chillCallIndices")) {
100956
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.chillCallIndices);
100957
+ if (error)
100958
+ return "chillCallIndices." + error;
100959
+ }
100960
+ if (message.unbondCallIndices != null && message.hasOwnProperty("unbondCallIndices")) {
100961
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.unbondCallIndices);
100962
+ if (error)
100963
+ return "unbondCallIndices." + error;
100964
+ }
99437
100965
  return null;
99438
100966
  };
99439
100967
 
@@ -99459,6 +100987,16 @@
99459
100987
  throw TypeError(".TW.Polkadot.Proto.Staking.ChillAndUnbond.callIndices: object expected");
99460
100988
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.callIndices);
99461
100989
  }
100990
+ if (object.chillCallIndices != null) {
100991
+ if (typeof object.chillCallIndices !== "object")
100992
+ throw TypeError(".TW.Polkadot.Proto.Staking.ChillAndUnbond.chillCallIndices: object expected");
100993
+ message.chillCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.chillCallIndices);
100994
+ }
100995
+ if (object.unbondCallIndices != null) {
100996
+ if (typeof object.unbondCallIndices !== "object")
100997
+ throw TypeError(".TW.Polkadot.Proto.Staking.ChillAndUnbond.unbondCallIndices: object expected");
100998
+ message.unbondCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.unbondCallIndices);
100999
+ }
99462
101000
  return message;
99463
101001
  };
99464
101002
 
@@ -99484,11 +101022,17 @@
99484
101022
  object.value = $util.newBuffer(object.value);
99485
101023
  }
99486
101024
  object.callIndices = null;
101025
+ object.chillCallIndices = null;
101026
+ object.unbondCallIndices = null;
99487
101027
  }
99488
101028
  if (message.value != null && message.hasOwnProperty("value"))
99489
101029
  object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
99490
101030
  if (message.callIndices != null && message.hasOwnProperty("callIndices"))
99491
101031
  object.callIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.callIndices, options);
101032
+ if (message.chillCallIndices != null && message.hasOwnProperty("chillCallIndices"))
101033
+ object.chillCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.chillCallIndices, options);
101034
+ if (message.unbondCallIndices != null && message.hasOwnProperty("unbondCallIndices"))
101035
+ object.unbondCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.unbondCallIndices, options);
99492
101036
  return object;
99493
101037
  };
99494
101038
 
@@ -111111,29 +112655,430 @@
111111
112655
  return SigningInput;
111112
112656
  })();
111113
112657
 
111114
- Proto.SigningOutput = (function() {
112658
+ Proto.SigningOutput = (function() {
112659
+
112660
+ /**
112661
+ * Properties of a SigningOutput.
112662
+ * @memberof TW.Solana.Proto
112663
+ * @interface ISigningOutput
112664
+ * @property {string|null} [encoded] SigningOutput encoded
112665
+ * @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
112666
+ * @property {string|null} [errorMessage] SigningOutput errorMessage
112667
+ * @property {string|null} [unsignedTx] SigningOutput unsignedTx
112668
+ * @property {Array.<TW.Solana.Proto.IPubkeySignature>|null} [signatures] SigningOutput signatures
112669
+ */
112670
+
112671
+ /**
112672
+ * Constructs a new SigningOutput.
112673
+ * @memberof TW.Solana.Proto
112674
+ * @classdesc Represents a SigningOutput.
112675
+ * @implements ISigningOutput
112676
+ * @constructor
112677
+ * @param {TW.Solana.Proto.ISigningOutput=} [properties] Properties to set
112678
+ */
112679
+ function SigningOutput(properties) {
112680
+ this.signatures = [];
112681
+ if (properties)
112682
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
112683
+ if (properties[keys[i]] != null)
112684
+ this[keys[i]] = properties[keys[i]];
112685
+ }
112686
+
112687
+ /**
112688
+ * SigningOutput encoded.
112689
+ * @member {string} encoded
112690
+ * @memberof TW.Solana.Proto.SigningOutput
112691
+ * @instance
112692
+ */
112693
+ SigningOutput.prototype.encoded = "";
112694
+
112695
+ /**
112696
+ * SigningOutput error.
112697
+ * @member {TW.Common.Proto.SigningError} error
112698
+ * @memberof TW.Solana.Proto.SigningOutput
112699
+ * @instance
112700
+ */
112701
+ SigningOutput.prototype.error = 0;
112702
+
112703
+ /**
112704
+ * SigningOutput errorMessage.
112705
+ * @member {string} errorMessage
112706
+ * @memberof TW.Solana.Proto.SigningOutput
112707
+ * @instance
112708
+ */
112709
+ SigningOutput.prototype.errorMessage = "";
112710
+
112711
+ /**
112712
+ * SigningOutput unsignedTx.
112713
+ * @member {string} unsignedTx
112714
+ * @memberof TW.Solana.Proto.SigningOutput
112715
+ * @instance
112716
+ */
112717
+ SigningOutput.prototype.unsignedTx = "";
112718
+
112719
+ /**
112720
+ * SigningOutput signatures.
112721
+ * @member {Array.<TW.Solana.Proto.IPubkeySignature>} signatures
112722
+ * @memberof TW.Solana.Proto.SigningOutput
112723
+ * @instance
112724
+ */
112725
+ SigningOutput.prototype.signatures = $util.emptyArray;
112726
+
112727
+ /**
112728
+ * Creates a new SigningOutput instance using the specified properties.
112729
+ * @function create
112730
+ * @memberof TW.Solana.Proto.SigningOutput
112731
+ * @static
112732
+ * @param {TW.Solana.Proto.ISigningOutput=} [properties] Properties to set
112733
+ * @returns {TW.Solana.Proto.SigningOutput} SigningOutput instance
112734
+ */
112735
+ SigningOutput.create = function create(properties) {
112736
+ return new SigningOutput(properties);
112737
+ };
112738
+
112739
+ /**
112740
+ * Encodes the specified SigningOutput message. Does not implicitly {@link TW.Solana.Proto.SigningOutput.verify|verify} messages.
112741
+ * @function encode
112742
+ * @memberof TW.Solana.Proto.SigningOutput
112743
+ * @static
112744
+ * @param {TW.Solana.Proto.ISigningOutput} message SigningOutput message or plain object to encode
112745
+ * @param {$protobuf.Writer} [writer] Writer to encode to
112746
+ * @returns {$protobuf.Writer} Writer
112747
+ */
112748
+ SigningOutput.encode = function encode(message, writer) {
112749
+ if (!writer)
112750
+ writer = $Writer.create();
112751
+ if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
112752
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoded);
112753
+ if (message.error != null && Object.hasOwnProperty.call(message, "error"))
112754
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
112755
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
112756
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
112757
+ if (message.unsignedTx != null && Object.hasOwnProperty.call(message, "unsignedTx"))
112758
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.unsignedTx);
112759
+ if (message.signatures != null && message.signatures.length)
112760
+ for (var i = 0; i < message.signatures.length; ++i)
112761
+ $root.TW.Solana.Proto.PubkeySignature.encode(message.signatures[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
112762
+ return writer;
112763
+ };
112764
+
112765
+ /**
112766
+ * Decodes a SigningOutput message from the specified reader or buffer.
112767
+ * @function decode
112768
+ * @memberof TW.Solana.Proto.SigningOutput
112769
+ * @static
112770
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
112771
+ * @param {number} [length] Message length if known beforehand
112772
+ * @returns {TW.Solana.Proto.SigningOutput} SigningOutput
112773
+ * @throws {Error} If the payload is not a reader or valid buffer
112774
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
112775
+ */
112776
+ SigningOutput.decode = function decode(reader, length) {
112777
+ if (!(reader instanceof $Reader))
112778
+ reader = $Reader.create(reader);
112779
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.SigningOutput();
112780
+ while (reader.pos < end) {
112781
+ var tag = reader.uint32();
112782
+ switch (tag >>> 3) {
112783
+ case 1:
112784
+ message.encoded = reader.string();
112785
+ break;
112786
+ case 2:
112787
+ message.error = reader.int32();
112788
+ break;
112789
+ case 3:
112790
+ message.errorMessage = reader.string();
112791
+ break;
112792
+ case 4:
112793
+ message.unsignedTx = reader.string();
112794
+ break;
112795
+ case 5:
112796
+ if (!(message.signatures && message.signatures.length))
112797
+ message.signatures = [];
112798
+ message.signatures.push($root.TW.Solana.Proto.PubkeySignature.decode(reader, reader.uint32()));
112799
+ break;
112800
+ default:
112801
+ reader.skipType(tag & 7);
112802
+ break;
112803
+ }
112804
+ }
112805
+ return message;
112806
+ };
112807
+
112808
+ /**
112809
+ * Verifies a SigningOutput message.
112810
+ * @function verify
112811
+ * @memberof TW.Solana.Proto.SigningOutput
112812
+ * @static
112813
+ * @param {Object.<string,*>} message Plain object to verify
112814
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
112815
+ */
112816
+ SigningOutput.verify = function verify(message) {
112817
+ if (typeof message !== "object" || message === null)
112818
+ return "object expected";
112819
+ if (message.encoded != null && message.hasOwnProperty("encoded"))
112820
+ if (!$util.isString(message.encoded))
112821
+ return "encoded: string expected";
112822
+ if (message.error != null && message.hasOwnProperty("error"))
112823
+ switch (message.error) {
112824
+ default:
112825
+ return "error: enum value expected";
112826
+ case 0:
112827
+ case 1:
112828
+ case 2:
112829
+ case 3:
112830
+ case 4:
112831
+ case 5:
112832
+ case 15:
112833
+ case 16:
112834
+ case 17:
112835
+ case 18:
112836
+ case 6:
112837
+ case 7:
112838
+ case 8:
112839
+ case 9:
112840
+ case 10:
112841
+ case 11:
112842
+ case 12:
112843
+ case 13:
112844
+ case 14:
112845
+ case 19:
112846
+ case 20:
112847
+ case 21:
112848
+ case 22:
112849
+ case 23:
112850
+ case 24:
112851
+ case 25:
112852
+ break;
112853
+ }
112854
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
112855
+ if (!$util.isString(message.errorMessage))
112856
+ return "errorMessage: string expected";
112857
+ if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
112858
+ if (!$util.isString(message.unsignedTx))
112859
+ return "unsignedTx: string expected";
112860
+ if (message.signatures != null && message.hasOwnProperty("signatures")) {
112861
+ if (!Array.isArray(message.signatures))
112862
+ return "signatures: array expected";
112863
+ for (var i = 0; i < message.signatures.length; ++i) {
112864
+ var error = $root.TW.Solana.Proto.PubkeySignature.verify(message.signatures[i]);
112865
+ if (error)
112866
+ return "signatures." + error;
112867
+ }
112868
+ }
112869
+ return null;
112870
+ };
112871
+
112872
+ /**
112873
+ * Creates a SigningOutput message from a plain object. Also converts values to their respective internal types.
112874
+ * @function fromObject
112875
+ * @memberof TW.Solana.Proto.SigningOutput
112876
+ * @static
112877
+ * @param {Object.<string,*>} object Plain object
112878
+ * @returns {TW.Solana.Proto.SigningOutput} SigningOutput
112879
+ */
112880
+ SigningOutput.fromObject = function fromObject(object) {
112881
+ if (object instanceof $root.TW.Solana.Proto.SigningOutput)
112882
+ return object;
112883
+ var message = new $root.TW.Solana.Proto.SigningOutput();
112884
+ if (object.encoded != null)
112885
+ message.encoded = String(object.encoded);
112886
+ switch (object.error) {
112887
+ case "OK":
112888
+ case 0:
112889
+ message.error = 0;
112890
+ break;
112891
+ case "Error_general":
112892
+ case 1:
112893
+ message.error = 1;
112894
+ break;
112895
+ case "Error_internal":
112896
+ case 2:
112897
+ message.error = 2;
112898
+ break;
112899
+ case "Error_low_balance":
112900
+ case 3:
112901
+ message.error = 3;
112902
+ break;
112903
+ case "Error_zero_amount_requested":
112904
+ case 4:
112905
+ message.error = 4;
112906
+ break;
112907
+ case "Error_missing_private_key":
112908
+ case 5:
112909
+ message.error = 5;
112910
+ break;
112911
+ case "Error_invalid_private_key":
112912
+ case 15:
112913
+ message.error = 15;
112914
+ break;
112915
+ case "Error_invalid_address":
112916
+ case 16:
112917
+ message.error = 16;
112918
+ break;
112919
+ case "Error_invalid_utxo":
112920
+ case 17:
112921
+ message.error = 17;
112922
+ break;
112923
+ case "Error_invalid_utxo_amount":
112924
+ case 18:
112925
+ message.error = 18;
112926
+ break;
112927
+ case "Error_wrong_fee":
112928
+ case 6:
112929
+ message.error = 6;
112930
+ break;
112931
+ case "Error_signing":
112932
+ case 7:
112933
+ message.error = 7;
112934
+ break;
112935
+ case "Error_tx_too_big":
112936
+ case 8:
112937
+ message.error = 8;
112938
+ break;
112939
+ case "Error_missing_input_utxos":
112940
+ case 9:
112941
+ message.error = 9;
112942
+ break;
112943
+ case "Error_not_enough_utxos":
112944
+ case 10:
112945
+ message.error = 10;
112946
+ break;
112947
+ case "Error_script_redeem":
112948
+ case 11:
112949
+ message.error = 11;
112950
+ break;
112951
+ case "Error_script_output":
112952
+ case 12:
112953
+ message.error = 12;
112954
+ break;
112955
+ case "Error_script_witness_program":
112956
+ case 13:
112957
+ message.error = 13;
112958
+ break;
112959
+ case "Error_invalid_memo":
112960
+ case 14:
112961
+ message.error = 14;
112962
+ break;
112963
+ case "Error_input_parse":
112964
+ case 19:
112965
+ message.error = 19;
112966
+ break;
112967
+ case "Error_no_support_n2n":
112968
+ case 20:
112969
+ message.error = 20;
112970
+ break;
112971
+ case "Error_signatures_count":
112972
+ case 21:
112973
+ message.error = 21;
112974
+ break;
112975
+ case "Error_invalid_params":
112976
+ case 22:
112977
+ message.error = 22;
112978
+ break;
112979
+ case "Error_invalid_requested_token_amount":
112980
+ case 23:
112981
+ message.error = 23;
112982
+ break;
112983
+ case "Error_not_supported":
112984
+ case 24:
112985
+ message.error = 24;
112986
+ break;
112987
+ case "Error_dust_amount_requested":
112988
+ case 25:
112989
+ message.error = 25;
112990
+ break;
112991
+ }
112992
+ if (object.errorMessage != null)
112993
+ message.errorMessage = String(object.errorMessage);
112994
+ if (object.unsignedTx != null)
112995
+ message.unsignedTx = String(object.unsignedTx);
112996
+ if (object.signatures) {
112997
+ if (!Array.isArray(object.signatures))
112998
+ throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: array expected");
112999
+ message.signatures = [];
113000
+ for (var i = 0; i < object.signatures.length; ++i) {
113001
+ if (typeof object.signatures[i] !== "object")
113002
+ throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: object expected");
113003
+ message.signatures[i] = $root.TW.Solana.Proto.PubkeySignature.fromObject(object.signatures[i]);
113004
+ }
113005
+ }
113006
+ return message;
113007
+ };
113008
+
113009
+ /**
113010
+ * Creates a plain object from a SigningOutput message. Also converts values to other types if specified.
113011
+ * @function toObject
113012
+ * @memberof TW.Solana.Proto.SigningOutput
113013
+ * @static
113014
+ * @param {TW.Solana.Proto.SigningOutput} message SigningOutput
113015
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
113016
+ * @returns {Object.<string,*>} Plain object
113017
+ */
113018
+ SigningOutput.toObject = function toObject(message, options) {
113019
+ if (!options)
113020
+ options = {};
113021
+ var object = {};
113022
+ if (options.arrays || options.defaults)
113023
+ object.signatures = [];
113024
+ if (options.defaults) {
113025
+ object.encoded = "";
113026
+ object.error = options.enums === String ? "OK" : 0;
113027
+ object.errorMessage = "";
113028
+ object.unsignedTx = "";
113029
+ }
113030
+ if (message.encoded != null && message.hasOwnProperty("encoded"))
113031
+ object.encoded = message.encoded;
113032
+ if (message.error != null && message.hasOwnProperty("error"))
113033
+ object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
113034
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
113035
+ object.errorMessage = message.errorMessage;
113036
+ if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
113037
+ object.unsignedTx = message.unsignedTx;
113038
+ if (message.signatures && message.signatures.length) {
113039
+ object.signatures = [];
113040
+ for (var j = 0; j < message.signatures.length; ++j)
113041
+ object.signatures[j] = $root.TW.Solana.Proto.PubkeySignature.toObject(message.signatures[j], options);
113042
+ }
113043
+ return object;
113044
+ };
113045
+
113046
+ /**
113047
+ * Converts this SigningOutput to JSON.
113048
+ * @function toJSON
113049
+ * @memberof TW.Solana.Proto.SigningOutput
113050
+ * @instance
113051
+ * @returns {Object.<string,*>} JSON object
113052
+ */
113053
+ SigningOutput.prototype.toJSON = function toJSON() {
113054
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
113055
+ };
113056
+
113057
+ return SigningOutput;
113058
+ })();
113059
+
113060
+ Proto.PreSigningOutput = (function() {
111115
113061
 
111116
113062
  /**
111117
- * Properties of a SigningOutput.
113063
+ * Properties of a PreSigningOutput.
111118
113064
  * @memberof TW.Solana.Proto
111119
- * @interface ISigningOutput
111120
- * @property {string|null} [encoded] SigningOutput encoded
111121
- * @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
111122
- * @property {string|null} [errorMessage] SigningOutput errorMessage
111123
- * @property {string|null} [unsignedTx] SigningOutput unsignedTx
111124
- * @property {Array.<TW.Solana.Proto.IPubkeySignature>|null} [signatures] SigningOutput signatures
113065
+ * @interface IPreSigningOutput
113066
+ * @property {Array.<Uint8Array>|null} [signers] PreSigningOutput signers
113067
+ * @property {Uint8Array|null} [data] PreSigningOutput data
113068
+ * @property {TW.Common.Proto.SigningError|null} [error] PreSigningOutput error
113069
+ * @property {string|null} [errorMessage] PreSigningOutput errorMessage
111125
113070
  */
111126
113071
 
111127
113072
  /**
111128
- * Constructs a new SigningOutput.
113073
+ * Constructs a new PreSigningOutput.
111129
113074
  * @memberof TW.Solana.Proto
111130
- * @classdesc Represents a SigningOutput.
111131
- * @implements ISigningOutput
113075
+ * @classdesc Transaction pre-signing output
113076
+ * @implements IPreSigningOutput
111132
113077
  * @constructor
111133
- * @param {TW.Solana.Proto.ISigningOutput=} [properties] Properties to set
113078
+ * @param {TW.Solana.Proto.IPreSigningOutput=} [properties] Properties to set
111134
113079
  */
111135
- function SigningOutput(properties) {
111136
- this.signatures = [];
113080
+ function PreSigningOutput(properties) {
113081
+ this.signers = [];
111137
113082
  if (properties)
111138
113083
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
111139
113084
  if (properties[keys[i]] != null)
@@ -111141,117 +113086,104 @@
111141
113086
  }
111142
113087
 
111143
113088
  /**
111144
- * SigningOutput encoded.
111145
- * @member {string} encoded
111146
- * @memberof TW.Solana.Proto.SigningOutput
111147
- * @instance
111148
- */
111149
- SigningOutput.prototype.encoded = "";
111150
-
111151
- /**
111152
- * SigningOutput error.
111153
- * @member {TW.Common.Proto.SigningError} error
111154
- * @memberof TW.Solana.Proto.SigningOutput
113089
+ * PreSigningOutput signers.
113090
+ * @member {Array.<Uint8Array>} signers
113091
+ * @memberof TW.Solana.Proto.PreSigningOutput
111155
113092
  * @instance
111156
113093
  */
111157
- SigningOutput.prototype.error = 0;
113094
+ PreSigningOutput.prototype.signers = $util.emptyArray;
111158
113095
 
111159
113096
  /**
111160
- * SigningOutput errorMessage.
111161
- * @member {string} errorMessage
111162
- * @memberof TW.Solana.Proto.SigningOutput
113097
+ * PreSigningOutput data.
113098
+ * @member {Uint8Array} data
113099
+ * @memberof TW.Solana.Proto.PreSigningOutput
111163
113100
  * @instance
111164
113101
  */
111165
- SigningOutput.prototype.errorMessage = "";
113102
+ PreSigningOutput.prototype.data = $util.newBuffer([]);
111166
113103
 
111167
113104
  /**
111168
- * SigningOutput unsignedTx.
111169
- * @member {string} unsignedTx
111170
- * @memberof TW.Solana.Proto.SigningOutput
113105
+ * PreSigningOutput error.
113106
+ * @member {TW.Common.Proto.SigningError} error
113107
+ * @memberof TW.Solana.Proto.PreSigningOutput
111171
113108
  * @instance
111172
113109
  */
111173
- SigningOutput.prototype.unsignedTx = "";
113110
+ PreSigningOutput.prototype.error = 0;
111174
113111
 
111175
113112
  /**
111176
- * SigningOutput signatures.
111177
- * @member {Array.<TW.Solana.Proto.IPubkeySignature>} signatures
111178
- * @memberof TW.Solana.Proto.SigningOutput
113113
+ * PreSigningOutput errorMessage.
113114
+ * @member {string} errorMessage
113115
+ * @memberof TW.Solana.Proto.PreSigningOutput
111179
113116
  * @instance
111180
113117
  */
111181
- SigningOutput.prototype.signatures = $util.emptyArray;
113118
+ PreSigningOutput.prototype.errorMessage = "";
111182
113119
 
111183
113120
  /**
111184
- * Creates a new SigningOutput instance using the specified properties.
113121
+ * Creates a new PreSigningOutput instance using the specified properties.
111185
113122
  * @function create
111186
- * @memberof TW.Solana.Proto.SigningOutput
113123
+ * @memberof TW.Solana.Proto.PreSigningOutput
111187
113124
  * @static
111188
- * @param {TW.Solana.Proto.ISigningOutput=} [properties] Properties to set
111189
- * @returns {TW.Solana.Proto.SigningOutput} SigningOutput instance
113125
+ * @param {TW.Solana.Proto.IPreSigningOutput=} [properties] Properties to set
113126
+ * @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput instance
111190
113127
  */
111191
- SigningOutput.create = function create(properties) {
111192
- return new SigningOutput(properties);
113128
+ PreSigningOutput.create = function create(properties) {
113129
+ return new PreSigningOutput(properties);
111193
113130
  };
111194
113131
 
111195
113132
  /**
111196
- * Encodes the specified SigningOutput message. Does not implicitly {@link TW.Solana.Proto.SigningOutput.verify|verify} messages.
113133
+ * Encodes the specified PreSigningOutput message. Does not implicitly {@link TW.Solana.Proto.PreSigningOutput.verify|verify} messages.
111197
113134
  * @function encode
111198
- * @memberof TW.Solana.Proto.SigningOutput
113135
+ * @memberof TW.Solana.Proto.PreSigningOutput
111199
113136
  * @static
111200
- * @param {TW.Solana.Proto.ISigningOutput} message SigningOutput message or plain object to encode
113137
+ * @param {TW.Solana.Proto.IPreSigningOutput} message PreSigningOutput message or plain object to encode
111201
113138
  * @param {$protobuf.Writer} [writer] Writer to encode to
111202
113139
  * @returns {$protobuf.Writer} Writer
111203
113140
  */
111204
- SigningOutput.encode = function encode(message, writer) {
113141
+ PreSigningOutput.encode = function encode(message, writer) {
111205
113142
  if (!writer)
111206
113143
  writer = $Writer.create();
111207
- if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
111208
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoded);
113144
+ if (message.signers != null && message.signers.length)
113145
+ for (var i = 0; i < message.signers.length; ++i)
113146
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signers[i]);
113147
+ if (message.data != null && Object.hasOwnProperty.call(message, "data"))
113148
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);
111209
113149
  if (message.error != null && Object.hasOwnProperty.call(message, "error"))
111210
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
113150
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.error);
111211
113151
  if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
111212
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
111213
- if (message.unsignedTx != null && Object.hasOwnProperty.call(message, "unsignedTx"))
111214
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.unsignedTx);
111215
- if (message.signatures != null && message.signatures.length)
111216
- for (var i = 0; i < message.signatures.length; ++i)
111217
- $root.TW.Solana.Proto.PubkeySignature.encode(message.signatures[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
113152
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.errorMessage);
111218
113153
  return writer;
111219
113154
  };
111220
113155
 
111221
113156
  /**
111222
- * Decodes a SigningOutput message from the specified reader or buffer.
113157
+ * Decodes a PreSigningOutput message from the specified reader or buffer.
111223
113158
  * @function decode
111224
- * @memberof TW.Solana.Proto.SigningOutput
113159
+ * @memberof TW.Solana.Proto.PreSigningOutput
111225
113160
  * @static
111226
113161
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
111227
113162
  * @param {number} [length] Message length if known beforehand
111228
- * @returns {TW.Solana.Proto.SigningOutput} SigningOutput
113163
+ * @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput
111229
113164
  * @throws {Error} If the payload is not a reader or valid buffer
111230
113165
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
111231
113166
  */
111232
- SigningOutput.decode = function decode(reader, length) {
113167
+ PreSigningOutput.decode = function decode(reader, length) {
111233
113168
  if (!(reader instanceof $Reader))
111234
113169
  reader = $Reader.create(reader);
111235
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.SigningOutput();
113170
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PreSigningOutput();
111236
113171
  while (reader.pos < end) {
111237
113172
  var tag = reader.uint32();
111238
113173
  switch (tag >>> 3) {
111239
113174
  case 1:
111240
- message.encoded = reader.string();
113175
+ if (!(message.signers && message.signers.length))
113176
+ message.signers = [];
113177
+ message.signers.push(reader.bytes());
111241
113178
  break;
111242
113179
  case 2:
111243
- message.error = reader.int32();
113180
+ message.data = reader.bytes();
111244
113181
  break;
111245
113182
  case 3:
111246
- message.errorMessage = reader.string();
113183
+ message.error = reader.int32();
111247
113184
  break;
111248
113185
  case 4:
111249
- message.unsignedTx = reader.string();
111250
- break;
111251
- case 5:
111252
- if (!(message.signatures && message.signatures.length))
111253
- message.signatures = [];
111254
- message.signatures.push($root.TW.Solana.Proto.PubkeySignature.decode(reader, reader.uint32()));
113186
+ message.errorMessage = reader.string();
111255
113187
  break;
111256
113188
  default:
111257
113189
  reader.skipType(tag & 7);
@@ -111262,19 +113194,26 @@
111262
113194
  };
111263
113195
 
111264
113196
  /**
111265
- * Verifies a SigningOutput message.
113197
+ * Verifies a PreSigningOutput message.
111266
113198
  * @function verify
111267
- * @memberof TW.Solana.Proto.SigningOutput
113199
+ * @memberof TW.Solana.Proto.PreSigningOutput
111268
113200
  * @static
111269
113201
  * @param {Object.<string,*>} message Plain object to verify
111270
113202
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
111271
113203
  */
111272
- SigningOutput.verify = function verify(message) {
113204
+ PreSigningOutput.verify = function verify(message) {
111273
113205
  if (typeof message !== "object" || message === null)
111274
113206
  return "object expected";
111275
- if (message.encoded != null && message.hasOwnProperty("encoded"))
111276
- if (!$util.isString(message.encoded))
111277
- return "encoded: string expected";
113207
+ if (message.signers != null && message.hasOwnProperty("signers")) {
113208
+ if (!Array.isArray(message.signers))
113209
+ return "signers: array expected";
113210
+ for (var i = 0; i < message.signers.length; ++i)
113211
+ if (!(message.signers[i] && typeof message.signers[i].length === "number" || $util.isString(message.signers[i])))
113212
+ return "signers: buffer[] expected";
113213
+ }
113214
+ if (message.data != null && message.hasOwnProperty("data"))
113215
+ if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
113216
+ return "data: buffer expected";
111278
113217
  if (message.error != null && message.hasOwnProperty("error"))
111279
113218
  switch (message.error) {
111280
113219
  default:
@@ -111310,35 +113249,36 @@
111310
113249
  if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
111311
113250
  if (!$util.isString(message.errorMessage))
111312
113251
  return "errorMessage: string expected";
111313
- if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
111314
- if (!$util.isString(message.unsignedTx))
111315
- return "unsignedTx: string expected";
111316
- if (message.signatures != null && message.hasOwnProperty("signatures")) {
111317
- if (!Array.isArray(message.signatures))
111318
- return "signatures: array expected";
111319
- for (var i = 0; i < message.signatures.length; ++i) {
111320
- var error = $root.TW.Solana.Proto.PubkeySignature.verify(message.signatures[i]);
111321
- if (error)
111322
- return "signatures." + error;
111323
- }
111324
- }
111325
113252
  return null;
111326
113253
  };
111327
113254
 
111328
113255
  /**
111329
- * Creates a SigningOutput message from a plain object. Also converts values to their respective internal types.
113256
+ * Creates a PreSigningOutput message from a plain object. Also converts values to their respective internal types.
111330
113257
  * @function fromObject
111331
- * @memberof TW.Solana.Proto.SigningOutput
113258
+ * @memberof TW.Solana.Proto.PreSigningOutput
111332
113259
  * @static
111333
113260
  * @param {Object.<string,*>} object Plain object
111334
- * @returns {TW.Solana.Proto.SigningOutput} SigningOutput
113261
+ * @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput
111335
113262
  */
111336
- SigningOutput.fromObject = function fromObject(object) {
111337
- if (object instanceof $root.TW.Solana.Proto.SigningOutput)
113263
+ PreSigningOutput.fromObject = function fromObject(object) {
113264
+ if (object instanceof $root.TW.Solana.Proto.PreSigningOutput)
111338
113265
  return object;
111339
- var message = new $root.TW.Solana.Proto.SigningOutput();
111340
- if (object.encoded != null)
111341
- message.encoded = String(object.encoded);
113266
+ var message = new $root.TW.Solana.Proto.PreSigningOutput();
113267
+ if (object.signers) {
113268
+ if (!Array.isArray(object.signers))
113269
+ throw TypeError(".TW.Solana.Proto.PreSigningOutput.signers: array expected");
113270
+ message.signers = [];
113271
+ for (var i = 0; i < object.signers.length; ++i)
113272
+ if (typeof object.signers[i] === "string")
113273
+ $util.base64.decode(object.signers[i], message.signers[i] = $util.newBuffer($util.base64.length(object.signers[i])), 0);
113274
+ else if (object.signers[i].length)
113275
+ message.signers[i] = object.signers[i];
113276
+ }
113277
+ if (object.data != null)
113278
+ if (typeof object.data === "string")
113279
+ $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
113280
+ else if (object.data.length)
113281
+ message.data = object.data;
111342
113282
  switch (object.error) {
111343
113283
  case "OK":
111344
113284
  case 0:
@@ -111447,94 +113387,82 @@
111447
113387
  }
111448
113388
  if (object.errorMessage != null)
111449
113389
  message.errorMessage = String(object.errorMessage);
111450
- if (object.unsignedTx != null)
111451
- message.unsignedTx = String(object.unsignedTx);
111452
- if (object.signatures) {
111453
- if (!Array.isArray(object.signatures))
111454
- throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: array expected");
111455
- message.signatures = [];
111456
- for (var i = 0; i < object.signatures.length; ++i) {
111457
- if (typeof object.signatures[i] !== "object")
111458
- throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: object expected");
111459
- message.signatures[i] = $root.TW.Solana.Proto.PubkeySignature.fromObject(object.signatures[i]);
111460
- }
111461
- }
111462
113390
  return message;
111463
113391
  };
111464
113392
 
111465
113393
  /**
111466
- * Creates a plain object from a SigningOutput message. Also converts values to other types if specified.
113394
+ * Creates a plain object from a PreSigningOutput message. Also converts values to other types if specified.
111467
113395
  * @function toObject
111468
- * @memberof TW.Solana.Proto.SigningOutput
113396
+ * @memberof TW.Solana.Proto.PreSigningOutput
111469
113397
  * @static
111470
- * @param {TW.Solana.Proto.SigningOutput} message SigningOutput
113398
+ * @param {TW.Solana.Proto.PreSigningOutput} message PreSigningOutput
111471
113399
  * @param {$protobuf.IConversionOptions} [options] Conversion options
111472
113400
  * @returns {Object.<string,*>} Plain object
111473
113401
  */
111474
- SigningOutput.toObject = function toObject(message, options) {
113402
+ PreSigningOutput.toObject = function toObject(message, options) {
111475
113403
  if (!options)
111476
113404
  options = {};
111477
113405
  var object = {};
111478
113406
  if (options.arrays || options.defaults)
111479
- object.signatures = [];
113407
+ object.signers = [];
111480
113408
  if (options.defaults) {
111481
- object.encoded = "";
113409
+ if (options.bytes === String)
113410
+ object.data = "";
113411
+ else {
113412
+ object.data = [];
113413
+ if (options.bytes !== Array)
113414
+ object.data = $util.newBuffer(object.data);
113415
+ }
111482
113416
  object.error = options.enums === String ? "OK" : 0;
111483
113417
  object.errorMessage = "";
111484
- object.unsignedTx = "";
111485
113418
  }
111486
- if (message.encoded != null && message.hasOwnProperty("encoded"))
111487
- object.encoded = message.encoded;
113419
+ if (message.signers && message.signers.length) {
113420
+ object.signers = [];
113421
+ for (var j = 0; j < message.signers.length; ++j)
113422
+ object.signers[j] = options.bytes === String ? $util.base64.encode(message.signers[j], 0, message.signers[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signers[j]) : message.signers[j];
113423
+ }
113424
+ if (message.data != null && message.hasOwnProperty("data"))
113425
+ object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
111488
113426
  if (message.error != null && message.hasOwnProperty("error"))
111489
113427
  object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
111490
113428
  if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
111491
113429
  object.errorMessage = message.errorMessage;
111492
- if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
111493
- object.unsignedTx = message.unsignedTx;
111494
- if (message.signatures && message.signatures.length) {
111495
- object.signatures = [];
111496
- for (var j = 0; j < message.signatures.length; ++j)
111497
- object.signatures[j] = $root.TW.Solana.Proto.PubkeySignature.toObject(message.signatures[j], options);
111498
- }
111499
113430
  return object;
111500
113431
  };
111501
113432
 
111502
113433
  /**
111503
- * Converts this SigningOutput to JSON.
113434
+ * Converts this PreSigningOutput to JSON.
111504
113435
  * @function toJSON
111505
- * @memberof TW.Solana.Proto.SigningOutput
113436
+ * @memberof TW.Solana.Proto.PreSigningOutput
111506
113437
  * @instance
111507
113438
  * @returns {Object.<string,*>} JSON object
111508
113439
  */
111509
- SigningOutput.prototype.toJSON = function toJSON() {
113440
+ PreSigningOutput.prototype.toJSON = function toJSON() {
111510
113441
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
111511
113442
  };
111512
113443
 
111513
- return SigningOutput;
113444
+ return PreSigningOutput;
111514
113445
  })();
111515
113446
 
111516
- Proto.PreSigningOutput = (function() {
113447
+ Proto.MessageSigningInput = (function() {
111517
113448
 
111518
113449
  /**
111519
- * Properties of a PreSigningOutput.
113450
+ * Properties of a MessageSigningInput.
111520
113451
  * @memberof TW.Solana.Proto
111521
- * @interface IPreSigningOutput
111522
- * @property {Array.<Uint8Array>|null} [signers] PreSigningOutput signers
111523
- * @property {Uint8Array|null} [data] PreSigningOutput data
111524
- * @property {TW.Common.Proto.SigningError|null} [error] PreSigningOutput error
111525
- * @property {string|null} [errorMessage] PreSigningOutput errorMessage
113452
+ * @interface IMessageSigningInput
113453
+ * @property {Uint8Array|null} [privateKey] MessageSigningInput privateKey
113454
+ * @property {string|null} [message] MessageSigningInput message
111526
113455
  */
111527
113456
 
111528
113457
  /**
111529
- * Constructs a new PreSigningOutput.
113458
+ * Constructs a new MessageSigningInput.
111530
113459
  * @memberof TW.Solana.Proto
111531
- * @classdesc Transaction pre-signing output
111532
- * @implements IPreSigningOutput
113460
+ * @classdesc Represents a MessageSigningInput.
113461
+ * @implements IMessageSigningInput
111533
113462
  * @constructor
111534
- * @param {TW.Solana.Proto.IPreSigningOutput=} [properties] Properties to set
113463
+ * @param {TW.Solana.Proto.IMessageSigningInput=} [properties] Properties to set
111535
113464
  */
111536
- function PreSigningOutput(properties) {
111537
- this.signers = [];
113465
+ function MessageSigningInput(properties) {
111538
113466
  if (properties)
111539
113467
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
111540
113468
  if (properties[keys[i]] != null)
@@ -111542,103 +113470,278 @@
111542
113470
  }
111543
113471
 
111544
113472
  /**
111545
- * PreSigningOutput signers.
111546
- * @member {Array.<Uint8Array>} signers
111547
- * @memberof TW.Solana.Proto.PreSigningOutput
113473
+ * MessageSigningInput privateKey.
113474
+ * @member {Uint8Array} privateKey
113475
+ * @memberof TW.Solana.Proto.MessageSigningInput
111548
113476
  * @instance
111549
113477
  */
111550
- PreSigningOutput.prototype.signers = $util.emptyArray;
113478
+ MessageSigningInput.prototype.privateKey = $util.newBuffer([]);
111551
113479
 
111552
113480
  /**
111553
- * PreSigningOutput data.
111554
- * @member {Uint8Array} data
111555
- * @memberof TW.Solana.Proto.PreSigningOutput
113481
+ * MessageSigningInput message.
113482
+ * @member {string} message
113483
+ * @memberof TW.Solana.Proto.MessageSigningInput
111556
113484
  * @instance
111557
113485
  */
111558
- PreSigningOutput.prototype.data = $util.newBuffer([]);
113486
+ MessageSigningInput.prototype.message = "";
111559
113487
 
111560
113488
  /**
111561
- * PreSigningOutput error.
113489
+ * Creates a new MessageSigningInput instance using the specified properties.
113490
+ * @function create
113491
+ * @memberof TW.Solana.Proto.MessageSigningInput
113492
+ * @static
113493
+ * @param {TW.Solana.Proto.IMessageSigningInput=} [properties] Properties to set
113494
+ * @returns {TW.Solana.Proto.MessageSigningInput} MessageSigningInput instance
113495
+ */
113496
+ MessageSigningInput.create = function create(properties) {
113497
+ return new MessageSigningInput(properties);
113498
+ };
113499
+
113500
+ /**
113501
+ * Encodes the specified MessageSigningInput message. Does not implicitly {@link TW.Solana.Proto.MessageSigningInput.verify|verify} messages.
113502
+ * @function encode
113503
+ * @memberof TW.Solana.Proto.MessageSigningInput
113504
+ * @static
113505
+ * @param {TW.Solana.Proto.IMessageSigningInput} message MessageSigningInput message or plain object to encode
113506
+ * @param {$protobuf.Writer} [writer] Writer to encode to
113507
+ * @returns {$protobuf.Writer} Writer
113508
+ */
113509
+ MessageSigningInput.encode = function encode(message, writer) {
113510
+ if (!writer)
113511
+ writer = $Writer.create();
113512
+ if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
113513
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
113514
+ if (message.message != null && Object.hasOwnProperty.call(message, "message"))
113515
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
113516
+ return writer;
113517
+ };
113518
+
113519
+ /**
113520
+ * Decodes a MessageSigningInput message from the specified reader or buffer.
113521
+ * @function decode
113522
+ * @memberof TW.Solana.Proto.MessageSigningInput
113523
+ * @static
113524
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
113525
+ * @param {number} [length] Message length if known beforehand
113526
+ * @returns {TW.Solana.Proto.MessageSigningInput} MessageSigningInput
113527
+ * @throws {Error} If the payload is not a reader or valid buffer
113528
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
113529
+ */
113530
+ MessageSigningInput.decode = function decode(reader, length) {
113531
+ if (!(reader instanceof $Reader))
113532
+ reader = $Reader.create(reader);
113533
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.MessageSigningInput();
113534
+ while (reader.pos < end) {
113535
+ var tag = reader.uint32();
113536
+ switch (tag >>> 3) {
113537
+ case 1:
113538
+ message.privateKey = reader.bytes();
113539
+ break;
113540
+ case 2:
113541
+ message.message = reader.string();
113542
+ break;
113543
+ default:
113544
+ reader.skipType(tag & 7);
113545
+ break;
113546
+ }
113547
+ }
113548
+ return message;
113549
+ };
113550
+
113551
+ /**
113552
+ * Verifies a MessageSigningInput message.
113553
+ * @function verify
113554
+ * @memberof TW.Solana.Proto.MessageSigningInput
113555
+ * @static
113556
+ * @param {Object.<string,*>} message Plain object to verify
113557
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
113558
+ */
113559
+ MessageSigningInput.verify = function verify(message) {
113560
+ if (typeof message !== "object" || message === null)
113561
+ return "object expected";
113562
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
113563
+ if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
113564
+ return "privateKey: buffer expected";
113565
+ if (message.message != null && message.hasOwnProperty("message"))
113566
+ if (!$util.isString(message.message))
113567
+ return "message: string expected";
113568
+ return null;
113569
+ };
113570
+
113571
+ /**
113572
+ * Creates a MessageSigningInput message from a plain object. Also converts values to their respective internal types.
113573
+ * @function fromObject
113574
+ * @memberof TW.Solana.Proto.MessageSigningInput
113575
+ * @static
113576
+ * @param {Object.<string,*>} object Plain object
113577
+ * @returns {TW.Solana.Proto.MessageSigningInput} MessageSigningInput
113578
+ */
113579
+ MessageSigningInput.fromObject = function fromObject(object) {
113580
+ if (object instanceof $root.TW.Solana.Proto.MessageSigningInput)
113581
+ return object;
113582
+ var message = new $root.TW.Solana.Proto.MessageSigningInput();
113583
+ if (object.privateKey != null)
113584
+ if (typeof object.privateKey === "string")
113585
+ $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
113586
+ else if (object.privateKey.length)
113587
+ message.privateKey = object.privateKey;
113588
+ if (object.message != null)
113589
+ message.message = String(object.message);
113590
+ return message;
113591
+ };
113592
+
113593
+ /**
113594
+ * Creates a plain object from a MessageSigningInput message. Also converts values to other types if specified.
113595
+ * @function toObject
113596
+ * @memberof TW.Solana.Proto.MessageSigningInput
113597
+ * @static
113598
+ * @param {TW.Solana.Proto.MessageSigningInput} message MessageSigningInput
113599
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
113600
+ * @returns {Object.<string,*>} Plain object
113601
+ */
113602
+ MessageSigningInput.toObject = function toObject(message, options) {
113603
+ if (!options)
113604
+ options = {};
113605
+ var object = {};
113606
+ if (options.defaults) {
113607
+ if (options.bytes === String)
113608
+ object.privateKey = "";
113609
+ else {
113610
+ object.privateKey = [];
113611
+ if (options.bytes !== Array)
113612
+ object.privateKey = $util.newBuffer(object.privateKey);
113613
+ }
113614
+ object.message = "";
113615
+ }
113616
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
113617
+ 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;
113618
+ if (message.message != null && message.hasOwnProperty("message"))
113619
+ object.message = message.message;
113620
+ return object;
113621
+ };
113622
+
113623
+ /**
113624
+ * Converts this MessageSigningInput to JSON.
113625
+ * @function toJSON
113626
+ * @memberof TW.Solana.Proto.MessageSigningInput
113627
+ * @instance
113628
+ * @returns {Object.<string,*>} JSON object
113629
+ */
113630
+ MessageSigningInput.prototype.toJSON = function toJSON() {
113631
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
113632
+ };
113633
+
113634
+ return MessageSigningInput;
113635
+ })();
113636
+
113637
+ Proto.MessageSigningOutput = (function() {
113638
+
113639
+ /**
113640
+ * Properties of a MessageSigningOutput.
113641
+ * @memberof TW.Solana.Proto
113642
+ * @interface IMessageSigningOutput
113643
+ * @property {string|null} [signature] MessageSigningOutput signature
113644
+ * @property {TW.Common.Proto.SigningError|null} [error] MessageSigningOutput error
113645
+ * @property {string|null} [errorMessage] MessageSigningOutput errorMessage
113646
+ */
113647
+
113648
+ /**
113649
+ * Constructs a new MessageSigningOutput.
113650
+ * @memberof TW.Solana.Proto
113651
+ * @classdesc Represents a MessageSigningOutput.
113652
+ * @implements IMessageSigningOutput
113653
+ * @constructor
113654
+ * @param {TW.Solana.Proto.IMessageSigningOutput=} [properties] Properties to set
113655
+ */
113656
+ function MessageSigningOutput(properties) {
113657
+ if (properties)
113658
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
113659
+ if (properties[keys[i]] != null)
113660
+ this[keys[i]] = properties[keys[i]];
113661
+ }
113662
+
113663
+ /**
113664
+ * MessageSigningOutput signature.
113665
+ * @member {string} signature
113666
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113667
+ * @instance
113668
+ */
113669
+ MessageSigningOutput.prototype.signature = "";
113670
+
113671
+ /**
113672
+ * MessageSigningOutput error.
111562
113673
  * @member {TW.Common.Proto.SigningError} error
111563
- * @memberof TW.Solana.Proto.PreSigningOutput
113674
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111564
113675
  * @instance
111565
113676
  */
111566
- PreSigningOutput.prototype.error = 0;
113677
+ MessageSigningOutput.prototype.error = 0;
111567
113678
 
111568
113679
  /**
111569
- * PreSigningOutput errorMessage.
113680
+ * MessageSigningOutput errorMessage.
111570
113681
  * @member {string} errorMessage
111571
- * @memberof TW.Solana.Proto.PreSigningOutput
113682
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111572
113683
  * @instance
111573
113684
  */
111574
- PreSigningOutput.prototype.errorMessage = "";
113685
+ MessageSigningOutput.prototype.errorMessage = "";
111575
113686
 
111576
113687
  /**
111577
- * Creates a new PreSigningOutput instance using the specified properties.
113688
+ * Creates a new MessageSigningOutput instance using the specified properties.
111578
113689
  * @function create
111579
- * @memberof TW.Solana.Proto.PreSigningOutput
113690
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111580
113691
  * @static
111581
- * @param {TW.Solana.Proto.IPreSigningOutput=} [properties] Properties to set
111582
- * @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput instance
113692
+ * @param {TW.Solana.Proto.IMessageSigningOutput=} [properties] Properties to set
113693
+ * @returns {TW.Solana.Proto.MessageSigningOutput} MessageSigningOutput instance
111583
113694
  */
111584
- PreSigningOutput.create = function create(properties) {
111585
- return new PreSigningOutput(properties);
113695
+ MessageSigningOutput.create = function create(properties) {
113696
+ return new MessageSigningOutput(properties);
111586
113697
  };
111587
113698
 
111588
113699
  /**
111589
- * Encodes the specified PreSigningOutput message. Does not implicitly {@link TW.Solana.Proto.PreSigningOutput.verify|verify} messages.
113700
+ * Encodes the specified MessageSigningOutput message. Does not implicitly {@link TW.Solana.Proto.MessageSigningOutput.verify|verify} messages.
111590
113701
  * @function encode
111591
- * @memberof TW.Solana.Proto.PreSigningOutput
113702
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111592
113703
  * @static
111593
- * @param {TW.Solana.Proto.IPreSigningOutput} message PreSigningOutput message or plain object to encode
113704
+ * @param {TW.Solana.Proto.IMessageSigningOutput} message MessageSigningOutput message or plain object to encode
111594
113705
  * @param {$protobuf.Writer} [writer] Writer to encode to
111595
113706
  * @returns {$protobuf.Writer} Writer
111596
113707
  */
111597
- PreSigningOutput.encode = function encode(message, writer) {
113708
+ MessageSigningOutput.encode = function encode(message, writer) {
111598
113709
  if (!writer)
111599
113710
  writer = $Writer.create();
111600
- if (message.signers != null && message.signers.length)
111601
- for (var i = 0; i < message.signers.length; ++i)
111602
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signers[i]);
111603
- if (message.data != null && Object.hasOwnProperty.call(message, "data"))
111604
- writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);
113711
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
113712
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.signature);
111605
113713
  if (message.error != null && Object.hasOwnProperty.call(message, "error"))
111606
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.error);
113714
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
111607
113715
  if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
111608
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.errorMessage);
113716
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
111609
113717
  return writer;
111610
113718
  };
111611
113719
 
111612
113720
  /**
111613
- * Decodes a PreSigningOutput message from the specified reader or buffer.
113721
+ * Decodes a MessageSigningOutput message from the specified reader or buffer.
111614
113722
  * @function decode
111615
- * @memberof TW.Solana.Proto.PreSigningOutput
113723
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111616
113724
  * @static
111617
113725
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
111618
113726
  * @param {number} [length] Message length if known beforehand
111619
- * @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput
113727
+ * @returns {TW.Solana.Proto.MessageSigningOutput} MessageSigningOutput
111620
113728
  * @throws {Error} If the payload is not a reader or valid buffer
111621
113729
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
111622
113730
  */
111623
- PreSigningOutput.decode = function decode(reader, length) {
113731
+ MessageSigningOutput.decode = function decode(reader, length) {
111624
113732
  if (!(reader instanceof $Reader))
111625
113733
  reader = $Reader.create(reader);
111626
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PreSigningOutput();
113734
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.MessageSigningOutput();
111627
113735
  while (reader.pos < end) {
111628
113736
  var tag = reader.uint32();
111629
113737
  switch (tag >>> 3) {
111630
113738
  case 1:
111631
- if (!(message.signers && message.signers.length))
111632
- message.signers = [];
111633
- message.signers.push(reader.bytes());
113739
+ message.signature = reader.string();
111634
113740
  break;
111635
113741
  case 2:
111636
- message.data = reader.bytes();
111637
- break;
111638
- case 3:
111639
113742
  message.error = reader.int32();
111640
113743
  break;
111641
- case 4:
113744
+ case 3:
111642
113745
  message.errorMessage = reader.string();
111643
113746
  break;
111644
113747
  default:
@@ -111650,26 +113753,19 @@
111650
113753
  };
111651
113754
 
111652
113755
  /**
111653
- * Verifies a PreSigningOutput message.
113756
+ * Verifies a MessageSigningOutput message.
111654
113757
  * @function verify
111655
- * @memberof TW.Solana.Proto.PreSigningOutput
113758
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111656
113759
  * @static
111657
113760
  * @param {Object.<string,*>} message Plain object to verify
111658
113761
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
111659
113762
  */
111660
- PreSigningOutput.verify = function verify(message) {
113763
+ MessageSigningOutput.verify = function verify(message) {
111661
113764
  if (typeof message !== "object" || message === null)
111662
113765
  return "object expected";
111663
- if (message.signers != null && message.hasOwnProperty("signers")) {
111664
- if (!Array.isArray(message.signers))
111665
- return "signers: array expected";
111666
- for (var i = 0; i < message.signers.length; ++i)
111667
- if (!(message.signers[i] && typeof message.signers[i].length === "number" || $util.isString(message.signers[i])))
111668
- return "signers: buffer[] expected";
111669
- }
111670
- if (message.data != null && message.hasOwnProperty("data"))
111671
- if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
111672
- return "data: buffer expected";
113766
+ if (message.signature != null && message.hasOwnProperty("signature"))
113767
+ if (!$util.isString(message.signature))
113768
+ return "signature: string expected";
111673
113769
  if (message.error != null && message.hasOwnProperty("error"))
111674
113770
  switch (message.error) {
111675
113771
  default:
@@ -111709,32 +113805,19 @@
111709
113805
  };
111710
113806
 
111711
113807
  /**
111712
- * Creates a PreSigningOutput message from a plain object. Also converts values to their respective internal types.
113808
+ * Creates a MessageSigningOutput message from a plain object. Also converts values to their respective internal types.
111713
113809
  * @function fromObject
111714
- * @memberof TW.Solana.Proto.PreSigningOutput
113810
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111715
113811
  * @static
111716
113812
  * @param {Object.<string,*>} object Plain object
111717
- * @returns {TW.Solana.Proto.PreSigningOutput} PreSigningOutput
113813
+ * @returns {TW.Solana.Proto.MessageSigningOutput} MessageSigningOutput
111718
113814
  */
111719
- PreSigningOutput.fromObject = function fromObject(object) {
111720
- if (object instanceof $root.TW.Solana.Proto.PreSigningOutput)
113815
+ MessageSigningOutput.fromObject = function fromObject(object) {
113816
+ if (object instanceof $root.TW.Solana.Proto.MessageSigningOutput)
111721
113817
  return object;
111722
- var message = new $root.TW.Solana.Proto.PreSigningOutput();
111723
- if (object.signers) {
111724
- if (!Array.isArray(object.signers))
111725
- throw TypeError(".TW.Solana.Proto.PreSigningOutput.signers: array expected");
111726
- message.signers = [];
111727
- for (var i = 0; i < object.signers.length; ++i)
111728
- if (typeof object.signers[i] === "string")
111729
- $util.base64.decode(object.signers[i], message.signers[i] = $util.newBuffer($util.base64.length(object.signers[i])), 0);
111730
- else if (object.signers[i].length)
111731
- message.signers[i] = object.signers[i];
111732
- }
111733
- if (object.data != null)
111734
- if (typeof object.data === "string")
111735
- $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
111736
- else if (object.data.length)
111737
- message.data = object.data;
113818
+ var message = new $root.TW.Solana.Proto.MessageSigningOutput();
113819
+ if (object.signature != null)
113820
+ message.signature = String(object.signature);
111738
113821
  switch (object.error) {
111739
113822
  case "OK":
111740
113823
  case 0:
@@ -111847,38 +113930,25 @@
111847
113930
  };
111848
113931
 
111849
113932
  /**
111850
- * Creates a plain object from a PreSigningOutput message. Also converts values to other types if specified.
113933
+ * Creates a plain object from a MessageSigningOutput message. Also converts values to other types if specified.
111851
113934
  * @function toObject
111852
- * @memberof TW.Solana.Proto.PreSigningOutput
113935
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111853
113936
  * @static
111854
- * @param {TW.Solana.Proto.PreSigningOutput} message PreSigningOutput
113937
+ * @param {TW.Solana.Proto.MessageSigningOutput} message MessageSigningOutput
111855
113938
  * @param {$protobuf.IConversionOptions} [options] Conversion options
111856
113939
  * @returns {Object.<string,*>} Plain object
111857
113940
  */
111858
- PreSigningOutput.toObject = function toObject(message, options) {
113941
+ MessageSigningOutput.toObject = function toObject(message, options) {
111859
113942
  if (!options)
111860
113943
  options = {};
111861
113944
  var object = {};
111862
- if (options.arrays || options.defaults)
111863
- object.signers = [];
111864
113945
  if (options.defaults) {
111865
- if (options.bytes === String)
111866
- object.data = "";
111867
- else {
111868
- object.data = [];
111869
- if (options.bytes !== Array)
111870
- object.data = $util.newBuffer(object.data);
111871
- }
113946
+ object.signature = "";
111872
113947
  object.error = options.enums === String ? "OK" : 0;
111873
113948
  object.errorMessage = "";
111874
113949
  }
111875
- if (message.signers && message.signers.length) {
111876
- object.signers = [];
111877
- for (var j = 0; j < message.signers.length; ++j)
111878
- object.signers[j] = options.bytes === String ? $util.base64.encode(message.signers[j], 0, message.signers[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signers[j]) : message.signers[j];
111879
- }
111880
- if (message.data != null && message.hasOwnProperty("data"))
111881
- object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
113950
+ if (message.signature != null && message.hasOwnProperty("signature"))
113951
+ object.signature = message.signature;
111882
113952
  if (message.error != null && message.hasOwnProperty("error"))
111883
113953
  object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
111884
113954
  if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
@@ -111887,17 +113957,229 @@
111887
113957
  };
111888
113958
 
111889
113959
  /**
111890
- * Converts this PreSigningOutput to JSON.
113960
+ * Converts this MessageSigningOutput to JSON.
111891
113961
  * @function toJSON
111892
- * @memberof TW.Solana.Proto.PreSigningOutput
113962
+ * @memberof TW.Solana.Proto.MessageSigningOutput
111893
113963
  * @instance
111894
113964
  * @returns {Object.<string,*>} JSON object
111895
113965
  */
111896
- PreSigningOutput.prototype.toJSON = function toJSON() {
113966
+ MessageSigningOutput.prototype.toJSON = function toJSON() {
111897
113967
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
111898
113968
  };
111899
113969
 
111900
- return PreSigningOutput;
113970
+ return MessageSigningOutput;
113971
+ })();
113972
+
113973
+ Proto.MessageVerifyingInput = (function() {
113974
+
113975
+ /**
113976
+ * Properties of a MessageVerifyingInput.
113977
+ * @memberof TW.Solana.Proto
113978
+ * @interface IMessageVerifyingInput
113979
+ * @property {string|null} [message] MessageVerifyingInput message
113980
+ * @property {Uint8Array|null} [publicKey] MessageVerifyingInput publicKey
113981
+ * @property {string|null} [signature] MessageVerifyingInput signature
113982
+ */
113983
+
113984
+ /**
113985
+ * Constructs a new MessageVerifyingInput.
113986
+ * @memberof TW.Solana.Proto
113987
+ * @classdesc Represents a MessageVerifyingInput.
113988
+ * @implements IMessageVerifyingInput
113989
+ * @constructor
113990
+ * @param {TW.Solana.Proto.IMessageVerifyingInput=} [properties] Properties to set
113991
+ */
113992
+ function MessageVerifyingInput(properties) {
113993
+ if (properties)
113994
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
113995
+ if (properties[keys[i]] != null)
113996
+ this[keys[i]] = properties[keys[i]];
113997
+ }
113998
+
113999
+ /**
114000
+ * MessageVerifyingInput message.
114001
+ * @member {string} message
114002
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114003
+ * @instance
114004
+ */
114005
+ MessageVerifyingInput.prototype.message = "";
114006
+
114007
+ /**
114008
+ * MessageVerifyingInput publicKey.
114009
+ * @member {Uint8Array} publicKey
114010
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114011
+ * @instance
114012
+ */
114013
+ MessageVerifyingInput.prototype.publicKey = $util.newBuffer([]);
114014
+
114015
+ /**
114016
+ * MessageVerifyingInput signature.
114017
+ * @member {string} signature
114018
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114019
+ * @instance
114020
+ */
114021
+ MessageVerifyingInput.prototype.signature = "";
114022
+
114023
+ /**
114024
+ * Creates a new MessageVerifyingInput instance using the specified properties.
114025
+ * @function create
114026
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114027
+ * @static
114028
+ * @param {TW.Solana.Proto.IMessageVerifyingInput=} [properties] Properties to set
114029
+ * @returns {TW.Solana.Proto.MessageVerifyingInput} MessageVerifyingInput instance
114030
+ */
114031
+ MessageVerifyingInput.create = function create(properties) {
114032
+ return new MessageVerifyingInput(properties);
114033
+ };
114034
+
114035
+ /**
114036
+ * Encodes the specified MessageVerifyingInput message. Does not implicitly {@link TW.Solana.Proto.MessageVerifyingInput.verify|verify} messages.
114037
+ * @function encode
114038
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114039
+ * @static
114040
+ * @param {TW.Solana.Proto.IMessageVerifyingInput} message MessageVerifyingInput message or plain object to encode
114041
+ * @param {$protobuf.Writer} [writer] Writer to encode to
114042
+ * @returns {$protobuf.Writer} Writer
114043
+ */
114044
+ MessageVerifyingInput.encode = function encode(message, writer) {
114045
+ if (!writer)
114046
+ writer = $Writer.create();
114047
+ if (message.message != null && Object.hasOwnProperty.call(message, "message"))
114048
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.message);
114049
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
114050
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKey);
114051
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
114052
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.signature);
114053
+ return writer;
114054
+ };
114055
+
114056
+ /**
114057
+ * Decodes a MessageVerifyingInput message from the specified reader or buffer.
114058
+ * @function decode
114059
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114060
+ * @static
114061
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
114062
+ * @param {number} [length] Message length if known beforehand
114063
+ * @returns {TW.Solana.Proto.MessageVerifyingInput} MessageVerifyingInput
114064
+ * @throws {Error} If the payload is not a reader or valid buffer
114065
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
114066
+ */
114067
+ MessageVerifyingInput.decode = function decode(reader, length) {
114068
+ if (!(reader instanceof $Reader))
114069
+ reader = $Reader.create(reader);
114070
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.MessageVerifyingInput();
114071
+ while (reader.pos < end) {
114072
+ var tag = reader.uint32();
114073
+ switch (tag >>> 3) {
114074
+ case 1:
114075
+ message.message = reader.string();
114076
+ break;
114077
+ case 2:
114078
+ message.publicKey = reader.bytes();
114079
+ break;
114080
+ case 3:
114081
+ message.signature = reader.string();
114082
+ break;
114083
+ default:
114084
+ reader.skipType(tag & 7);
114085
+ break;
114086
+ }
114087
+ }
114088
+ return message;
114089
+ };
114090
+
114091
+ /**
114092
+ * Verifies a MessageVerifyingInput message.
114093
+ * @function verify
114094
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114095
+ * @static
114096
+ * @param {Object.<string,*>} message Plain object to verify
114097
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
114098
+ */
114099
+ MessageVerifyingInput.verify = function verify(message) {
114100
+ if (typeof message !== "object" || message === null)
114101
+ return "object expected";
114102
+ if (message.message != null && message.hasOwnProperty("message"))
114103
+ if (!$util.isString(message.message))
114104
+ return "message: string expected";
114105
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
114106
+ if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
114107
+ return "publicKey: buffer expected";
114108
+ if (message.signature != null && message.hasOwnProperty("signature"))
114109
+ if (!$util.isString(message.signature))
114110
+ return "signature: string expected";
114111
+ return null;
114112
+ };
114113
+
114114
+ /**
114115
+ * Creates a MessageVerifyingInput message from a plain object. Also converts values to their respective internal types.
114116
+ * @function fromObject
114117
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114118
+ * @static
114119
+ * @param {Object.<string,*>} object Plain object
114120
+ * @returns {TW.Solana.Proto.MessageVerifyingInput} MessageVerifyingInput
114121
+ */
114122
+ MessageVerifyingInput.fromObject = function fromObject(object) {
114123
+ if (object instanceof $root.TW.Solana.Proto.MessageVerifyingInput)
114124
+ return object;
114125
+ var message = new $root.TW.Solana.Proto.MessageVerifyingInput();
114126
+ if (object.message != null)
114127
+ message.message = String(object.message);
114128
+ if (object.publicKey != null)
114129
+ if (typeof object.publicKey === "string")
114130
+ $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
114131
+ else if (object.publicKey.length)
114132
+ message.publicKey = object.publicKey;
114133
+ if (object.signature != null)
114134
+ message.signature = String(object.signature);
114135
+ return message;
114136
+ };
114137
+
114138
+ /**
114139
+ * Creates a plain object from a MessageVerifyingInput message. Also converts values to other types if specified.
114140
+ * @function toObject
114141
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114142
+ * @static
114143
+ * @param {TW.Solana.Proto.MessageVerifyingInput} message MessageVerifyingInput
114144
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
114145
+ * @returns {Object.<string,*>} Plain object
114146
+ */
114147
+ MessageVerifyingInput.toObject = function toObject(message, options) {
114148
+ if (!options)
114149
+ options = {};
114150
+ var object = {};
114151
+ if (options.defaults) {
114152
+ object.message = "";
114153
+ if (options.bytes === String)
114154
+ object.publicKey = "";
114155
+ else {
114156
+ object.publicKey = [];
114157
+ if (options.bytes !== Array)
114158
+ object.publicKey = $util.newBuffer(object.publicKey);
114159
+ }
114160
+ object.signature = "";
114161
+ }
114162
+ if (message.message != null && message.hasOwnProperty("message"))
114163
+ object.message = message.message;
114164
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
114165
+ object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
114166
+ if (message.signature != null && message.hasOwnProperty("signature"))
114167
+ object.signature = message.signature;
114168
+ return object;
114169
+ };
114170
+
114171
+ /**
114172
+ * Converts this MessageVerifyingInput to JSON.
114173
+ * @function toJSON
114174
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114175
+ * @instance
114176
+ * @returns {Object.<string,*>} JSON object
114177
+ */
114178
+ MessageVerifyingInput.prototype.toJSON = function toJSON() {
114179
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
114180
+ };
114181
+
114182
+ return MessageVerifyingInput;
111901
114183
  })();
111902
114184
 
111903
114185
  return Proto;
@@ -128934,6 +131216,7 @@
128934
131216
  * @property {Long|null} [expiration] Transaction expiration
128935
131217
  * @property {TW.Tron.Proto.IBlockHeader|null} [blockHeader] Transaction blockHeader
128936
131218
  * @property {Long|null} [feeLimit] Transaction feeLimit
131219
+ * @property {string|null} [memo] Transaction memo
128937
131220
  * @property {TW.Tron.Proto.ITransferContract|null} [transfer] Transaction transfer
128938
131221
  * @property {TW.Tron.Proto.ITransferAssetContract|null} [transferAsset] Transaction transferAsset
128939
131222
  * @property {TW.Tron.Proto.IFreezeBalanceContract|null} [freezeBalance] Transaction freezeBalance
@@ -128998,6 +131281,14 @@
128998
131281
  */
128999
131282
  Transaction.prototype.feeLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
129000
131283
 
131284
+ /**
131285
+ * Transaction memo.
131286
+ * @member {string} memo
131287
+ * @memberof TW.Tron.Proto.Transaction
131288
+ * @instance
131289
+ */
131290
+ Transaction.prototype.memo = "";
131291
+
129001
131292
  /**
129002
131293
  * Transaction transfer.
129003
131294
  * @member {TW.Tron.Proto.ITransferContract|null|undefined} transfer
@@ -129164,6 +131455,8 @@
129164
131455
  $root.TW.Tron.Proto.BlockHeader.encode(message.blockHeader, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
129165
131456
  if (message.feeLimit != null && Object.hasOwnProperty.call(message, "feeLimit"))
129166
131457
  writer.uint32(/* id 4, wireType 0 =*/32).int64(message.feeLimit);
131458
+ if (message.memo != null && Object.hasOwnProperty.call(message, "memo"))
131459
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.memo);
129167
131460
  if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer"))
129168
131461
  $root.TW.Tron.Proto.TransferContract.encode(message.transfer, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
129169
131462
  if (message.transferAsset != null && Object.hasOwnProperty.call(message, "transferAsset"))
@@ -129227,6 +131520,9 @@
129227
131520
  case 4:
129228
131521
  message.feeLimit = reader.int64();
129229
131522
  break;
131523
+ case 5:
131524
+ message.memo = reader.string();
131525
+ break;
129230
131526
  case 10:
129231
131527
  message.transfer = $root.TW.Tron.Proto.TransferContract.decode(reader, reader.uint32());
129232
131528
  break;
@@ -129306,6 +131602,9 @@
129306
131602
  if (message.feeLimit != null && message.hasOwnProperty("feeLimit"))
129307
131603
  if (!$util.isInteger(message.feeLimit) && !(message.feeLimit && $util.isInteger(message.feeLimit.low) && $util.isInteger(message.feeLimit.high)))
129308
131604
  return "feeLimit: integer|Long expected";
131605
+ if (message.memo != null && message.hasOwnProperty("memo"))
131606
+ if (!$util.isString(message.memo))
131607
+ return "memo: string expected";
129309
131608
  if (message.transfer != null && message.hasOwnProperty("transfer")) {
129310
131609
  properties.contractOneof = 1;
129311
131610
  {
@@ -129501,6 +131800,8 @@
129501
131800
  message.feeLimit = object.feeLimit;
129502
131801
  else if (typeof object.feeLimit === "object")
129503
131802
  message.feeLimit = new $util.LongBits(object.feeLimit.low >>> 0, object.feeLimit.high >>> 0).toNumber();
131803
+ if (object.memo != null)
131804
+ message.memo = String(object.memo);
129504
131805
  if (object.transfer != null) {
129505
131806
  if (typeof object.transfer !== "object")
129506
131807
  throw TypeError(".TW.Tron.Proto.Transaction.transfer: object expected");
@@ -129609,6 +131910,7 @@
129609
131910
  object.feeLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
129610
131911
  } else
129611
131912
  object.feeLimit = options.longs === String ? "0" : 0;
131913
+ object.memo = "";
129612
131914
  }
129613
131915
  if (message.timestamp != null && message.hasOwnProperty("timestamp"))
129614
131916
  if (typeof message.timestamp === "number")
@@ -129627,6 +131929,8 @@
129627
131929
  object.feeLimit = options.longs === String ? String(message.feeLimit) : message.feeLimit;
129628
131930
  else
129629
131931
  object.feeLimit = options.longs === String ? $util.Long.prototype.toString.call(message.feeLimit) : options.longs === Number ? new $util.LongBits(message.feeLimit.low >>> 0, message.feeLimit.high >>> 0).toNumber() : message.feeLimit;
131932
+ if (message.memo != null && message.hasOwnProperty("memo"))
131933
+ object.memo = message.memo;
129630
131934
  if (message.transfer != null && message.hasOwnProperty("transfer")) {
129631
131935
  object.transfer = $root.TW.Tron.Proto.TransferContract.toObject(message.transfer, options);
129632
131936
  if (options.oneofs)