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

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.
@@ -3820,6 +3820,223 @@
3820
3820
  return TokenTransferCoinsMessage;
3821
3821
  })();
3822
3822
 
3823
+ Proto.FungibleAssetTransferMessage = (function() {
3824
+
3825
+ /**
3826
+ * Properties of a FungibleAssetTransferMessage.
3827
+ * @memberof TW.Aptos.Proto
3828
+ * @interface IFungibleAssetTransferMessage
3829
+ * @property {string|null} [metadataAddress] FungibleAssetTransferMessage metadataAddress
3830
+ * @property {string|null} [to] FungibleAssetTransferMessage to
3831
+ * @property {Long|null} [amount] FungibleAssetTransferMessage amount
3832
+ */
3833
+
3834
+ /**
3835
+ * Constructs a new FungibleAssetTransferMessage.
3836
+ * @memberof TW.Aptos.Proto
3837
+ * @classdesc Represents a FungibleAssetTransferMessage.
3838
+ * @implements IFungibleAssetTransferMessage
3839
+ * @constructor
3840
+ * @param {TW.Aptos.Proto.IFungibleAssetTransferMessage=} [properties] Properties to set
3841
+ */
3842
+ function FungibleAssetTransferMessage(properties) {
3843
+ if (properties)
3844
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3845
+ if (properties[keys[i]] != null)
3846
+ this[keys[i]] = properties[keys[i]];
3847
+ }
3848
+
3849
+ /**
3850
+ * FungibleAssetTransferMessage metadataAddress.
3851
+ * @member {string} metadataAddress
3852
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3853
+ * @instance
3854
+ */
3855
+ FungibleAssetTransferMessage.prototype.metadataAddress = "";
3856
+
3857
+ /**
3858
+ * FungibleAssetTransferMessage to.
3859
+ * @member {string} to
3860
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3861
+ * @instance
3862
+ */
3863
+ FungibleAssetTransferMessage.prototype.to = "";
3864
+
3865
+ /**
3866
+ * FungibleAssetTransferMessage amount.
3867
+ * @member {Long} amount
3868
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3869
+ * @instance
3870
+ */
3871
+ FungibleAssetTransferMessage.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3872
+
3873
+ /**
3874
+ * Creates a new FungibleAssetTransferMessage instance using the specified properties.
3875
+ * @function create
3876
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3877
+ * @static
3878
+ * @param {TW.Aptos.Proto.IFungibleAssetTransferMessage=} [properties] Properties to set
3879
+ * @returns {TW.Aptos.Proto.FungibleAssetTransferMessage} FungibleAssetTransferMessage instance
3880
+ */
3881
+ FungibleAssetTransferMessage.create = function create(properties) {
3882
+ return new FungibleAssetTransferMessage(properties);
3883
+ };
3884
+
3885
+ /**
3886
+ * Encodes the specified FungibleAssetTransferMessage message. Does not implicitly {@link TW.Aptos.Proto.FungibleAssetTransferMessage.verify|verify} messages.
3887
+ * @function encode
3888
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3889
+ * @static
3890
+ * @param {TW.Aptos.Proto.IFungibleAssetTransferMessage} message FungibleAssetTransferMessage message or plain object to encode
3891
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3892
+ * @returns {$protobuf.Writer} Writer
3893
+ */
3894
+ FungibleAssetTransferMessage.encode = function encode(message, writer) {
3895
+ if (!writer)
3896
+ writer = $Writer.create();
3897
+ if (message.metadataAddress != null && Object.hasOwnProperty.call(message, "metadataAddress"))
3898
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataAddress);
3899
+ if (message.to != null && Object.hasOwnProperty.call(message, "to"))
3900
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.to);
3901
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
3902
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.amount);
3903
+ return writer;
3904
+ };
3905
+
3906
+ /**
3907
+ * Decodes a FungibleAssetTransferMessage message from the specified reader or buffer.
3908
+ * @function decode
3909
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3910
+ * @static
3911
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3912
+ * @param {number} [length] Message length if known beforehand
3913
+ * @returns {TW.Aptos.Proto.FungibleAssetTransferMessage} FungibleAssetTransferMessage
3914
+ * @throws {Error} If the payload is not a reader or valid buffer
3915
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3916
+ */
3917
+ FungibleAssetTransferMessage.decode = function decode(reader, length) {
3918
+ if (!(reader instanceof $Reader))
3919
+ reader = $Reader.create(reader);
3920
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.FungibleAssetTransferMessage();
3921
+ while (reader.pos < end) {
3922
+ var tag = reader.uint32();
3923
+ switch (tag >>> 3) {
3924
+ case 1:
3925
+ message.metadataAddress = reader.string();
3926
+ break;
3927
+ case 2:
3928
+ message.to = reader.string();
3929
+ break;
3930
+ case 3:
3931
+ message.amount = reader.uint64();
3932
+ break;
3933
+ default:
3934
+ reader.skipType(tag & 7);
3935
+ break;
3936
+ }
3937
+ }
3938
+ return message;
3939
+ };
3940
+
3941
+ /**
3942
+ * Verifies a FungibleAssetTransferMessage message.
3943
+ * @function verify
3944
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3945
+ * @static
3946
+ * @param {Object.<string,*>} message Plain object to verify
3947
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3948
+ */
3949
+ FungibleAssetTransferMessage.verify = function verify(message) {
3950
+ if (typeof message !== "object" || message === null)
3951
+ return "object expected";
3952
+ if (message.metadataAddress != null && message.hasOwnProperty("metadataAddress"))
3953
+ if (!$util.isString(message.metadataAddress))
3954
+ return "metadataAddress: string expected";
3955
+ if (message.to != null && message.hasOwnProperty("to"))
3956
+ if (!$util.isString(message.to))
3957
+ return "to: string expected";
3958
+ if (message.amount != null && message.hasOwnProperty("amount"))
3959
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
3960
+ return "amount: integer|Long expected";
3961
+ return null;
3962
+ };
3963
+
3964
+ /**
3965
+ * Creates a FungibleAssetTransferMessage message from a plain object. Also converts values to their respective internal types.
3966
+ * @function fromObject
3967
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3968
+ * @static
3969
+ * @param {Object.<string,*>} object Plain object
3970
+ * @returns {TW.Aptos.Proto.FungibleAssetTransferMessage} FungibleAssetTransferMessage
3971
+ */
3972
+ FungibleAssetTransferMessage.fromObject = function fromObject(object) {
3973
+ if (object instanceof $root.TW.Aptos.Proto.FungibleAssetTransferMessage)
3974
+ return object;
3975
+ var message = new $root.TW.Aptos.Proto.FungibleAssetTransferMessage();
3976
+ if (object.metadataAddress != null)
3977
+ message.metadataAddress = String(object.metadataAddress);
3978
+ if (object.to != null)
3979
+ message.to = String(object.to);
3980
+ if (object.amount != null)
3981
+ if ($util.Long)
3982
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
3983
+ else if (typeof object.amount === "string")
3984
+ message.amount = parseInt(object.amount, 10);
3985
+ else if (typeof object.amount === "number")
3986
+ message.amount = object.amount;
3987
+ else if (typeof object.amount === "object")
3988
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
3989
+ return message;
3990
+ };
3991
+
3992
+ /**
3993
+ * Creates a plain object from a FungibleAssetTransferMessage message. Also converts values to other types if specified.
3994
+ * @function toObject
3995
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
3996
+ * @static
3997
+ * @param {TW.Aptos.Proto.FungibleAssetTransferMessage} message FungibleAssetTransferMessage
3998
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3999
+ * @returns {Object.<string,*>} Plain object
4000
+ */
4001
+ FungibleAssetTransferMessage.toObject = function toObject(message, options) {
4002
+ if (!options)
4003
+ options = {};
4004
+ var object = {};
4005
+ if (options.defaults) {
4006
+ object.metadataAddress = "";
4007
+ object.to = "";
4008
+ if ($util.Long) {
4009
+ var long = new $util.Long(0, 0, true);
4010
+ object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4011
+ } else
4012
+ object.amount = options.longs === String ? "0" : 0;
4013
+ }
4014
+ if (message.metadataAddress != null && message.hasOwnProperty("metadataAddress"))
4015
+ object.metadataAddress = message.metadataAddress;
4016
+ if (message.to != null && message.hasOwnProperty("to"))
4017
+ object.to = message.to;
4018
+ if (message.amount != null && message.hasOwnProperty("amount"))
4019
+ if (typeof message.amount === "number")
4020
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
4021
+ else
4022
+ object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
4023
+ return object;
4024
+ };
4025
+
4026
+ /**
4027
+ * Converts this FungibleAssetTransferMessage to JSON.
4028
+ * @function toJSON
4029
+ * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
4030
+ * @instance
4031
+ * @returns {Object.<string,*>} JSON object
4032
+ */
4033
+ FungibleAssetTransferMessage.prototype.toJSON = function toJSON() {
4034
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4035
+ };
4036
+
4037
+ return FungibleAssetTransferMessage;
4038
+ })();
4039
+
3823
4040
  Proto.ManagedTokensRegisterMessage = (function() {
3824
4041
 
3825
4042
  /**
@@ -6020,6 +6237,8 @@
6020
6237
  * @property {TW.Aptos.Proto.IManagedTokensRegisterMessage|null} [registerToken] SigningInput registerToken
6021
6238
  * @property {TW.Aptos.Proto.ILiquidStaking|null} [liquidStakingMessage] SigningInput liquidStakingMessage
6022
6239
  * @property {TW.Aptos.Proto.ITokenTransferCoinsMessage|null} [tokenTransferCoins] SigningInput tokenTransferCoins
6240
+ * @property {TW.Aptos.Proto.IFungibleAssetTransferMessage|null} [fungibleAssetTransfer] SigningInput fungibleAssetTransfer
6241
+ * @property {string|null} [abi] SigningInput abi
6023
6242
  */
6024
6243
 
6025
6244
  /**
@@ -6157,17 +6376,33 @@
6157
6376
  */
6158
6377
  SigningInput.prototype.tokenTransferCoins = null;
6159
6378
 
6379
+ /**
6380
+ * SigningInput fungibleAssetTransfer.
6381
+ * @member {TW.Aptos.Proto.IFungibleAssetTransferMessage|null|undefined} fungibleAssetTransfer
6382
+ * @memberof TW.Aptos.Proto.SigningInput
6383
+ * @instance
6384
+ */
6385
+ SigningInput.prototype.fungibleAssetTransfer = null;
6386
+
6387
+ /**
6388
+ * SigningInput abi.
6389
+ * @member {string} abi
6390
+ * @memberof TW.Aptos.Proto.SigningInput
6391
+ * @instance
6392
+ */
6393
+ SigningInput.prototype.abi = "";
6394
+
6160
6395
  // OneOf field names bound to virtual getters and setters
6161
6396
  var $oneOfFields;
6162
6397
 
6163
6398
  /**
6164
6399
  * SigningInput transactionPayload.
6165
- * @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|"liquidStakingMessage"|"tokenTransferCoins"|undefined} transactionPayload
6400
+ * @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|"liquidStakingMessage"|"tokenTransferCoins"|"fungibleAssetTransfer"|undefined} transactionPayload
6166
6401
  * @memberof TW.Aptos.Proto.SigningInput
6167
6402
  * @instance
6168
6403
  */
6169
6404
  Object.defineProperty(SigningInput.prototype, "transactionPayload", {
6170
- get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "registerToken", "liquidStakingMessage", "tokenTransferCoins"]),
6405
+ get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "registerToken", "liquidStakingMessage", "tokenTransferCoins", "fungibleAssetTransfer"]),
6171
6406
  set: $util.oneOfSetter($oneOfFields)
6172
6407
  });
6173
6408
 
@@ -6225,6 +6460,10 @@
6225
6460
  $root.TW.Aptos.Proto.LiquidStaking.encode(message.liquidStakingMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
6226
6461
  if (message.tokenTransferCoins != null && Object.hasOwnProperty.call(message, "tokenTransferCoins"))
6227
6462
  $root.TW.Aptos.Proto.TokenTransferCoinsMessage.encode(message.tokenTransferCoins, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
6463
+ if (message.fungibleAssetTransfer != null && Object.hasOwnProperty.call(message, "fungibleAssetTransfer"))
6464
+ $root.TW.Aptos.Proto.FungibleAssetTransferMessage.encode(message.fungibleAssetTransfer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
6465
+ if (message.abi != null && Object.hasOwnProperty.call(message, "abi"))
6466
+ writer.uint32(/* id 21, wireType 2 =*/170).string(message.abi);
6228
6467
  return writer;
6229
6468
  };
6230
6469
 
@@ -6291,6 +6530,12 @@
6291
6530
  case 15:
6292
6531
  message.tokenTransferCoins = $root.TW.Aptos.Proto.TokenTransferCoinsMessage.decode(reader, reader.uint32());
6293
6532
  break;
6533
+ case 16:
6534
+ message.fungibleAssetTransfer = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.decode(reader, reader.uint32());
6535
+ break;
6536
+ case 21:
6537
+ message.abi = reader.string();
6538
+ break;
6294
6539
  default:
6295
6540
  reader.skipType(tag & 7);
6296
6541
  break;
@@ -6403,6 +6648,19 @@
6403
6648
  return "tokenTransferCoins." + error;
6404
6649
  }
6405
6650
  }
6651
+ if (message.fungibleAssetTransfer != null && message.hasOwnProperty("fungibleAssetTransfer")) {
6652
+ if (properties.transactionPayload === 1)
6653
+ return "transactionPayload: multiple values";
6654
+ properties.transactionPayload = 1;
6655
+ {
6656
+ var error = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.verify(message.fungibleAssetTransfer);
6657
+ if (error)
6658
+ return "fungibleAssetTransfer." + error;
6659
+ }
6660
+ }
6661
+ if (message.abi != null && message.hasOwnProperty("abi"))
6662
+ if (!$util.isString(message.abi))
6663
+ return "abi: string expected";
6406
6664
  return null;
6407
6665
  };
6408
6666
 
@@ -6500,6 +6758,13 @@
6500
6758
  throw TypeError(".TW.Aptos.Proto.SigningInput.tokenTransferCoins: object expected");
6501
6759
  message.tokenTransferCoins = $root.TW.Aptos.Proto.TokenTransferCoinsMessage.fromObject(object.tokenTransferCoins);
6502
6760
  }
6761
+ if (object.fungibleAssetTransfer != null) {
6762
+ if (typeof object.fungibleAssetTransfer !== "object")
6763
+ throw TypeError(".TW.Aptos.Proto.SigningInput.fungibleAssetTransfer: object expected");
6764
+ message.fungibleAssetTransfer = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.fromObject(object.fungibleAssetTransfer);
6765
+ }
6766
+ if (object.abi != null)
6767
+ message.abi = String(object.abi);
6503
6768
  return message;
6504
6769
  };
6505
6770
 
@@ -6547,6 +6812,7 @@
6547
6812
  object.privateKey = $util.newBuffer(object.privateKey);
6548
6813
  }
6549
6814
  object.anyEncoded = "";
6815
+ object.abi = "";
6550
6816
  }
6551
6817
  if (message.sender != null && message.hasOwnProperty("sender"))
6552
6818
  object.sender = message.sender;
@@ -6611,6 +6877,13 @@
6611
6877
  if (options.oneofs)
6612
6878
  object.transactionPayload = "tokenTransferCoins";
6613
6879
  }
6880
+ if (message.fungibleAssetTransfer != null && message.hasOwnProperty("fungibleAssetTransfer")) {
6881
+ object.fungibleAssetTransfer = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.toObject(message.fungibleAssetTransfer, options);
6882
+ if (options.oneofs)
6883
+ object.transactionPayload = "fungibleAssetTransfer";
6884
+ }
6885
+ if (message.abi != null && message.hasOwnProperty("abi"))
6886
+ object.abi = message.abi;
6614
6887
  return object;
6615
6888
  };
6616
6889
 
@@ -7258,50 +7531,43 @@
7258
7531
  return Aptos;
7259
7532
  })();
7260
7533
 
7261
- TW.Barz = (function() {
7534
+ TW.BabylonStaking = (function() {
7262
7535
 
7263
7536
  /**
7264
- * Namespace Barz.
7537
+ * Namespace BabylonStaking.
7265
7538
  * @memberof TW
7266
7539
  * @namespace
7267
7540
  */
7268
- var Barz = {};
7541
+ var BabylonStaking = {};
7269
7542
 
7270
- Barz.Proto = (function() {
7543
+ BabylonStaking.Proto = (function() {
7271
7544
 
7272
7545
  /**
7273
7546
  * Namespace Proto.
7274
- * @memberof TW.Barz
7547
+ * @memberof TW.BabylonStaking
7275
7548
  * @namespace
7276
7549
  */
7277
7550
  var Proto = {};
7278
7551
 
7279
- Proto.ContractAddressInput = (function() {
7552
+ Proto.PublicKeySignature = (function() {
7280
7553
 
7281
7554
  /**
7282
- * Properties of a ContractAddressInput.
7283
- * @memberof TW.Barz.Proto
7284
- * @interface IContractAddressInput
7285
- * @property {string|null} [entryPoint] ContractAddressInput entryPoint
7286
- * @property {string|null} [factory] ContractAddressInput factory
7287
- * @property {string|null} [accountFacet] ContractAddressInput accountFacet
7288
- * @property {string|null} [verificationFacet] ContractAddressInput verificationFacet
7289
- * @property {string|null} [facetRegistry] ContractAddressInput facetRegistry
7290
- * @property {string|null} [defaultFallback] ContractAddressInput defaultFallback
7291
- * @property {string|null} [bytecode] ContractAddressInput bytecode
7292
- * @property {string|null} [publicKey] ContractAddressInput publicKey
7293
- * @property {number|null} [salt] ContractAddressInput salt
7555
+ * Properties of a PublicKeySignature.
7556
+ * @memberof TW.BabylonStaking.Proto
7557
+ * @interface IPublicKeySignature
7558
+ * @property {Uint8Array|null} [publicKey] PublicKeySignature publicKey
7559
+ * @property {Uint8Array|null} [signature] PublicKeySignature signature
7294
7560
  */
7295
7561
 
7296
7562
  /**
7297
- * Constructs a new ContractAddressInput.
7298
- * @memberof TW.Barz.Proto
7299
- * @classdesc Represents a ContractAddressInput.
7300
- * @implements IContractAddressInput
7563
+ * Constructs a new PublicKeySignature.
7564
+ * @memberof TW.BabylonStaking.Proto
7565
+ * @classdesc Represents a PublicKeySignature.
7566
+ * @implements IPublicKeySignature
7301
7567
  * @constructor
7302
- * @param {TW.Barz.Proto.IContractAddressInput=} [properties] Properties to set
7568
+ * @param {TW.BabylonStaking.Proto.IPublicKeySignature=} [properties] Properties to set
7303
7569
  */
7304
- function ContractAddressInput(properties) {
7570
+ function PublicKeySignature(properties) {
7305
7571
  if (properties)
7306
7572
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7307
7573
  if (properties[keys[i]] != null)
@@ -7309,53 +7575,2323 @@
7309
7575
  }
7310
7576
 
7311
7577
  /**
7312
- * ContractAddressInput entryPoint.
7313
- * @member {string} entryPoint
7314
- * @memberof TW.Barz.Proto.ContractAddressInput
7315
- * @instance
7316
- */
7317
- ContractAddressInput.prototype.entryPoint = "";
7318
-
7319
- /**
7320
- * ContractAddressInput factory.
7321
- * @member {string} factory
7322
- * @memberof TW.Barz.Proto.ContractAddressInput
7578
+ * PublicKeySignature publicKey.
7579
+ * @member {Uint8Array} publicKey
7580
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7323
7581
  * @instance
7324
7582
  */
7325
- ContractAddressInput.prototype.factory = "";
7583
+ PublicKeySignature.prototype.publicKey = $util.newBuffer([]);
7326
7584
 
7327
7585
  /**
7328
- * ContractAddressInput accountFacet.
7329
- * @member {string} accountFacet
7330
- * @memberof TW.Barz.Proto.ContractAddressInput
7586
+ * PublicKeySignature signature.
7587
+ * @member {Uint8Array} signature
7588
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7331
7589
  * @instance
7332
7590
  */
7333
- ContractAddressInput.prototype.accountFacet = "";
7591
+ PublicKeySignature.prototype.signature = $util.newBuffer([]);
7334
7592
 
7335
7593
  /**
7336
- * ContractAddressInput verificationFacet.
7337
- * @member {string} verificationFacet
7338
- * @memberof TW.Barz.Proto.ContractAddressInput
7339
- * @instance
7594
+ * Creates a new PublicKeySignature instance using the specified properties.
7595
+ * @function create
7596
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7597
+ * @static
7598
+ * @param {TW.BabylonStaking.Proto.IPublicKeySignature=} [properties] Properties to set
7599
+ * @returns {TW.BabylonStaking.Proto.PublicKeySignature} PublicKeySignature instance
7340
7600
  */
7341
- ContractAddressInput.prototype.verificationFacet = "";
7601
+ PublicKeySignature.create = function create(properties) {
7602
+ return new PublicKeySignature(properties);
7603
+ };
7342
7604
 
7343
7605
  /**
7344
- * ContractAddressInput facetRegistry.
7345
- * @member {string} facetRegistry
7346
- * @memberof TW.Barz.Proto.ContractAddressInput
7347
- * @instance
7606
+ * Encodes the specified PublicKeySignature message. Does not implicitly {@link TW.BabylonStaking.Proto.PublicKeySignature.verify|verify} messages.
7607
+ * @function encode
7608
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7609
+ * @static
7610
+ * @param {TW.BabylonStaking.Proto.IPublicKeySignature} message PublicKeySignature message or plain object to encode
7611
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7612
+ * @returns {$protobuf.Writer} Writer
7348
7613
  */
7349
- ContractAddressInput.prototype.facetRegistry = "";
7614
+ PublicKeySignature.encode = function encode(message, writer) {
7615
+ if (!writer)
7616
+ writer = $Writer.create();
7617
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
7618
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey);
7619
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
7620
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature);
7621
+ return writer;
7622
+ };
7350
7623
 
7351
7624
  /**
7352
- * ContractAddressInput defaultFallback.
7353
- * @member {string} defaultFallback
7354
- * @memberof TW.Barz.Proto.ContractAddressInput
7355
- * @instance
7625
+ * Decodes a PublicKeySignature message from the specified reader or buffer.
7626
+ * @function decode
7627
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7628
+ * @static
7629
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7630
+ * @param {number} [length] Message length if known beforehand
7631
+ * @returns {TW.BabylonStaking.Proto.PublicKeySignature} PublicKeySignature
7632
+ * @throws {Error} If the payload is not a reader or valid buffer
7633
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7356
7634
  */
7357
- ContractAddressInput.prototype.defaultFallback = "";
7358
-
7635
+ PublicKeySignature.decode = function decode(reader, length) {
7636
+ if (!(reader instanceof $Reader))
7637
+ reader = $Reader.create(reader);
7638
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.PublicKeySignature();
7639
+ while (reader.pos < end) {
7640
+ var tag = reader.uint32();
7641
+ switch (tag >>> 3) {
7642
+ case 1:
7643
+ message.publicKey = reader.bytes();
7644
+ break;
7645
+ case 2:
7646
+ message.signature = reader.bytes();
7647
+ break;
7648
+ default:
7649
+ reader.skipType(tag & 7);
7650
+ break;
7651
+ }
7652
+ }
7653
+ return message;
7654
+ };
7655
+
7656
+ /**
7657
+ * Verifies a PublicKeySignature message.
7658
+ * @function verify
7659
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7660
+ * @static
7661
+ * @param {Object.<string,*>} message Plain object to verify
7662
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
7663
+ */
7664
+ PublicKeySignature.verify = function verify(message) {
7665
+ if (typeof message !== "object" || message === null)
7666
+ return "object expected";
7667
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
7668
+ if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
7669
+ return "publicKey: buffer expected";
7670
+ if (message.signature != null && message.hasOwnProperty("signature"))
7671
+ if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
7672
+ return "signature: buffer expected";
7673
+ return null;
7674
+ };
7675
+
7676
+ /**
7677
+ * Creates a PublicKeySignature message from a plain object. Also converts values to their respective internal types.
7678
+ * @function fromObject
7679
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7680
+ * @static
7681
+ * @param {Object.<string,*>} object Plain object
7682
+ * @returns {TW.BabylonStaking.Proto.PublicKeySignature} PublicKeySignature
7683
+ */
7684
+ PublicKeySignature.fromObject = function fromObject(object) {
7685
+ if (object instanceof $root.TW.BabylonStaking.Proto.PublicKeySignature)
7686
+ return object;
7687
+ var message = new $root.TW.BabylonStaking.Proto.PublicKeySignature();
7688
+ if (object.publicKey != null)
7689
+ if (typeof object.publicKey === "string")
7690
+ $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
7691
+ else if (object.publicKey.length)
7692
+ message.publicKey = object.publicKey;
7693
+ if (object.signature != null)
7694
+ if (typeof object.signature === "string")
7695
+ $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
7696
+ else if (object.signature.length)
7697
+ message.signature = object.signature;
7698
+ return message;
7699
+ };
7700
+
7701
+ /**
7702
+ * Creates a plain object from a PublicKeySignature message. Also converts values to other types if specified.
7703
+ * @function toObject
7704
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7705
+ * @static
7706
+ * @param {TW.BabylonStaking.Proto.PublicKeySignature} message PublicKeySignature
7707
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
7708
+ * @returns {Object.<string,*>} Plain object
7709
+ */
7710
+ PublicKeySignature.toObject = function toObject(message, options) {
7711
+ if (!options)
7712
+ options = {};
7713
+ var object = {};
7714
+ if (options.defaults) {
7715
+ if (options.bytes === String)
7716
+ object.publicKey = "";
7717
+ else {
7718
+ object.publicKey = [];
7719
+ if (options.bytes !== Array)
7720
+ object.publicKey = $util.newBuffer(object.publicKey);
7721
+ }
7722
+ if (options.bytes === String)
7723
+ object.signature = "";
7724
+ else {
7725
+ object.signature = [];
7726
+ if (options.bytes !== Array)
7727
+ object.signature = $util.newBuffer(object.signature);
7728
+ }
7729
+ }
7730
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
7731
+ 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;
7732
+ if (message.signature != null && message.hasOwnProperty("signature"))
7733
+ 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;
7734
+ return object;
7735
+ };
7736
+
7737
+ /**
7738
+ * Converts this PublicKeySignature to JSON.
7739
+ * @function toJSON
7740
+ * @memberof TW.BabylonStaking.Proto.PublicKeySignature
7741
+ * @instance
7742
+ * @returns {Object.<string,*>} JSON object
7743
+ */
7744
+ PublicKeySignature.prototype.toJSON = function toJSON() {
7745
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
7746
+ };
7747
+
7748
+ return PublicKeySignature;
7749
+ })();
7750
+
7751
+ Proto.StakingInfo = (function() {
7752
+
7753
+ /**
7754
+ * Properties of a StakingInfo.
7755
+ * @memberof TW.BabylonStaking.Proto
7756
+ * @interface IStakingInfo
7757
+ * @property {Uint8Array|null} [stakerPublicKey] StakingInfo stakerPublicKey
7758
+ * @property {Uint8Array|null} [finalityProviderPublicKey] StakingInfo finalityProviderPublicKey
7759
+ * @property {number|null} [stakingTime] StakingInfo stakingTime
7760
+ * @property {Array.<Uint8Array>|null} [covenantCommitteePublicKeys] StakingInfo covenantCommitteePublicKeys
7761
+ * @property {number|null} [covenantQuorum] StakingInfo covenantQuorum
7762
+ */
7763
+
7764
+ /**
7765
+ * Constructs a new StakingInfo.
7766
+ * @memberof TW.BabylonStaking.Proto
7767
+ * @classdesc Represents a StakingInfo.
7768
+ * @implements IStakingInfo
7769
+ * @constructor
7770
+ * @param {TW.BabylonStaking.Proto.IStakingInfo=} [properties] Properties to set
7771
+ */
7772
+ function StakingInfo(properties) {
7773
+ this.covenantCommitteePublicKeys = [];
7774
+ if (properties)
7775
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7776
+ if (properties[keys[i]] != null)
7777
+ this[keys[i]] = properties[keys[i]];
7778
+ }
7779
+
7780
+ /**
7781
+ * StakingInfo stakerPublicKey.
7782
+ * @member {Uint8Array} stakerPublicKey
7783
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7784
+ * @instance
7785
+ */
7786
+ StakingInfo.prototype.stakerPublicKey = $util.newBuffer([]);
7787
+
7788
+ /**
7789
+ * StakingInfo finalityProviderPublicKey.
7790
+ * @member {Uint8Array} finalityProviderPublicKey
7791
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7792
+ * @instance
7793
+ */
7794
+ StakingInfo.prototype.finalityProviderPublicKey = $util.newBuffer([]);
7795
+
7796
+ /**
7797
+ * StakingInfo stakingTime.
7798
+ * @member {number} stakingTime
7799
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7800
+ * @instance
7801
+ */
7802
+ StakingInfo.prototype.stakingTime = 0;
7803
+
7804
+ /**
7805
+ * StakingInfo covenantCommitteePublicKeys.
7806
+ * @member {Array.<Uint8Array>} covenantCommitteePublicKeys
7807
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7808
+ * @instance
7809
+ */
7810
+ StakingInfo.prototype.covenantCommitteePublicKeys = $util.emptyArray;
7811
+
7812
+ /**
7813
+ * StakingInfo covenantQuorum.
7814
+ * @member {number} covenantQuorum
7815
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7816
+ * @instance
7817
+ */
7818
+ StakingInfo.prototype.covenantQuorum = 0;
7819
+
7820
+ /**
7821
+ * Creates a new StakingInfo instance using the specified properties.
7822
+ * @function create
7823
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7824
+ * @static
7825
+ * @param {TW.BabylonStaking.Proto.IStakingInfo=} [properties] Properties to set
7826
+ * @returns {TW.BabylonStaking.Proto.StakingInfo} StakingInfo instance
7827
+ */
7828
+ StakingInfo.create = function create(properties) {
7829
+ return new StakingInfo(properties);
7830
+ };
7831
+
7832
+ /**
7833
+ * Encodes the specified StakingInfo message. Does not implicitly {@link TW.BabylonStaking.Proto.StakingInfo.verify|verify} messages.
7834
+ * @function encode
7835
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7836
+ * @static
7837
+ * @param {TW.BabylonStaking.Proto.IStakingInfo} message StakingInfo message or plain object to encode
7838
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7839
+ * @returns {$protobuf.Writer} Writer
7840
+ */
7841
+ StakingInfo.encode = function encode(message, writer) {
7842
+ if (!writer)
7843
+ writer = $Writer.create();
7844
+ if (message.stakerPublicKey != null && Object.hasOwnProperty.call(message, "stakerPublicKey"))
7845
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.stakerPublicKey);
7846
+ if (message.finalityProviderPublicKey != null && Object.hasOwnProperty.call(message, "finalityProviderPublicKey"))
7847
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.finalityProviderPublicKey);
7848
+ if (message.stakingTime != null && Object.hasOwnProperty.call(message, "stakingTime"))
7849
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stakingTime);
7850
+ if (message.covenantCommitteePublicKeys != null && message.covenantCommitteePublicKeys.length)
7851
+ for (var i = 0; i < message.covenantCommitteePublicKeys.length; ++i)
7852
+ writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.covenantCommitteePublicKeys[i]);
7853
+ if (message.covenantQuorum != null && Object.hasOwnProperty.call(message, "covenantQuorum"))
7854
+ writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.covenantQuorum);
7855
+ return writer;
7856
+ };
7857
+
7858
+ /**
7859
+ * Decodes a StakingInfo message from the specified reader or buffer.
7860
+ * @function decode
7861
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7862
+ * @static
7863
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7864
+ * @param {number} [length] Message length if known beforehand
7865
+ * @returns {TW.BabylonStaking.Proto.StakingInfo} StakingInfo
7866
+ * @throws {Error} If the payload is not a reader or valid buffer
7867
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7868
+ */
7869
+ StakingInfo.decode = function decode(reader, length) {
7870
+ if (!(reader instanceof $Reader))
7871
+ reader = $Reader.create(reader);
7872
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.StakingInfo();
7873
+ while (reader.pos < end) {
7874
+ var tag = reader.uint32();
7875
+ switch (tag >>> 3) {
7876
+ case 1:
7877
+ message.stakerPublicKey = reader.bytes();
7878
+ break;
7879
+ case 2:
7880
+ message.finalityProviderPublicKey = reader.bytes();
7881
+ break;
7882
+ case 3:
7883
+ message.stakingTime = reader.uint32();
7884
+ break;
7885
+ case 4:
7886
+ if (!(message.covenantCommitteePublicKeys && message.covenantCommitteePublicKeys.length))
7887
+ message.covenantCommitteePublicKeys = [];
7888
+ message.covenantCommitteePublicKeys.push(reader.bytes());
7889
+ break;
7890
+ case 5:
7891
+ message.covenantQuorum = reader.uint32();
7892
+ break;
7893
+ default:
7894
+ reader.skipType(tag & 7);
7895
+ break;
7896
+ }
7897
+ }
7898
+ return message;
7899
+ };
7900
+
7901
+ /**
7902
+ * Verifies a StakingInfo message.
7903
+ * @function verify
7904
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7905
+ * @static
7906
+ * @param {Object.<string,*>} message Plain object to verify
7907
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
7908
+ */
7909
+ StakingInfo.verify = function verify(message) {
7910
+ if (typeof message !== "object" || message === null)
7911
+ return "object expected";
7912
+ if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
7913
+ if (!(message.stakerPublicKey && typeof message.stakerPublicKey.length === "number" || $util.isString(message.stakerPublicKey)))
7914
+ return "stakerPublicKey: buffer expected";
7915
+ if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
7916
+ if (!(message.finalityProviderPublicKey && typeof message.finalityProviderPublicKey.length === "number" || $util.isString(message.finalityProviderPublicKey)))
7917
+ return "finalityProviderPublicKey: buffer expected";
7918
+ if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
7919
+ if (!$util.isInteger(message.stakingTime))
7920
+ return "stakingTime: integer expected";
7921
+ if (message.covenantCommitteePublicKeys != null && message.hasOwnProperty("covenantCommitteePublicKeys")) {
7922
+ if (!Array.isArray(message.covenantCommitteePublicKeys))
7923
+ return "covenantCommitteePublicKeys: array expected";
7924
+ for (var i = 0; i < message.covenantCommitteePublicKeys.length; ++i)
7925
+ if (!(message.covenantCommitteePublicKeys[i] && typeof message.covenantCommitteePublicKeys[i].length === "number" || $util.isString(message.covenantCommitteePublicKeys[i])))
7926
+ return "covenantCommitteePublicKeys: buffer[] expected";
7927
+ }
7928
+ if (message.covenantQuorum != null && message.hasOwnProperty("covenantQuorum"))
7929
+ if (!$util.isInteger(message.covenantQuorum))
7930
+ return "covenantQuorum: integer expected";
7931
+ return null;
7932
+ };
7933
+
7934
+ /**
7935
+ * Creates a StakingInfo message from a plain object. Also converts values to their respective internal types.
7936
+ * @function fromObject
7937
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7938
+ * @static
7939
+ * @param {Object.<string,*>} object Plain object
7940
+ * @returns {TW.BabylonStaking.Proto.StakingInfo} StakingInfo
7941
+ */
7942
+ StakingInfo.fromObject = function fromObject(object) {
7943
+ if (object instanceof $root.TW.BabylonStaking.Proto.StakingInfo)
7944
+ return object;
7945
+ var message = new $root.TW.BabylonStaking.Proto.StakingInfo();
7946
+ if (object.stakerPublicKey != null)
7947
+ if (typeof object.stakerPublicKey === "string")
7948
+ $util.base64.decode(object.stakerPublicKey, message.stakerPublicKey = $util.newBuffer($util.base64.length(object.stakerPublicKey)), 0);
7949
+ else if (object.stakerPublicKey.length)
7950
+ message.stakerPublicKey = object.stakerPublicKey;
7951
+ if (object.finalityProviderPublicKey != null)
7952
+ if (typeof object.finalityProviderPublicKey === "string")
7953
+ $util.base64.decode(object.finalityProviderPublicKey, message.finalityProviderPublicKey = $util.newBuffer($util.base64.length(object.finalityProviderPublicKey)), 0);
7954
+ else if (object.finalityProviderPublicKey.length)
7955
+ message.finalityProviderPublicKey = object.finalityProviderPublicKey;
7956
+ if (object.stakingTime != null)
7957
+ message.stakingTime = object.stakingTime >>> 0;
7958
+ if (object.covenantCommitteePublicKeys) {
7959
+ if (!Array.isArray(object.covenantCommitteePublicKeys))
7960
+ throw TypeError(".TW.BabylonStaking.Proto.StakingInfo.covenantCommitteePublicKeys: array expected");
7961
+ message.covenantCommitteePublicKeys = [];
7962
+ for (var i = 0; i < object.covenantCommitteePublicKeys.length; ++i)
7963
+ if (typeof object.covenantCommitteePublicKeys[i] === "string")
7964
+ $util.base64.decode(object.covenantCommitteePublicKeys[i], message.covenantCommitteePublicKeys[i] = $util.newBuffer($util.base64.length(object.covenantCommitteePublicKeys[i])), 0);
7965
+ else if (object.covenantCommitteePublicKeys[i].length)
7966
+ message.covenantCommitteePublicKeys[i] = object.covenantCommitteePublicKeys[i];
7967
+ }
7968
+ if (object.covenantQuorum != null)
7969
+ message.covenantQuorum = object.covenantQuorum >>> 0;
7970
+ return message;
7971
+ };
7972
+
7973
+ /**
7974
+ * Creates a plain object from a StakingInfo message. Also converts values to other types if specified.
7975
+ * @function toObject
7976
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
7977
+ * @static
7978
+ * @param {TW.BabylonStaking.Proto.StakingInfo} message StakingInfo
7979
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
7980
+ * @returns {Object.<string,*>} Plain object
7981
+ */
7982
+ StakingInfo.toObject = function toObject(message, options) {
7983
+ if (!options)
7984
+ options = {};
7985
+ var object = {};
7986
+ if (options.arrays || options.defaults)
7987
+ object.covenantCommitteePublicKeys = [];
7988
+ if (options.defaults) {
7989
+ if (options.bytes === String)
7990
+ object.stakerPublicKey = "";
7991
+ else {
7992
+ object.stakerPublicKey = [];
7993
+ if (options.bytes !== Array)
7994
+ object.stakerPublicKey = $util.newBuffer(object.stakerPublicKey);
7995
+ }
7996
+ if (options.bytes === String)
7997
+ object.finalityProviderPublicKey = "";
7998
+ else {
7999
+ object.finalityProviderPublicKey = [];
8000
+ if (options.bytes !== Array)
8001
+ object.finalityProviderPublicKey = $util.newBuffer(object.finalityProviderPublicKey);
8002
+ }
8003
+ object.stakingTime = 0;
8004
+ object.covenantQuorum = 0;
8005
+ }
8006
+ if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
8007
+ object.stakerPublicKey = options.bytes === String ? $util.base64.encode(message.stakerPublicKey, 0, message.stakerPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.stakerPublicKey) : message.stakerPublicKey;
8008
+ if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
8009
+ object.finalityProviderPublicKey = options.bytes === String ? $util.base64.encode(message.finalityProviderPublicKey, 0, message.finalityProviderPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.finalityProviderPublicKey) : message.finalityProviderPublicKey;
8010
+ if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
8011
+ object.stakingTime = message.stakingTime;
8012
+ if (message.covenantCommitteePublicKeys && message.covenantCommitteePublicKeys.length) {
8013
+ object.covenantCommitteePublicKeys = [];
8014
+ for (var j = 0; j < message.covenantCommitteePublicKeys.length; ++j)
8015
+ object.covenantCommitteePublicKeys[j] = options.bytes === String ? $util.base64.encode(message.covenantCommitteePublicKeys[j], 0, message.covenantCommitteePublicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.covenantCommitteePublicKeys[j]) : message.covenantCommitteePublicKeys[j];
8016
+ }
8017
+ if (message.covenantQuorum != null && message.hasOwnProperty("covenantQuorum"))
8018
+ object.covenantQuorum = message.covenantQuorum;
8019
+ return object;
8020
+ };
8021
+
8022
+ /**
8023
+ * Converts this StakingInfo to JSON.
8024
+ * @function toJSON
8025
+ * @memberof TW.BabylonStaking.Proto.StakingInfo
8026
+ * @instance
8027
+ * @returns {Object.<string,*>} JSON object
8028
+ */
8029
+ StakingInfo.prototype.toJSON = function toJSON() {
8030
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8031
+ };
8032
+
8033
+ return StakingInfo;
8034
+ })();
8035
+
8036
+ Proto.InputBuilder = (function() {
8037
+
8038
+ /**
8039
+ * Properties of an InputBuilder.
8040
+ * @memberof TW.BabylonStaking.Proto
8041
+ * @interface IInputBuilder
8042
+ */
8043
+
8044
+ /**
8045
+ * Constructs a new InputBuilder.
8046
+ * @memberof TW.BabylonStaking.Proto
8047
+ * @classdesc Represents an InputBuilder.
8048
+ * @implements IInputBuilder
8049
+ * @constructor
8050
+ * @param {TW.BabylonStaking.Proto.IInputBuilder=} [properties] Properties to set
8051
+ */
8052
+ function InputBuilder(properties) {
8053
+ if (properties)
8054
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8055
+ if (properties[keys[i]] != null)
8056
+ this[keys[i]] = properties[keys[i]];
8057
+ }
8058
+
8059
+ /**
8060
+ * Creates a new InputBuilder instance using the specified properties.
8061
+ * @function create
8062
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8063
+ * @static
8064
+ * @param {TW.BabylonStaking.Proto.IInputBuilder=} [properties] Properties to set
8065
+ * @returns {TW.BabylonStaking.Proto.InputBuilder} InputBuilder instance
8066
+ */
8067
+ InputBuilder.create = function create(properties) {
8068
+ return new InputBuilder(properties);
8069
+ };
8070
+
8071
+ /**
8072
+ * Encodes the specified InputBuilder message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.verify|verify} messages.
8073
+ * @function encode
8074
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8075
+ * @static
8076
+ * @param {TW.BabylonStaking.Proto.IInputBuilder} message InputBuilder message or plain object to encode
8077
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8078
+ * @returns {$protobuf.Writer} Writer
8079
+ */
8080
+ InputBuilder.encode = function encode(message, writer) {
8081
+ if (!writer)
8082
+ writer = $Writer.create();
8083
+ return writer;
8084
+ };
8085
+
8086
+ /**
8087
+ * Decodes an InputBuilder message from the specified reader or buffer.
8088
+ * @function decode
8089
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8090
+ * @static
8091
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8092
+ * @param {number} [length] Message length if known beforehand
8093
+ * @returns {TW.BabylonStaking.Proto.InputBuilder} InputBuilder
8094
+ * @throws {Error} If the payload is not a reader or valid buffer
8095
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8096
+ */
8097
+ InputBuilder.decode = function decode(reader, length) {
8098
+ if (!(reader instanceof $Reader))
8099
+ reader = $Reader.create(reader);
8100
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder();
8101
+ while (reader.pos < end) {
8102
+ var tag = reader.uint32();
8103
+ switch (tag >>> 3) {
8104
+ default:
8105
+ reader.skipType(tag & 7);
8106
+ break;
8107
+ }
8108
+ }
8109
+ return message;
8110
+ };
8111
+
8112
+ /**
8113
+ * Verifies an InputBuilder message.
8114
+ * @function verify
8115
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8116
+ * @static
8117
+ * @param {Object.<string,*>} message Plain object to verify
8118
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8119
+ */
8120
+ InputBuilder.verify = function verify(message) {
8121
+ if (typeof message !== "object" || message === null)
8122
+ return "object expected";
8123
+ return null;
8124
+ };
8125
+
8126
+ /**
8127
+ * Creates an InputBuilder message from a plain object. Also converts values to their respective internal types.
8128
+ * @function fromObject
8129
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8130
+ * @static
8131
+ * @param {Object.<string,*>} object Plain object
8132
+ * @returns {TW.BabylonStaking.Proto.InputBuilder} InputBuilder
8133
+ */
8134
+ InputBuilder.fromObject = function fromObject(object) {
8135
+ if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder)
8136
+ return object;
8137
+ return new $root.TW.BabylonStaking.Proto.InputBuilder();
8138
+ };
8139
+
8140
+ /**
8141
+ * Creates a plain object from an InputBuilder message. Also converts values to other types if specified.
8142
+ * @function toObject
8143
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8144
+ * @static
8145
+ * @param {TW.BabylonStaking.Proto.InputBuilder} message InputBuilder
8146
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8147
+ * @returns {Object.<string,*>} Plain object
8148
+ */
8149
+ InputBuilder.toObject = function toObject() {
8150
+ return {};
8151
+ };
8152
+
8153
+ /**
8154
+ * Converts this InputBuilder to JSON.
8155
+ * @function toJSON
8156
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8157
+ * @instance
8158
+ * @returns {Object.<string,*>} JSON object
8159
+ */
8160
+ InputBuilder.prototype.toJSON = function toJSON() {
8161
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8162
+ };
8163
+
8164
+ InputBuilder.StakingTimelockPath = (function() {
8165
+
8166
+ /**
8167
+ * Properties of a StakingTimelockPath.
8168
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8169
+ * @interface IStakingTimelockPath
8170
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingTimelockPath params
8171
+ */
8172
+
8173
+ /**
8174
+ * Constructs a new StakingTimelockPath.
8175
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8176
+ * @classdesc Represents a StakingTimelockPath.
8177
+ * @implements IStakingTimelockPath
8178
+ * @constructor
8179
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath=} [properties] Properties to set
8180
+ */
8181
+ function StakingTimelockPath(properties) {
8182
+ if (properties)
8183
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8184
+ if (properties[keys[i]] != null)
8185
+ this[keys[i]] = properties[keys[i]];
8186
+ }
8187
+
8188
+ /**
8189
+ * StakingTimelockPath params.
8190
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
8191
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8192
+ * @instance
8193
+ */
8194
+ StakingTimelockPath.prototype.params = null;
8195
+
8196
+ /**
8197
+ * Creates a new StakingTimelockPath instance using the specified properties.
8198
+ * @function create
8199
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8200
+ * @static
8201
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath=} [properties] Properties to set
8202
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} StakingTimelockPath instance
8203
+ */
8204
+ StakingTimelockPath.create = function create(properties) {
8205
+ return new StakingTimelockPath(properties);
8206
+ };
8207
+
8208
+ /**
8209
+ * Encodes the specified StakingTimelockPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.verify|verify} messages.
8210
+ * @function encode
8211
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8212
+ * @static
8213
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath} message StakingTimelockPath message or plain object to encode
8214
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8215
+ * @returns {$protobuf.Writer} Writer
8216
+ */
8217
+ StakingTimelockPath.encode = function encode(message, writer) {
8218
+ if (!writer)
8219
+ writer = $Writer.create();
8220
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
8221
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8222
+ return writer;
8223
+ };
8224
+
8225
+ /**
8226
+ * Decodes a StakingTimelockPath message from the specified reader or buffer.
8227
+ * @function decode
8228
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8229
+ * @static
8230
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8231
+ * @param {number} [length] Message length if known beforehand
8232
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} StakingTimelockPath
8233
+ * @throws {Error} If the payload is not a reader or valid buffer
8234
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8235
+ */
8236
+ StakingTimelockPath.decode = function decode(reader, length) {
8237
+ if (!(reader instanceof $Reader))
8238
+ reader = $Reader.create(reader);
8239
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath();
8240
+ while (reader.pos < end) {
8241
+ var tag = reader.uint32();
8242
+ switch (tag >>> 3) {
8243
+ case 1:
8244
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
8245
+ break;
8246
+ default:
8247
+ reader.skipType(tag & 7);
8248
+ break;
8249
+ }
8250
+ }
8251
+ return message;
8252
+ };
8253
+
8254
+ /**
8255
+ * Verifies a StakingTimelockPath message.
8256
+ * @function verify
8257
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8258
+ * @static
8259
+ * @param {Object.<string,*>} message Plain object to verify
8260
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8261
+ */
8262
+ StakingTimelockPath.verify = function verify(message) {
8263
+ if (typeof message !== "object" || message === null)
8264
+ return "object expected";
8265
+ if (message.params != null && message.hasOwnProperty("params")) {
8266
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
8267
+ if (error)
8268
+ return "params." + error;
8269
+ }
8270
+ return null;
8271
+ };
8272
+
8273
+ /**
8274
+ * Creates a StakingTimelockPath message from a plain object. Also converts values to their respective internal types.
8275
+ * @function fromObject
8276
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8277
+ * @static
8278
+ * @param {Object.<string,*>} object Plain object
8279
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} StakingTimelockPath
8280
+ */
8281
+ StakingTimelockPath.fromObject = function fromObject(object) {
8282
+ if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath)
8283
+ return object;
8284
+ var message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath();
8285
+ if (object.params != null) {
8286
+ if (typeof object.params !== "object")
8287
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.params: object expected");
8288
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
8289
+ }
8290
+ return message;
8291
+ };
8292
+
8293
+ /**
8294
+ * Creates a plain object from a StakingTimelockPath message. Also converts values to other types if specified.
8295
+ * @function toObject
8296
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8297
+ * @static
8298
+ * @param {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} message StakingTimelockPath
8299
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8300
+ * @returns {Object.<string,*>} Plain object
8301
+ */
8302
+ StakingTimelockPath.toObject = function toObject(message, options) {
8303
+ if (!options)
8304
+ options = {};
8305
+ var object = {};
8306
+ if (options.defaults)
8307
+ object.params = null;
8308
+ if (message.params != null && message.hasOwnProperty("params"))
8309
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
8310
+ return object;
8311
+ };
8312
+
8313
+ /**
8314
+ * Converts this StakingTimelockPath to JSON.
8315
+ * @function toJSON
8316
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
8317
+ * @instance
8318
+ * @returns {Object.<string,*>} JSON object
8319
+ */
8320
+ StakingTimelockPath.prototype.toJSON = function toJSON() {
8321
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8322
+ };
8323
+
8324
+ return StakingTimelockPath;
8325
+ })();
8326
+
8327
+ InputBuilder.StakingUnbondingPath = (function() {
8328
+
8329
+ /**
8330
+ * Properties of a StakingUnbondingPath.
8331
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8332
+ * @interface IStakingUnbondingPath
8333
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingUnbondingPath params
8334
+ * @property {Array.<TW.BabylonStaking.Proto.IPublicKeySignature>|null} [covenantCommitteeSignatures] StakingUnbondingPath covenantCommitteeSignatures
8335
+ */
8336
+
8337
+ /**
8338
+ * Constructs a new StakingUnbondingPath.
8339
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8340
+ * @classdesc Represents a StakingUnbondingPath.
8341
+ * @implements IStakingUnbondingPath
8342
+ * @constructor
8343
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath=} [properties] Properties to set
8344
+ */
8345
+ function StakingUnbondingPath(properties) {
8346
+ this.covenantCommitteeSignatures = [];
8347
+ if (properties)
8348
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8349
+ if (properties[keys[i]] != null)
8350
+ this[keys[i]] = properties[keys[i]];
8351
+ }
8352
+
8353
+ /**
8354
+ * StakingUnbondingPath params.
8355
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
8356
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8357
+ * @instance
8358
+ */
8359
+ StakingUnbondingPath.prototype.params = null;
8360
+
8361
+ /**
8362
+ * StakingUnbondingPath covenantCommitteeSignatures.
8363
+ * @member {Array.<TW.BabylonStaking.Proto.IPublicKeySignature>} covenantCommitteeSignatures
8364
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8365
+ * @instance
8366
+ */
8367
+ StakingUnbondingPath.prototype.covenantCommitteeSignatures = $util.emptyArray;
8368
+
8369
+ /**
8370
+ * Creates a new StakingUnbondingPath instance using the specified properties.
8371
+ * @function create
8372
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8373
+ * @static
8374
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath=} [properties] Properties to set
8375
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} StakingUnbondingPath instance
8376
+ */
8377
+ StakingUnbondingPath.create = function create(properties) {
8378
+ return new StakingUnbondingPath(properties);
8379
+ };
8380
+
8381
+ /**
8382
+ * Encodes the specified StakingUnbondingPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.verify|verify} messages.
8383
+ * @function encode
8384
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8385
+ * @static
8386
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath} message StakingUnbondingPath message or plain object to encode
8387
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8388
+ * @returns {$protobuf.Writer} Writer
8389
+ */
8390
+ StakingUnbondingPath.encode = function encode(message, writer) {
8391
+ if (!writer)
8392
+ writer = $Writer.create();
8393
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
8394
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8395
+ if (message.covenantCommitteeSignatures != null && message.covenantCommitteeSignatures.length)
8396
+ for (var i = 0; i < message.covenantCommitteeSignatures.length; ++i)
8397
+ $root.TW.BabylonStaking.Proto.PublicKeySignature.encode(message.covenantCommitteeSignatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
8398
+ return writer;
8399
+ };
8400
+
8401
+ /**
8402
+ * Decodes a StakingUnbondingPath message from the specified reader or buffer.
8403
+ * @function decode
8404
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8405
+ * @static
8406
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8407
+ * @param {number} [length] Message length if known beforehand
8408
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} StakingUnbondingPath
8409
+ * @throws {Error} If the payload is not a reader or valid buffer
8410
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8411
+ */
8412
+ StakingUnbondingPath.decode = function decode(reader, length) {
8413
+ if (!(reader instanceof $Reader))
8414
+ reader = $Reader.create(reader);
8415
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath();
8416
+ while (reader.pos < end) {
8417
+ var tag = reader.uint32();
8418
+ switch (tag >>> 3) {
8419
+ case 1:
8420
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
8421
+ break;
8422
+ case 2:
8423
+ if (!(message.covenantCommitteeSignatures && message.covenantCommitteeSignatures.length))
8424
+ message.covenantCommitteeSignatures = [];
8425
+ message.covenantCommitteeSignatures.push($root.TW.BabylonStaking.Proto.PublicKeySignature.decode(reader, reader.uint32()));
8426
+ break;
8427
+ default:
8428
+ reader.skipType(tag & 7);
8429
+ break;
8430
+ }
8431
+ }
8432
+ return message;
8433
+ };
8434
+
8435
+ /**
8436
+ * Verifies a StakingUnbondingPath message.
8437
+ * @function verify
8438
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8439
+ * @static
8440
+ * @param {Object.<string,*>} message Plain object to verify
8441
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8442
+ */
8443
+ StakingUnbondingPath.verify = function verify(message) {
8444
+ if (typeof message !== "object" || message === null)
8445
+ return "object expected";
8446
+ if (message.params != null && message.hasOwnProperty("params")) {
8447
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
8448
+ if (error)
8449
+ return "params." + error;
8450
+ }
8451
+ if (message.covenantCommitteeSignatures != null && message.hasOwnProperty("covenantCommitteeSignatures")) {
8452
+ if (!Array.isArray(message.covenantCommitteeSignatures))
8453
+ return "covenantCommitteeSignatures: array expected";
8454
+ for (var i = 0; i < message.covenantCommitteeSignatures.length; ++i) {
8455
+ var error = $root.TW.BabylonStaking.Proto.PublicKeySignature.verify(message.covenantCommitteeSignatures[i]);
8456
+ if (error)
8457
+ return "covenantCommitteeSignatures." + error;
8458
+ }
8459
+ }
8460
+ return null;
8461
+ };
8462
+
8463
+ /**
8464
+ * Creates a StakingUnbondingPath message from a plain object. Also converts values to their respective internal types.
8465
+ * @function fromObject
8466
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8467
+ * @static
8468
+ * @param {Object.<string,*>} object Plain object
8469
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} StakingUnbondingPath
8470
+ */
8471
+ StakingUnbondingPath.fromObject = function fromObject(object) {
8472
+ if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath)
8473
+ return object;
8474
+ var message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath();
8475
+ if (object.params != null) {
8476
+ if (typeof object.params !== "object")
8477
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.params: object expected");
8478
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
8479
+ }
8480
+ if (object.covenantCommitteeSignatures) {
8481
+ if (!Array.isArray(object.covenantCommitteeSignatures))
8482
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.covenantCommitteeSignatures: array expected");
8483
+ message.covenantCommitteeSignatures = [];
8484
+ for (var i = 0; i < object.covenantCommitteeSignatures.length; ++i) {
8485
+ if (typeof object.covenantCommitteeSignatures[i] !== "object")
8486
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.covenantCommitteeSignatures: object expected");
8487
+ message.covenantCommitteeSignatures[i] = $root.TW.BabylonStaking.Proto.PublicKeySignature.fromObject(object.covenantCommitteeSignatures[i]);
8488
+ }
8489
+ }
8490
+ return message;
8491
+ };
8492
+
8493
+ /**
8494
+ * Creates a plain object from a StakingUnbondingPath message. Also converts values to other types if specified.
8495
+ * @function toObject
8496
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8497
+ * @static
8498
+ * @param {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} message StakingUnbondingPath
8499
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8500
+ * @returns {Object.<string,*>} Plain object
8501
+ */
8502
+ StakingUnbondingPath.toObject = function toObject(message, options) {
8503
+ if (!options)
8504
+ options = {};
8505
+ var object = {};
8506
+ if (options.arrays || options.defaults)
8507
+ object.covenantCommitteeSignatures = [];
8508
+ if (options.defaults)
8509
+ object.params = null;
8510
+ if (message.params != null && message.hasOwnProperty("params"))
8511
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
8512
+ if (message.covenantCommitteeSignatures && message.covenantCommitteeSignatures.length) {
8513
+ object.covenantCommitteeSignatures = [];
8514
+ for (var j = 0; j < message.covenantCommitteeSignatures.length; ++j)
8515
+ object.covenantCommitteeSignatures[j] = $root.TW.BabylonStaking.Proto.PublicKeySignature.toObject(message.covenantCommitteeSignatures[j], options);
8516
+ }
8517
+ return object;
8518
+ };
8519
+
8520
+ /**
8521
+ * Converts this StakingUnbondingPath to JSON.
8522
+ * @function toJSON
8523
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
8524
+ * @instance
8525
+ * @returns {Object.<string,*>} JSON object
8526
+ */
8527
+ StakingUnbondingPath.prototype.toJSON = function toJSON() {
8528
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8529
+ };
8530
+
8531
+ return StakingUnbondingPath;
8532
+ })();
8533
+
8534
+ InputBuilder.StakingSlashingPath = (function() {
8535
+
8536
+ /**
8537
+ * Properties of a StakingSlashingPath.
8538
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8539
+ * @interface IStakingSlashingPath
8540
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingSlashingPath params
8541
+ * @property {TW.BabylonStaking.Proto.IPublicKeySignature|null} [finalityProviderSignature] StakingSlashingPath finalityProviderSignature
8542
+ */
8543
+
8544
+ /**
8545
+ * Constructs a new StakingSlashingPath.
8546
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8547
+ * @classdesc Represents a StakingSlashingPath.
8548
+ * @implements IStakingSlashingPath
8549
+ * @constructor
8550
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath=} [properties] Properties to set
8551
+ */
8552
+ function StakingSlashingPath(properties) {
8553
+ if (properties)
8554
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8555
+ if (properties[keys[i]] != null)
8556
+ this[keys[i]] = properties[keys[i]];
8557
+ }
8558
+
8559
+ /**
8560
+ * StakingSlashingPath params.
8561
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
8562
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8563
+ * @instance
8564
+ */
8565
+ StakingSlashingPath.prototype.params = null;
8566
+
8567
+ /**
8568
+ * StakingSlashingPath finalityProviderSignature.
8569
+ * @member {TW.BabylonStaking.Proto.IPublicKeySignature|null|undefined} finalityProviderSignature
8570
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8571
+ * @instance
8572
+ */
8573
+ StakingSlashingPath.prototype.finalityProviderSignature = null;
8574
+
8575
+ /**
8576
+ * Creates a new StakingSlashingPath instance using the specified properties.
8577
+ * @function create
8578
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8579
+ * @static
8580
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath=} [properties] Properties to set
8581
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} StakingSlashingPath instance
8582
+ */
8583
+ StakingSlashingPath.create = function create(properties) {
8584
+ return new StakingSlashingPath(properties);
8585
+ };
8586
+
8587
+ /**
8588
+ * Encodes the specified StakingSlashingPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.verify|verify} messages.
8589
+ * @function encode
8590
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8591
+ * @static
8592
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath} message StakingSlashingPath message or plain object to encode
8593
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8594
+ * @returns {$protobuf.Writer} Writer
8595
+ */
8596
+ StakingSlashingPath.encode = function encode(message, writer) {
8597
+ if (!writer)
8598
+ writer = $Writer.create();
8599
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
8600
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8601
+ if (message.finalityProviderSignature != null && Object.hasOwnProperty.call(message, "finalityProviderSignature"))
8602
+ $root.TW.BabylonStaking.Proto.PublicKeySignature.encode(message.finalityProviderSignature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
8603
+ return writer;
8604
+ };
8605
+
8606
+ /**
8607
+ * Decodes a StakingSlashingPath message from the specified reader or buffer.
8608
+ * @function decode
8609
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8610
+ * @static
8611
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8612
+ * @param {number} [length] Message length if known beforehand
8613
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} StakingSlashingPath
8614
+ * @throws {Error} If the payload is not a reader or valid buffer
8615
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8616
+ */
8617
+ StakingSlashingPath.decode = function decode(reader, length) {
8618
+ if (!(reader instanceof $Reader))
8619
+ reader = $Reader.create(reader);
8620
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath();
8621
+ while (reader.pos < end) {
8622
+ var tag = reader.uint32();
8623
+ switch (tag >>> 3) {
8624
+ case 1:
8625
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
8626
+ break;
8627
+ case 2:
8628
+ message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.decode(reader, reader.uint32());
8629
+ break;
8630
+ default:
8631
+ reader.skipType(tag & 7);
8632
+ break;
8633
+ }
8634
+ }
8635
+ return message;
8636
+ };
8637
+
8638
+ /**
8639
+ * Verifies a StakingSlashingPath message.
8640
+ * @function verify
8641
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8642
+ * @static
8643
+ * @param {Object.<string,*>} message Plain object to verify
8644
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8645
+ */
8646
+ StakingSlashingPath.verify = function verify(message) {
8647
+ if (typeof message !== "object" || message === null)
8648
+ return "object expected";
8649
+ if (message.params != null && message.hasOwnProperty("params")) {
8650
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
8651
+ if (error)
8652
+ return "params." + error;
8653
+ }
8654
+ if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature")) {
8655
+ var error = $root.TW.BabylonStaking.Proto.PublicKeySignature.verify(message.finalityProviderSignature);
8656
+ if (error)
8657
+ return "finalityProviderSignature." + error;
8658
+ }
8659
+ return null;
8660
+ };
8661
+
8662
+ /**
8663
+ * Creates a StakingSlashingPath message from a plain object. Also converts values to their respective internal types.
8664
+ * @function fromObject
8665
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8666
+ * @static
8667
+ * @param {Object.<string,*>} object Plain object
8668
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} StakingSlashingPath
8669
+ */
8670
+ StakingSlashingPath.fromObject = function fromObject(object) {
8671
+ if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath)
8672
+ return object;
8673
+ var message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath();
8674
+ if (object.params != null) {
8675
+ if (typeof object.params !== "object")
8676
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.params: object expected");
8677
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
8678
+ }
8679
+ if (object.finalityProviderSignature != null) {
8680
+ if (typeof object.finalityProviderSignature !== "object")
8681
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.finalityProviderSignature: object expected");
8682
+ message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.fromObject(object.finalityProviderSignature);
8683
+ }
8684
+ return message;
8685
+ };
8686
+
8687
+ /**
8688
+ * Creates a plain object from a StakingSlashingPath message. Also converts values to other types if specified.
8689
+ * @function toObject
8690
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8691
+ * @static
8692
+ * @param {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} message StakingSlashingPath
8693
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8694
+ * @returns {Object.<string,*>} Plain object
8695
+ */
8696
+ StakingSlashingPath.toObject = function toObject(message, options) {
8697
+ if (!options)
8698
+ options = {};
8699
+ var object = {};
8700
+ if (options.defaults) {
8701
+ object.params = null;
8702
+ object.finalityProviderSignature = null;
8703
+ }
8704
+ if (message.params != null && message.hasOwnProperty("params"))
8705
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
8706
+ if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature"))
8707
+ object.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.toObject(message.finalityProviderSignature, options);
8708
+ return object;
8709
+ };
8710
+
8711
+ /**
8712
+ * Converts this StakingSlashingPath to JSON.
8713
+ * @function toJSON
8714
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
8715
+ * @instance
8716
+ * @returns {Object.<string,*>} JSON object
8717
+ */
8718
+ StakingSlashingPath.prototype.toJSON = function toJSON() {
8719
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8720
+ };
8721
+
8722
+ return StakingSlashingPath;
8723
+ })();
8724
+
8725
+ InputBuilder.UnbondingTimelockPath = (function() {
8726
+
8727
+ /**
8728
+ * Properties of an UnbondingTimelockPath.
8729
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8730
+ * @interface IUnbondingTimelockPath
8731
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] UnbondingTimelockPath params
8732
+ */
8733
+
8734
+ /**
8735
+ * Constructs a new UnbondingTimelockPath.
8736
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8737
+ * @classdesc Represents an UnbondingTimelockPath.
8738
+ * @implements IUnbondingTimelockPath
8739
+ * @constructor
8740
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath=} [properties] Properties to set
8741
+ */
8742
+ function UnbondingTimelockPath(properties) {
8743
+ if (properties)
8744
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8745
+ if (properties[keys[i]] != null)
8746
+ this[keys[i]] = properties[keys[i]];
8747
+ }
8748
+
8749
+ /**
8750
+ * UnbondingTimelockPath params.
8751
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
8752
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8753
+ * @instance
8754
+ */
8755
+ UnbondingTimelockPath.prototype.params = null;
8756
+
8757
+ /**
8758
+ * Creates a new UnbondingTimelockPath instance using the specified properties.
8759
+ * @function create
8760
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8761
+ * @static
8762
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath=} [properties] Properties to set
8763
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} UnbondingTimelockPath instance
8764
+ */
8765
+ UnbondingTimelockPath.create = function create(properties) {
8766
+ return new UnbondingTimelockPath(properties);
8767
+ };
8768
+
8769
+ /**
8770
+ * Encodes the specified UnbondingTimelockPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.verify|verify} messages.
8771
+ * @function encode
8772
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8773
+ * @static
8774
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath} message UnbondingTimelockPath message or plain object to encode
8775
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8776
+ * @returns {$protobuf.Writer} Writer
8777
+ */
8778
+ UnbondingTimelockPath.encode = function encode(message, writer) {
8779
+ if (!writer)
8780
+ writer = $Writer.create();
8781
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
8782
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8783
+ return writer;
8784
+ };
8785
+
8786
+ /**
8787
+ * Decodes an UnbondingTimelockPath message from the specified reader or buffer.
8788
+ * @function decode
8789
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8790
+ * @static
8791
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8792
+ * @param {number} [length] Message length if known beforehand
8793
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} UnbondingTimelockPath
8794
+ * @throws {Error} If the payload is not a reader or valid buffer
8795
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8796
+ */
8797
+ UnbondingTimelockPath.decode = function decode(reader, length) {
8798
+ if (!(reader instanceof $Reader))
8799
+ reader = $Reader.create(reader);
8800
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath();
8801
+ while (reader.pos < end) {
8802
+ var tag = reader.uint32();
8803
+ switch (tag >>> 3) {
8804
+ case 1:
8805
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
8806
+ break;
8807
+ default:
8808
+ reader.skipType(tag & 7);
8809
+ break;
8810
+ }
8811
+ }
8812
+ return message;
8813
+ };
8814
+
8815
+ /**
8816
+ * Verifies an UnbondingTimelockPath message.
8817
+ * @function verify
8818
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8819
+ * @static
8820
+ * @param {Object.<string,*>} message Plain object to verify
8821
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8822
+ */
8823
+ UnbondingTimelockPath.verify = function verify(message) {
8824
+ if (typeof message !== "object" || message === null)
8825
+ return "object expected";
8826
+ if (message.params != null && message.hasOwnProperty("params")) {
8827
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
8828
+ if (error)
8829
+ return "params." + error;
8830
+ }
8831
+ return null;
8832
+ };
8833
+
8834
+ /**
8835
+ * Creates an UnbondingTimelockPath message from a plain object. Also converts values to their respective internal types.
8836
+ * @function fromObject
8837
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8838
+ * @static
8839
+ * @param {Object.<string,*>} object Plain object
8840
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} UnbondingTimelockPath
8841
+ */
8842
+ UnbondingTimelockPath.fromObject = function fromObject(object) {
8843
+ if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath)
8844
+ return object;
8845
+ var message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath();
8846
+ if (object.params != null) {
8847
+ if (typeof object.params !== "object")
8848
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.params: object expected");
8849
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
8850
+ }
8851
+ return message;
8852
+ };
8853
+
8854
+ /**
8855
+ * Creates a plain object from an UnbondingTimelockPath message. Also converts values to other types if specified.
8856
+ * @function toObject
8857
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8858
+ * @static
8859
+ * @param {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} message UnbondingTimelockPath
8860
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8861
+ * @returns {Object.<string,*>} Plain object
8862
+ */
8863
+ UnbondingTimelockPath.toObject = function toObject(message, options) {
8864
+ if (!options)
8865
+ options = {};
8866
+ var object = {};
8867
+ if (options.defaults)
8868
+ object.params = null;
8869
+ if (message.params != null && message.hasOwnProperty("params"))
8870
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
8871
+ return object;
8872
+ };
8873
+
8874
+ /**
8875
+ * Converts this UnbondingTimelockPath to JSON.
8876
+ * @function toJSON
8877
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
8878
+ * @instance
8879
+ * @returns {Object.<string,*>} JSON object
8880
+ */
8881
+ UnbondingTimelockPath.prototype.toJSON = function toJSON() {
8882
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8883
+ };
8884
+
8885
+ return UnbondingTimelockPath;
8886
+ })();
8887
+
8888
+ InputBuilder.UnbondingSlashingPath = (function() {
8889
+
8890
+ /**
8891
+ * Properties of an UnbondingSlashingPath.
8892
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8893
+ * @interface IUnbondingSlashingPath
8894
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] UnbondingSlashingPath params
8895
+ * @property {TW.BabylonStaking.Proto.IPublicKeySignature|null} [finalityProviderSignature] UnbondingSlashingPath finalityProviderSignature
8896
+ */
8897
+
8898
+ /**
8899
+ * Constructs a new UnbondingSlashingPath.
8900
+ * @memberof TW.BabylonStaking.Proto.InputBuilder
8901
+ * @classdesc Represents an UnbondingSlashingPath.
8902
+ * @implements IUnbondingSlashingPath
8903
+ * @constructor
8904
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath=} [properties] Properties to set
8905
+ */
8906
+ function UnbondingSlashingPath(properties) {
8907
+ if (properties)
8908
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8909
+ if (properties[keys[i]] != null)
8910
+ this[keys[i]] = properties[keys[i]];
8911
+ }
8912
+
8913
+ /**
8914
+ * UnbondingSlashingPath params.
8915
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
8916
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
8917
+ * @instance
8918
+ */
8919
+ UnbondingSlashingPath.prototype.params = null;
8920
+
8921
+ /**
8922
+ * UnbondingSlashingPath finalityProviderSignature.
8923
+ * @member {TW.BabylonStaking.Proto.IPublicKeySignature|null|undefined} finalityProviderSignature
8924
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
8925
+ * @instance
8926
+ */
8927
+ UnbondingSlashingPath.prototype.finalityProviderSignature = null;
8928
+
8929
+ /**
8930
+ * Creates a new UnbondingSlashingPath instance using the specified properties.
8931
+ * @function create
8932
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
8933
+ * @static
8934
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath=} [properties] Properties to set
8935
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} UnbondingSlashingPath instance
8936
+ */
8937
+ UnbondingSlashingPath.create = function create(properties) {
8938
+ return new UnbondingSlashingPath(properties);
8939
+ };
8940
+
8941
+ /**
8942
+ * Encodes the specified UnbondingSlashingPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.verify|verify} messages.
8943
+ * @function encode
8944
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
8945
+ * @static
8946
+ * @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath} message UnbondingSlashingPath message or plain object to encode
8947
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8948
+ * @returns {$protobuf.Writer} Writer
8949
+ */
8950
+ UnbondingSlashingPath.encode = function encode(message, writer) {
8951
+ if (!writer)
8952
+ writer = $Writer.create();
8953
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
8954
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8955
+ if (message.finalityProviderSignature != null && Object.hasOwnProperty.call(message, "finalityProviderSignature"))
8956
+ $root.TW.BabylonStaking.Proto.PublicKeySignature.encode(message.finalityProviderSignature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
8957
+ return writer;
8958
+ };
8959
+
8960
+ /**
8961
+ * Decodes an UnbondingSlashingPath message from the specified reader or buffer.
8962
+ * @function decode
8963
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
8964
+ * @static
8965
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8966
+ * @param {number} [length] Message length if known beforehand
8967
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} UnbondingSlashingPath
8968
+ * @throws {Error} If the payload is not a reader or valid buffer
8969
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8970
+ */
8971
+ UnbondingSlashingPath.decode = function decode(reader, length) {
8972
+ if (!(reader instanceof $Reader))
8973
+ reader = $Reader.create(reader);
8974
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath();
8975
+ while (reader.pos < end) {
8976
+ var tag = reader.uint32();
8977
+ switch (tag >>> 3) {
8978
+ case 1:
8979
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
8980
+ break;
8981
+ case 2:
8982
+ message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.decode(reader, reader.uint32());
8983
+ break;
8984
+ default:
8985
+ reader.skipType(tag & 7);
8986
+ break;
8987
+ }
8988
+ }
8989
+ return message;
8990
+ };
8991
+
8992
+ /**
8993
+ * Verifies an UnbondingSlashingPath message.
8994
+ * @function verify
8995
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
8996
+ * @static
8997
+ * @param {Object.<string,*>} message Plain object to verify
8998
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8999
+ */
9000
+ UnbondingSlashingPath.verify = function verify(message) {
9001
+ if (typeof message !== "object" || message === null)
9002
+ return "object expected";
9003
+ if (message.params != null && message.hasOwnProperty("params")) {
9004
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
9005
+ if (error)
9006
+ return "params." + error;
9007
+ }
9008
+ if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature")) {
9009
+ var error = $root.TW.BabylonStaking.Proto.PublicKeySignature.verify(message.finalityProviderSignature);
9010
+ if (error)
9011
+ return "finalityProviderSignature." + error;
9012
+ }
9013
+ return null;
9014
+ };
9015
+
9016
+ /**
9017
+ * Creates an UnbondingSlashingPath message from a plain object. Also converts values to their respective internal types.
9018
+ * @function fromObject
9019
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
9020
+ * @static
9021
+ * @param {Object.<string,*>} object Plain object
9022
+ * @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} UnbondingSlashingPath
9023
+ */
9024
+ UnbondingSlashingPath.fromObject = function fromObject(object) {
9025
+ if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath)
9026
+ return object;
9027
+ var message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath();
9028
+ if (object.params != null) {
9029
+ if (typeof object.params !== "object")
9030
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.params: object expected");
9031
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
9032
+ }
9033
+ if (object.finalityProviderSignature != null) {
9034
+ if (typeof object.finalityProviderSignature !== "object")
9035
+ throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.finalityProviderSignature: object expected");
9036
+ message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.fromObject(object.finalityProviderSignature);
9037
+ }
9038
+ return message;
9039
+ };
9040
+
9041
+ /**
9042
+ * Creates a plain object from an UnbondingSlashingPath message. Also converts values to other types if specified.
9043
+ * @function toObject
9044
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
9045
+ * @static
9046
+ * @param {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} message UnbondingSlashingPath
9047
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9048
+ * @returns {Object.<string,*>} Plain object
9049
+ */
9050
+ UnbondingSlashingPath.toObject = function toObject(message, options) {
9051
+ if (!options)
9052
+ options = {};
9053
+ var object = {};
9054
+ if (options.defaults) {
9055
+ object.params = null;
9056
+ object.finalityProviderSignature = null;
9057
+ }
9058
+ if (message.params != null && message.hasOwnProperty("params"))
9059
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
9060
+ if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature"))
9061
+ object.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.toObject(message.finalityProviderSignature, options);
9062
+ return object;
9063
+ };
9064
+
9065
+ /**
9066
+ * Converts this UnbondingSlashingPath to JSON.
9067
+ * @function toJSON
9068
+ * @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
9069
+ * @instance
9070
+ * @returns {Object.<string,*>} JSON object
9071
+ */
9072
+ UnbondingSlashingPath.prototype.toJSON = function toJSON() {
9073
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9074
+ };
9075
+
9076
+ return UnbondingSlashingPath;
9077
+ })();
9078
+
9079
+ return InputBuilder;
9080
+ })();
9081
+
9082
+ Proto.OutputBuilder = (function() {
9083
+
9084
+ /**
9085
+ * Properties of an OutputBuilder.
9086
+ * @memberof TW.BabylonStaking.Proto
9087
+ * @interface IOutputBuilder
9088
+ */
9089
+
9090
+ /**
9091
+ * Constructs a new OutputBuilder.
9092
+ * @memberof TW.BabylonStaking.Proto
9093
+ * @classdesc Represents an OutputBuilder.
9094
+ * @implements IOutputBuilder
9095
+ * @constructor
9096
+ * @param {TW.BabylonStaking.Proto.IOutputBuilder=} [properties] Properties to set
9097
+ */
9098
+ function OutputBuilder(properties) {
9099
+ if (properties)
9100
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9101
+ if (properties[keys[i]] != null)
9102
+ this[keys[i]] = properties[keys[i]];
9103
+ }
9104
+
9105
+ /**
9106
+ * Creates a new OutputBuilder instance using the specified properties.
9107
+ * @function create
9108
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9109
+ * @static
9110
+ * @param {TW.BabylonStaking.Proto.IOutputBuilder=} [properties] Properties to set
9111
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder} OutputBuilder instance
9112
+ */
9113
+ OutputBuilder.create = function create(properties) {
9114
+ return new OutputBuilder(properties);
9115
+ };
9116
+
9117
+ /**
9118
+ * Encodes the specified OutputBuilder message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.verify|verify} messages.
9119
+ * @function encode
9120
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9121
+ * @static
9122
+ * @param {TW.BabylonStaking.Proto.IOutputBuilder} message OutputBuilder message or plain object to encode
9123
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9124
+ * @returns {$protobuf.Writer} Writer
9125
+ */
9126
+ OutputBuilder.encode = function encode(message, writer) {
9127
+ if (!writer)
9128
+ writer = $Writer.create();
9129
+ return writer;
9130
+ };
9131
+
9132
+ /**
9133
+ * Decodes an OutputBuilder message from the specified reader or buffer.
9134
+ * @function decode
9135
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9136
+ * @static
9137
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9138
+ * @param {number} [length] Message length if known beforehand
9139
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder} OutputBuilder
9140
+ * @throws {Error} If the payload is not a reader or valid buffer
9141
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9142
+ */
9143
+ OutputBuilder.decode = function decode(reader, length) {
9144
+ if (!(reader instanceof $Reader))
9145
+ reader = $Reader.create(reader);
9146
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder();
9147
+ while (reader.pos < end) {
9148
+ var tag = reader.uint32();
9149
+ switch (tag >>> 3) {
9150
+ default:
9151
+ reader.skipType(tag & 7);
9152
+ break;
9153
+ }
9154
+ }
9155
+ return message;
9156
+ };
9157
+
9158
+ /**
9159
+ * Verifies an OutputBuilder message.
9160
+ * @function verify
9161
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9162
+ * @static
9163
+ * @param {Object.<string,*>} message Plain object to verify
9164
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9165
+ */
9166
+ OutputBuilder.verify = function verify(message) {
9167
+ if (typeof message !== "object" || message === null)
9168
+ return "object expected";
9169
+ return null;
9170
+ };
9171
+
9172
+ /**
9173
+ * Creates an OutputBuilder message from a plain object. Also converts values to their respective internal types.
9174
+ * @function fromObject
9175
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9176
+ * @static
9177
+ * @param {Object.<string,*>} object Plain object
9178
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder} OutputBuilder
9179
+ */
9180
+ OutputBuilder.fromObject = function fromObject(object) {
9181
+ if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder)
9182
+ return object;
9183
+ return new $root.TW.BabylonStaking.Proto.OutputBuilder();
9184
+ };
9185
+
9186
+ /**
9187
+ * Creates a plain object from an OutputBuilder message. Also converts values to other types if specified.
9188
+ * @function toObject
9189
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9190
+ * @static
9191
+ * @param {TW.BabylonStaking.Proto.OutputBuilder} message OutputBuilder
9192
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9193
+ * @returns {Object.<string,*>} Plain object
9194
+ */
9195
+ OutputBuilder.toObject = function toObject() {
9196
+ return {};
9197
+ };
9198
+
9199
+ /**
9200
+ * Converts this OutputBuilder to JSON.
9201
+ * @function toJSON
9202
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9203
+ * @instance
9204
+ * @returns {Object.<string,*>} JSON object
9205
+ */
9206
+ OutputBuilder.prototype.toJSON = function toJSON() {
9207
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9208
+ };
9209
+
9210
+ OutputBuilder.StakingOutput = (function() {
9211
+
9212
+ /**
9213
+ * Properties of a StakingOutput.
9214
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9215
+ * @interface IStakingOutput
9216
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingOutput params
9217
+ */
9218
+
9219
+ /**
9220
+ * Constructs a new StakingOutput.
9221
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9222
+ * @classdesc Represents a StakingOutput.
9223
+ * @implements IStakingOutput
9224
+ * @constructor
9225
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput=} [properties] Properties to set
9226
+ */
9227
+ function StakingOutput(properties) {
9228
+ if (properties)
9229
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9230
+ if (properties[keys[i]] != null)
9231
+ this[keys[i]] = properties[keys[i]];
9232
+ }
9233
+
9234
+ /**
9235
+ * StakingOutput params.
9236
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
9237
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9238
+ * @instance
9239
+ */
9240
+ StakingOutput.prototype.params = null;
9241
+
9242
+ /**
9243
+ * Creates a new StakingOutput instance using the specified properties.
9244
+ * @function create
9245
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9246
+ * @static
9247
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput=} [properties] Properties to set
9248
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} StakingOutput instance
9249
+ */
9250
+ StakingOutput.create = function create(properties) {
9251
+ return new StakingOutput(properties);
9252
+ };
9253
+
9254
+ /**
9255
+ * Encodes the specified StakingOutput message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.verify|verify} messages.
9256
+ * @function encode
9257
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9258
+ * @static
9259
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput} message StakingOutput message or plain object to encode
9260
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9261
+ * @returns {$protobuf.Writer} Writer
9262
+ */
9263
+ StakingOutput.encode = function encode(message, writer) {
9264
+ if (!writer)
9265
+ writer = $Writer.create();
9266
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
9267
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
9268
+ return writer;
9269
+ };
9270
+
9271
+ /**
9272
+ * Decodes a StakingOutput message from the specified reader or buffer.
9273
+ * @function decode
9274
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9275
+ * @static
9276
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9277
+ * @param {number} [length] Message length if known beforehand
9278
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} StakingOutput
9279
+ * @throws {Error} If the payload is not a reader or valid buffer
9280
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9281
+ */
9282
+ StakingOutput.decode = function decode(reader, length) {
9283
+ if (!(reader instanceof $Reader))
9284
+ reader = $Reader.create(reader);
9285
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput();
9286
+ while (reader.pos < end) {
9287
+ var tag = reader.uint32();
9288
+ switch (tag >>> 3) {
9289
+ case 1:
9290
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
9291
+ break;
9292
+ default:
9293
+ reader.skipType(tag & 7);
9294
+ break;
9295
+ }
9296
+ }
9297
+ return message;
9298
+ };
9299
+
9300
+ /**
9301
+ * Verifies a StakingOutput message.
9302
+ * @function verify
9303
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9304
+ * @static
9305
+ * @param {Object.<string,*>} message Plain object to verify
9306
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9307
+ */
9308
+ StakingOutput.verify = function verify(message) {
9309
+ if (typeof message !== "object" || message === null)
9310
+ return "object expected";
9311
+ if (message.params != null && message.hasOwnProperty("params")) {
9312
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
9313
+ if (error)
9314
+ return "params." + error;
9315
+ }
9316
+ return null;
9317
+ };
9318
+
9319
+ /**
9320
+ * Creates a StakingOutput message from a plain object. Also converts values to their respective internal types.
9321
+ * @function fromObject
9322
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9323
+ * @static
9324
+ * @param {Object.<string,*>} object Plain object
9325
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} StakingOutput
9326
+ */
9327
+ StakingOutput.fromObject = function fromObject(object) {
9328
+ if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput)
9329
+ return object;
9330
+ var message = new $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput();
9331
+ if (object.params != null) {
9332
+ if (typeof object.params !== "object")
9333
+ throw TypeError(".TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.params: object expected");
9334
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
9335
+ }
9336
+ return message;
9337
+ };
9338
+
9339
+ /**
9340
+ * Creates a plain object from a StakingOutput message. Also converts values to other types if specified.
9341
+ * @function toObject
9342
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9343
+ * @static
9344
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} message StakingOutput
9345
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9346
+ * @returns {Object.<string,*>} Plain object
9347
+ */
9348
+ StakingOutput.toObject = function toObject(message, options) {
9349
+ if (!options)
9350
+ options = {};
9351
+ var object = {};
9352
+ if (options.defaults)
9353
+ object.params = null;
9354
+ if (message.params != null && message.hasOwnProperty("params"))
9355
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
9356
+ return object;
9357
+ };
9358
+
9359
+ /**
9360
+ * Converts this StakingOutput to JSON.
9361
+ * @function toJSON
9362
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
9363
+ * @instance
9364
+ * @returns {Object.<string,*>} JSON object
9365
+ */
9366
+ StakingOutput.prototype.toJSON = function toJSON() {
9367
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9368
+ };
9369
+
9370
+ return StakingOutput;
9371
+ })();
9372
+
9373
+ OutputBuilder.UnbondingOutput = (function() {
9374
+
9375
+ /**
9376
+ * Properties of an UnbondingOutput.
9377
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9378
+ * @interface IUnbondingOutput
9379
+ * @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] UnbondingOutput params
9380
+ */
9381
+
9382
+ /**
9383
+ * Constructs a new UnbondingOutput.
9384
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9385
+ * @classdesc Represents an UnbondingOutput.
9386
+ * @implements IUnbondingOutput
9387
+ * @constructor
9388
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput=} [properties] Properties to set
9389
+ */
9390
+ function UnbondingOutput(properties) {
9391
+ if (properties)
9392
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9393
+ if (properties[keys[i]] != null)
9394
+ this[keys[i]] = properties[keys[i]];
9395
+ }
9396
+
9397
+ /**
9398
+ * UnbondingOutput params.
9399
+ * @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
9400
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9401
+ * @instance
9402
+ */
9403
+ UnbondingOutput.prototype.params = null;
9404
+
9405
+ /**
9406
+ * Creates a new UnbondingOutput instance using the specified properties.
9407
+ * @function create
9408
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9409
+ * @static
9410
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput=} [properties] Properties to set
9411
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} UnbondingOutput instance
9412
+ */
9413
+ UnbondingOutput.create = function create(properties) {
9414
+ return new UnbondingOutput(properties);
9415
+ };
9416
+
9417
+ /**
9418
+ * Encodes the specified UnbondingOutput message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.verify|verify} messages.
9419
+ * @function encode
9420
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9421
+ * @static
9422
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput} message UnbondingOutput message or plain object to encode
9423
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9424
+ * @returns {$protobuf.Writer} Writer
9425
+ */
9426
+ UnbondingOutput.encode = function encode(message, writer) {
9427
+ if (!writer)
9428
+ writer = $Writer.create();
9429
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
9430
+ $root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
9431
+ return writer;
9432
+ };
9433
+
9434
+ /**
9435
+ * Decodes an UnbondingOutput message from the specified reader or buffer.
9436
+ * @function decode
9437
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9438
+ * @static
9439
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9440
+ * @param {number} [length] Message length if known beforehand
9441
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} UnbondingOutput
9442
+ * @throws {Error} If the payload is not a reader or valid buffer
9443
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9444
+ */
9445
+ UnbondingOutput.decode = function decode(reader, length) {
9446
+ if (!(reader instanceof $Reader))
9447
+ reader = $Reader.create(reader);
9448
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput();
9449
+ while (reader.pos < end) {
9450
+ var tag = reader.uint32();
9451
+ switch (tag >>> 3) {
9452
+ case 1:
9453
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
9454
+ break;
9455
+ default:
9456
+ reader.skipType(tag & 7);
9457
+ break;
9458
+ }
9459
+ }
9460
+ return message;
9461
+ };
9462
+
9463
+ /**
9464
+ * Verifies an UnbondingOutput message.
9465
+ * @function verify
9466
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9467
+ * @static
9468
+ * @param {Object.<string,*>} message Plain object to verify
9469
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9470
+ */
9471
+ UnbondingOutput.verify = function verify(message) {
9472
+ if (typeof message !== "object" || message === null)
9473
+ return "object expected";
9474
+ if (message.params != null && message.hasOwnProperty("params")) {
9475
+ var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
9476
+ if (error)
9477
+ return "params." + error;
9478
+ }
9479
+ return null;
9480
+ };
9481
+
9482
+ /**
9483
+ * Creates an UnbondingOutput message from a plain object. Also converts values to their respective internal types.
9484
+ * @function fromObject
9485
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9486
+ * @static
9487
+ * @param {Object.<string,*>} object Plain object
9488
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} UnbondingOutput
9489
+ */
9490
+ UnbondingOutput.fromObject = function fromObject(object) {
9491
+ if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput)
9492
+ return object;
9493
+ var message = new $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput();
9494
+ if (object.params != null) {
9495
+ if (typeof object.params !== "object")
9496
+ throw TypeError(".TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.params: object expected");
9497
+ message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
9498
+ }
9499
+ return message;
9500
+ };
9501
+
9502
+ /**
9503
+ * Creates a plain object from an UnbondingOutput message. Also converts values to other types if specified.
9504
+ * @function toObject
9505
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9506
+ * @static
9507
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} message UnbondingOutput
9508
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9509
+ * @returns {Object.<string,*>} Plain object
9510
+ */
9511
+ UnbondingOutput.toObject = function toObject(message, options) {
9512
+ if (!options)
9513
+ options = {};
9514
+ var object = {};
9515
+ if (options.defaults)
9516
+ object.params = null;
9517
+ if (message.params != null && message.hasOwnProperty("params"))
9518
+ object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
9519
+ return object;
9520
+ };
9521
+
9522
+ /**
9523
+ * Converts this UnbondingOutput to JSON.
9524
+ * @function toJSON
9525
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
9526
+ * @instance
9527
+ * @returns {Object.<string,*>} JSON object
9528
+ */
9529
+ UnbondingOutput.prototype.toJSON = function toJSON() {
9530
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9531
+ };
9532
+
9533
+ return UnbondingOutput;
9534
+ })();
9535
+
9536
+ OutputBuilder.OpReturn = (function() {
9537
+
9538
+ /**
9539
+ * Properties of an OpReturn.
9540
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9541
+ * @interface IOpReturn
9542
+ * @property {Uint8Array|null} [tag] OpReturn tag
9543
+ * @property {Uint8Array|null} [stakerPublicKey] OpReturn stakerPublicKey
9544
+ * @property {Uint8Array|null} [finalityProviderPublicKey] OpReturn finalityProviderPublicKey
9545
+ * @property {number|null} [stakingTime] OpReturn stakingTime
9546
+ */
9547
+
9548
+ /**
9549
+ * Constructs a new OpReturn.
9550
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder
9551
+ * @classdesc Represents an OpReturn.
9552
+ * @implements IOpReturn
9553
+ * @constructor
9554
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn=} [properties] Properties to set
9555
+ */
9556
+ function OpReturn(properties) {
9557
+ if (properties)
9558
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9559
+ if (properties[keys[i]] != null)
9560
+ this[keys[i]] = properties[keys[i]];
9561
+ }
9562
+
9563
+ /**
9564
+ * OpReturn tag.
9565
+ * @member {Uint8Array} tag
9566
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9567
+ * @instance
9568
+ */
9569
+ OpReturn.prototype.tag = $util.newBuffer([]);
9570
+
9571
+ /**
9572
+ * OpReturn stakerPublicKey.
9573
+ * @member {Uint8Array} stakerPublicKey
9574
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9575
+ * @instance
9576
+ */
9577
+ OpReturn.prototype.stakerPublicKey = $util.newBuffer([]);
9578
+
9579
+ /**
9580
+ * OpReturn finalityProviderPublicKey.
9581
+ * @member {Uint8Array} finalityProviderPublicKey
9582
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9583
+ * @instance
9584
+ */
9585
+ OpReturn.prototype.finalityProviderPublicKey = $util.newBuffer([]);
9586
+
9587
+ /**
9588
+ * OpReturn stakingTime.
9589
+ * @member {number} stakingTime
9590
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9591
+ * @instance
9592
+ */
9593
+ OpReturn.prototype.stakingTime = 0;
9594
+
9595
+ /**
9596
+ * Creates a new OpReturn instance using the specified properties.
9597
+ * @function create
9598
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9599
+ * @static
9600
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn=} [properties] Properties to set
9601
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} OpReturn instance
9602
+ */
9603
+ OpReturn.create = function create(properties) {
9604
+ return new OpReturn(properties);
9605
+ };
9606
+
9607
+ /**
9608
+ * Encodes the specified OpReturn message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.OpReturn.verify|verify} messages.
9609
+ * @function encode
9610
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9611
+ * @static
9612
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn} message OpReturn message or plain object to encode
9613
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9614
+ * @returns {$protobuf.Writer} Writer
9615
+ */
9616
+ OpReturn.encode = function encode(message, writer) {
9617
+ if (!writer)
9618
+ writer = $Writer.create();
9619
+ if (message.tag != null && Object.hasOwnProperty.call(message, "tag"))
9620
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tag);
9621
+ if (message.stakerPublicKey != null && Object.hasOwnProperty.call(message, "stakerPublicKey"))
9622
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stakerPublicKey);
9623
+ if (message.finalityProviderPublicKey != null && Object.hasOwnProperty.call(message, "finalityProviderPublicKey"))
9624
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.finalityProviderPublicKey);
9625
+ if (message.stakingTime != null && Object.hasOwnProperty.call(message, "stakingTime"))
9626
+ writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stakingTime);
9627
+ return writer;
9628
+ };
9629
+
9630
+ /**
9631
+ * Decodes an OpReturn message from the specified reader or buffer.
9632
+ * @function decode
9633
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9634
+ * @static
9635
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9636
+ * @param {number} [length] Message length if known beforehand
9637
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} OpReturn
9638
+ * @throws {Error} If the payload is not a reader or valid buffer
9639
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9640
+ */
9641
+ OpReturn.decode = function decode(reader, length) {
9642
+ if (!(reader instanceof $Reader))
9643
+ reader = $Reader.create(reader);
9644
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn();
9645
+ while (reader.pos < end) {
9646
+ var tag = reader.uint32();
9647
+ switch (tag >>> 3) {
9648
+ case 1:
9649
+ message.tag = reader.bytes();
9650
+ break;
9651
+ case 2:
9652
+ message.stakerPublicKey = reader.bytes();
9653
+ break;
9654
+ case 3:
9655
+ message.finalityProviderPublicKey = reader.bytes();
9656
+ break;
9657
+ case 4:
9658
+ message.stakingTime = reader.uint32();
9659
+ break;
9660
+ default:
9661
+ reader.skipType(tag & 7);
9662
+ break;
9663
+ }
9664
+ }
9665
+ return message;
9666
+ };
9667
+
9668
+ /**
9669
+ * Verifies an OpReturn message.
9670
+ * @function verify
9671
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9672
+ * @static
9673
+ * @param {Object.<string,*>} message Plain object to verify
9674
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9675
+ */
9676
+ OpReturn.verify = function verify(message) {
9677
+ if (typeof message !== "object" || message === null)
9678
+ return "object expected";
9679
+ if (message.tag != null && message.hasOwnProperty("tag"))
9680
+ if (!(message.tag && typeof message.tag.length === "number" || $util.isString(message.tag)))
9681
+ return "tag: buffer expected";
9682
+ if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
9683
+ if (!(message.stakerPublicKey && typeof message.stakerPublicKey.length === "number" || $util.isString(message.stakerPublicKey)))
9684
+ return "stakerPublicKey: buffer expected";
9685
+ if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
9686
+ if (!(message.finalityProviderPublicKey && typeof message.finalityProviderPublicKey.length === "number" || $util.isString(message.finalityProviderPublicKey)))
9687
+ return "finalityProviderPublicKey: buffer expected";
9688
+ if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
9689
+ if (!$util.isInteger(message.stakingTime))
9690
+ return "stakingTime: integer expected";
9691
+ return null;
9692
+ };
9693
+
9694
+ /**
9695
+ * Creates an OpReturn message from a plain object. Also converts values to their respective internal types.
9696
+ * @function fromObject
9697
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9698
+ * @static
9699
+ * @param {Object.<string,*>} object Plain object
9700
+ * @returns {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} OpReturn
9701
+ */
9702
+ OpReturn.fromObject = function fromObject(object) {
9703
+ if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn)
9704
+ return object;
9705
+ var message = new $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn();
9706
+ if (object.tag != null)
9707
+ if (typeof object.tag === "string")
9708
+ $util.base64.decode(object.tag, message.tag = $util.newBuffer($util.base64.length(object.tag)), 0);
9709
+ else if (object.tag.length)
9710
+ message.tag = object.tag;
9711
+ if (object.stakerPublicKey != null)
9712
+ if (typeof object.stakerPublicKey === "string")
9713
+ $util.base64.decode(object.stakerPublicKey, message.stakerPublicKey = $util.newBuffer($util.base64.length(object.stakerPublicKey)), 0);
9714
+ else if (object.stakerPublicKey.length)
9715
+ message.stakerPublicKey = object.stakerPublicKey;
9716
+ if (object.finalityProviderPublicKey != null)
9717
+ if (typeof object.finalityProviderPublicKey === "string")
9718
+ $util.base64.decode(object.finalityProviderPublicKey, message.finalityProviderPublicKey = $util.newBuffer($util.base64.length(object.finalityProviderPublicKey)), 0);
9719
+ else if (object.finalityProviderPublicKey.length)
9720
+ message.finalityProviderPublicKey = object.finalityProviderPublicKey;
9721
+ if (object.stakingTime != null)
9722
+ message.stakingTime = object.stakingTime >>> 0;
9723
+ return message;
9724
+ };
9725
+
9726
+ /**
9727
+ * Creates a plain object from an OpReturn message. Also converts values to other types if specified.
9728
+ * @function toObject
9729
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9730
+ * @static
9731
+ * @param {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} message OpReturn
9732
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9733
+ * @returns {Object.<string,*>} Plain object
9734
+ */
9735
+ OpReturn.toObject = function toObject(message, options) {
9736
+ if (!options)
9737
+ options = {};
9738
+ var object = {};
9739
+ if (options.defaults) {
9740
+ if (options.bytes === String)
9741
+ object.tag = "";
9742
+ else {
9743
+ object.tag = [];
9744
+ if (options.bytes !== Array)
9745
+ object.tag = $util.newBuffer(object.tag);
9746
+ }
9747
+ if (options.bytes === String)
9748
+ object.stakerPublicKey = "";
9749
+ else {
9750
+ object.stakerPublicKey = [];
9751
+ if (options.bytes !== Array)
9752
+ object.stakerPublicKey = $util.newBuffer(object.stakerPublicKey);
9753
+ }
9754
+ if (options.bytes === String)
9755
+ object.finalityProviderPublicKey = "";
9756
+ else {
9757
+ object.finalityProviderPublicKey = [];
9758
+ if (options.bytes !== Array)
9759
+ object.finalityProviderPublicKey = $util.newBuffer(object.finalityProviderPublicKey);
9760
+ }
9761
+ object.stakingTime = 0;
9762
+ }
9763
+ if (message.tag != null && message.hasOwnProperty("tag"))
9764
+ object.tag = options.bytes === String ? $util.base64.encode(message.tag, 0, message.tag.length) : options.bytes === Array ? Array.prototype.slice.call(message.tag) : message.tag;
9765
+ if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
9766
+ object.stakerPublicKey = options.bytes === String ? $util.base64.encode(message.stakerPublicKey, 0, message.stakerPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.stakerPublicKey) : message.stakerPublicKey;
9767
+ if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
9768
+ object.finalityProviderPublicKey = options.bytes === String ? $util.base64.encode(message.finalityProviderPublicKey, 0, message.finalityProviderPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.finalityProviderPublicKey) : message.finalityProviderPublicKey;
9769
+ if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
9770
+ object.stakingTime = message.stakingTime;
9771
+ return object;
9772
+ };
9773
+
9774
+ /**
9775
+ * Converts this OpReturn to JSON.
9776
+ * @function toJSON
9777
+ * @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
9778
+ * @instance
9779
+ * @returns {Object.<string,*>} JSON object
9780
+ */
9781
+ OpReturn.prototype.toJSON = function toJSON() {
9782
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9783
+ };
9784
+
9785
+ return OpReturn;
9786
+ })();
9787
+
9788
+ return OutputBuilder;
9789
+ })();
9790
+
9791
+ return Proto;
9792
+ })();
9793
+
9794
+ return BabylonStaking;
9795
+ })();
9796
+
9797
+ TW.Barz = (function() {
9798
+
9799
+ /**
9800
+ * Namespace Barz.
9801
+ * @memberof TW
9802
+ * @namespace
9803
+ */
9804
+ var Barz = {};
9805
+
9806
+ Barz.Proto = (function() {
9807
+
9808
+ /**
9809
+ * Namespace Proto.
9810
+ * @memberof TW.Barz
9811
+ * @namespace
9812
+ */
9813
+ var Proto = {};
9814
+
9815
+ Proto.ContractAddressInput = (function() {
9816
+
9817
+ /**
9818
+ * Properties of a ContractAddressInput.
9819
+ * @memberof TW.Barz.Proto
9820
+ * @interface IContractAddressInput
9821
+ * @property {string|null} [entryPoint] ContractAddressInput entryPoint
9822
+ * @property {string|null} [factory] ContractAddressInput factory
9823
+ * @property {string|null} [accountFacet] ContractAddressInput accountFacet
9824
+ * @property {string|null} [verificationFacet] ContractAddressInput verificationFacet
9825
+ * @property {string|null} [facetRegistry] ContractAddressInput facetRegistry
9826
+ * @property {string|null} [defaultFallback] ContractAddressInput defaultFallback
9827
+ * @property {string|null} [bytecode] ContractAddressInput bytecode
9828
+ * @property {string|null} [publicKey] ContractAddressInput publicKey
9829
+ * @property {number|null} [salt] ContractAddressInput salt
9830
+ */
9831
+
9832
+ /**
9833
+ * Constructs a new ContractAddressInput.
9834
+ * @memberof TW.Barz.Proto
9835
+ * @classdesc Represents a ContractAddressInput.
9836
+ * @implements IContractAddressInput
9837
+ * @constructor
9838
+ * @param {TW.Barz.Proto.IContractAddressInput=} [properties] Properties to set
9839
+ */
9840
+ function ContractAddressInput(properties) {
9841
+ if (properties)
9842
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9843
+ if (properties[keys[i]] != null)
9844
+ this[keys[i]] = properties[keys[i]];
9845
+ }
9846
+
9847
+ /**
9848
+ * ContractAddressInput entryPoint.
9849
+ * @member {string} entryPoint
9850
+ * @memberof TW.Barz.Proto.ContractAddressInput
9851
+ * @instance
9852
+ */
9853
+ ContractAddressInput.prototype.entryPoint = "";
9854
+
9855
+ /**
9856
+ * ContractAddressInput factory.
9857
+ * @member {string} factory
9858
+ * @memberof TW.Barz.Proto.ContractAddressInput
9859
+ * @instance
9860
+ */
9861
+ ContractAddressInput.prototype.factory = "";
9862
+
9863
+ /**
9864
+ * ContractAddressInput accountFacet.
9865
+ * @member {string} accountFacet
9866
+ * @memberof TW.Barz.Proto.ContractAddressInput
9867
+ * @instance
9868
+ */
9869
+ ContractAddressInput.prototype.accountFacet = "";
9870
+
9871
+ /**
9872
+ * ContractAddressInput verificationFacet.
9873
+ * @member {string} verificationFacet
9874
+ * @memberof TW.Barz.Proto.ContractAddressInput
9875
+ * @instance
9876
+ */
9877
+ ContractAddressInput.prototype.verificationFacet = "";
9878
+
9879
+ /**
9880
+ * ContractAddressInput facetRegistry.
9881
+ * @member {string} facetRegistry
9882
+ * @memberof TW.Barz.Proto.ContractAddressInput
9883
+ * @instance
9884
+ */
9885
+ ContractAddressInput.prototype.facetRegistry = "";
9886
+
9887
+ /**
9888
+ * ContractAddressInput defaultFallback.
9889
+ * @member {string} defaultFallback
9890
+ * @memberof TW.Barz.Proto.ContractAddressInput
9891
+ * @instance
9892
+ */
9893
+ ContractAddressInput.prototype.defaultFallback = "";
9894
+
7359
9895
  /**
7360
9896
  * ContractAddressInput bytecode.
7361
9897
  * @member {string} bytecode
@@ -17635,6 +20171,7 @@
17635
20171
  * @property {boolean|null} [useMaxUtxo] SigningInput useMaxUtxo
17636
20172
  * @property {boolean|null} [disableDustFilter] SigningInput disableDustFilter
17637
20173
  * @property {number|null} [time] SigningInput time
20174
+ * @property {boolean|null} [zip_0317] SigningInput zip_0317
17638
20175
  * @property {TW.BitcoinV2.Proto.ISigningInput|null} [signingV2] SigningInput signingV2
17639
20176
  * @property {Long|null} [fixedDustThreshold] SigningInput fixedDustThreshold
17640
20177
  */
@@ -17802,6 +20339,14 @@
17802
20339
  */
17803
20340
  SigningInput.prototype.time = 0;
17804
20341
 
20342
+ /**
20343
+ * SigningInput zip_0317.
20344
+ * @member {boolean} zip_0317
20345
+ * @memberof TW.Bitcoin.Proto.SigningInput
20346
+ * @instance
20347
+ */
20348
+ SigningInput.prototype.zip_0317 = false;
20349
+
17805
20350
  /**
17806
20351
  * SigningInput signingV2.
17807
20352
  * @member {TW.BitcoinV2.Proto.ISigningInput|null|undefined} signingV2
@@ -17894,6 +20439,8 @@
17894
20439
  writer.uint32(/* id 16, wireType 0 =*/128).bool(message.disableDustFilter);
17895
20440
  if (message.time != null && Object.hasOwnProperty.call(message, "time"))
17896
20441
  writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.time);
20442
+ if (message.zip_0317 != null && Object.hasOwnProperty.call(message, "zip_0317"))
20443
+ writer.uint32(/* id 18, wireType 0 =*/144).bool(message.zip_0317);
17897
20444
  if (message.signingV2 != null && Object.hasOwnProperty.call(message, "signingV2"))
17898
20445
  $root.TW.BitcoinV2.Proto.SigningInput.encode(message.signingV2, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
17899
20446
  if (message.fixedDustThreshold != null && Object.hasOwnProperty.call(message, "fixedDustThreshold"))
@@ -18000,6 +20547,9 @@
18000
20547
  case 17:
18001
20548
  message.time = reader.uint32();
18002
20549
  break;
20550
+ case 18:
20551
+ message.zip_0317 = reader.bool();
20552
+ break;
18003
20553
  case 21:
18004
20554
  message.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.decode(reader, reader.uint32());
18005
20555
  break;
@@ -18105,6 +20655,9 @@
18105
20655
  if (message.time != null && message.hasOwnProperty("time"))
18106
20656
  if (!$util.isInteger(message.time))
18107
20657
  return "time: integer expected";
20658
+ if (message.zip_0317 != null && message.hasOwnProperty("zip_0317"))
20659
+ if (typeof message.zip_0317 !== "boolean")
20660
+ return "zip_0317: boolean expected";
18108
20661
  if (message.signingV2 != null && message.hasOwnProperty("signingV2")) {
18109
20662
  var error = $root.TW.BitcoinV2.Proto.SigningInput.verify(message.signingV2);
18110
20663
  if (error)
@@ -18221,6 +20774,8 @@
18221
20774
  message.disableDustFilter = Boolean(object.disableDustFilter);
18222
20775
  if (object.time != null)
18223
20776
  message.time = object.time >>> 0;
20777
+ if (object.zip_0317 != null)
20778
+ message.zip_0317 = Boolean(object.zip_0317);
18224
20779
  if (object.signingV2 != null) {
18225
20780
  if (typeof object.signingV2 !== "object")
18226
20781
  throw TypeError(".TW.Bitcoin.Proto.SigningInput.signingV2: object expected");
@@ -18286,6 +20841,7 @@
18286
20841
  object.useMaxUtxo = false;
18287
20842
  object.disableDustFilter = false;
18288
20843
  object.time = 0;
20844
+ object.zip_0317 = false;
18289
20845
  object.signingV2 = null;
18290
20846
  object.outputOpReturnIndex = null;
18291
20847
  }
@@ -18342,6 +20898,8 @@
18342
20898
  object.disableDustFilter = message.disableDustFilter;
18343
20899
  if (message.time != null && message.hasOwnProperty("time"))
18344
20900
  object.time = message.time;
20901
+ if (message.zip_0317 != null && message.hasOwnProperty("zip_0317"))
20902
+ object.zip_0317 = message.zip_0317;
18345
20903
  if (message.signingV2 != null && message.hasOwnProperty("signingV2"))
18346
20904
  object.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.toObject(message.signingV2, options);
18347
20905
  if (message.fixedDustThreshold != null && message.hasOwnProperty("fixedDustThreshold")) {
@@ -20115,81 +22673,277 @@
20115
22673
  PublicKeyOrHash.prototype.pubkey = null;
20116
22674
 
20117
22675
  /**
20118
- * PublicKeyOrHash hash.
20119
- * @member {Uint8Array|null|undefined} hash
20120
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22676
+ * PublicKeyOrHash hash.
22677
+ * @member {Uint8Array|null|undefined} hash
22678
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22679
+ * @instance
22680
+ */
22681
+ PublicKeyOrHash.prototype.hash = null;
22682
+
22683
+ // OneOf field names bound to virtual getters and setters
22684
+ var $oneOfFields;
22685
+
22686
+ /**
22687
+ * PublicKeyOrHash variant.
22688
+ * @member {"pubkey"|"hash"|undefined} variant
22689
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22690
+ * @instance
22691
+ */
22692
+ Object.defineProperty(PublicKeyOrHash.prototype, "variant", {
22693
+ get: $util.oneOfGetter($oneOfFields = ["pubkey", "hash"]),
22694
+ set: $util.oneOfSetter($oneOfFields)
22695
+ });
22696
+
22697
+ /**
22698
+ * Creates a new PublicKeyOrHash instance using the specified properties.
22699
+ * @function create
22700
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22701
+ * @static
22702
+ * @param {TW.BitcoinV2.Proto.IPublicKeyOrHash=} [properties] Properties to set
22703
+ * @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash instance
22704
+ */
22705
+ PublicKeyOrHash.create = function create(properties) {
22706
+ return new PublicKeyOrHash(properties);
22707
+ };
22708
+
22709
+ /**
22710
+ * Encodes the specified PublicKeyOrHash message. Does not implicitly {@link TW.BitcoinV2.Proto.PublicKeyOrHash.verify|verify} messages.
22711
+ * @function encode
22712
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22713
+ * @static
22714
+ * @param {TW.BitcoinV2.Proto.IPublicKeyOrHash} message PublicKeyOrHash message or plain object to encode
22715
+ * @param {$protobuf.Writer} [writer] Writer to encode to
22716
+ * @returns {$protobuf.Writer} Writer
22717
+ */
22718
+ PublicKeyOrHash.encode = function encode(message, writer) {
22719
+ if (!writer)
22720
+ writer = $Writer.create();
22721
+ if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey"))
22722
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.pubkey);
22723
+ if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
22724
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
22725
+ return writer;
22726
+ };
22727
+
22728
+ /**
22729
+ * Decodes a PublicKeyOrHash message from the specified reader or buffer.
22730
+ * @function decode
22731
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22732
+ * @static
22733
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
22734
+ * @param {number} [length] Message length if known beforehand
22735
+ * @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash
22736
+ * @throws {Error} If the payload is not a reader or valid buffer
22737
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
22738
+ */
22739
+ PublicKeyOrHash.decode = function decode(reader, length) {
22740
+ if (!(reader instanceof $Reader))
22741
+ reader = $Reader.create(reader);
22742
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BitcoinV2.Proto.PublicKeyOrHash();
22743
+ while (reader.pos < end) {
22744
+ var tag = reader.uint32();
22745
+ switch (tag >>> 3) {
22746
+ case 1:
22747
+ message.pubkey = reader.bytes();
22748
+ break;
22749
+ case 2:
22750
+ message.hash = reader.bytes();
22751
+ break;
22752
+ default:
22753
+ reader.skipType(tag & 7);
22754
+ break;
22755
+ }
22756
+ }
22757
+ return message;
22758
+ };
22759
+
22760
+ /**
22761
+ * Verifies a PublicKeyOrHash message.
22762
+ * @function verify
22763
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22764
+ * @static
22765
+ * @param {Object.<string,*>} message Plain object to verify
22766
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
22767
+ */
22768
+ PublicKeyOrHash.verify = function verify(message) {
22769
+ if (typeof message !== "object" || message === null)
22770
+ return "object expected";
22771
+ var properties = {};
22772
+ if (message.pubkey != null && message.hasOwnProperty("pubkey")) {
22773
+ properties.variant = 1;
22774
+ if (!(message.pubkey && typeof message.pubkey.length === "number" || $util.isString(message.pubkey)))
22775
+ return "pubkey: buffer expected";
22776
+ }
22777
+ if (message.hash != null && message.hasOwnProperty("hash")) {
22778
+ if (properties.variant === 1)
22779
+ return "variant: multiple values";
22780
+ properties.variant = 1;
22781
+ if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
22782
+ return "hash: buffer expected";
22783
+ }
22784
+ return null;
22785
+ };
22786
+
22787
+ /**
22788
+ * Creates a PublicKeyOrHash message from a plain object. Also converts values to their respective internal types.
22789
+ * @function fromObject
22790
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22791
+ * @static
22792
+ * @param {Object.<string,*>} object Plain object
22793
+ * @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash
22794
+ */
22795
+ PublicKeyOrHash.fromObject = function fromObject(object) {
22796
+ if (object instanceof $root.TW.BitcoinV2.Proto.PublicKeyOrHash)
22797
+ return object;
22798
+ var message = new $root.TW.BitcoinV2.Proto.PublicKeyOrHash();
22799
+ if (object.pubkey != null)
22800
+ if (typeof object.pubkey === "string")
22801
+ $util.base64.decode(object.pubkey, message.pubkey = $util.newBuffer($util.base64.length(object.pubkey)), 0);
22802
+ else if (object.pubkey.length)
22803
+ message.pubkey = object.pubkey;
22804
+ if (object.hash != null)
22805
+ if (typeof object.hash === "string")
22806
+ $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
22807
+ else if (object.hash.length)
22808
+ message.hash = object.hash;
22809
+ return message;
22810
+ };
22811
+
22812
+ /**
22813
+ * Creates a plain object from a PublicKeyOrHash message. Also converts values to other types if specified.
22814
+ * @function toObject
22815
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22816
+ * @static
22817
+ * @param {TW.BitcoinV2.Proto.PublicKeyOrHash} message PublicKeyOrHash
22818
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
22819
+ * @returns {Object.<string,*>} Plain object
22820
+ */
22821
+ PublicKeyOrHash.toObject = function toObject(message, options) {
22822
+ if (!options)
22823
+ options = {};
22824
+ var object = {};
22825
+ if (message.pubkey != null && message.hasOwnProperty("pubkey")) {
22826
+ object.pubkey = options.bytes === String ? $util.base64.encode(message.pubkey, 0, message.pubkey.length) : options.bytes === Array ? Array.prototype.slice.call(message.pubkey) : message.pubkey;
22827
+ if (options.oneofs)
22828
+ object.variant = "pubkey";
22829
+ }
22830
+ if (message.hash != null && message.hasOwnProperty("hash")) {
22831
+ object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
22832
+ if (options.oneofs)
22833
+ object.variant = "hash";
22834
+ }
22835
+ return object;
22836
+ };
22837
+
22838
+ /**
22839
+ * Converts this PublicKeyOrHash to JSON.
22840
+ * @function toJSON
22841
+ * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22842
+ * @instance
22843
+ * @returns {Object.<string,*>} JSON object
22844
+ */
22845
+ PublicKeyOrHash.prototype.toJSON = function toJSON() {
22846
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
22847
+ };
22848
+
22849
+ return PublicKeyOrHash;
22850
+ })();
22851
+
22852
+ Proto.PublicKeySignature = (function() {
22853
+
22854
+ /**
22855
+ * Properties of a PublicKeySignature.
22856
+ * @memberof TW.BitcoinV2.Proto
22857
+ * @interface IPublicKeySignature
22858
+ * @property {Uint8Array|null} [publicKey] PublicKeySignature publicKey
22859
+ * @property {Uint8Array|null} [signature] PublicKeySignature signature
22860
+ */
22861
+
22862
+ /**
22863
+ * Constructs a new PublicKeySignature.
22864
+ * @memberof TW.BitcoinV2.Proto
22865
+ * @classdesc Represents a PublicKeySignature.
22866
+ * @implements IPublicKeySignature
22867
+ * @constructor
22868
+ * @param {TW.BitcoinV2.Proto.IPublicKeySignature=} [properties] Properties to set
22869
+ */
22870
+ function PublicKeySignature(properties) {
22871
+ if (properties)
22872
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
22873
+ if (properties[keys[i]] != null)
22874
+ this[keys[i]] = properties[keys[i]];
22875
+ }
22876
+
22877
+ /**
22878
+ * PublicKeySignature publicKey.
22879
+ * @member {Uint8Array} publicKey
22880
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20121
22881
  * @instance
20122
22882
  */
20123
- PublicKeyOrHash.prototype.hash = null;
20124
-
20125
- // OneOf field names bound to virtual getters and setters
20126
- var $oneOfFields;
22883
+ PublicKeySignature.prototype.publicKey = $util.newBuffer([]);
20127
22884
 
20128
22885
  /**
20129
- * PublicKeyOrHash variant.
20130
- * @member {"pubkey"|"hash"|undefined} variant
20131
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22886
+ * PublicKeySignature signature.
22887
+ * @member {Uint8Array} signature
22888
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20132
22889
  * @instance
20133
22890
  */
20134
- Object.defineProperty(PublicKeyOrHash.prototype, "variant", {
20135
- get: $util.oneOfGetter($oneOfFields = ["pubkey", "hash"]),
20136
- set: $util.oneOfSetter($oneOfFields)
20137
- });
22891
+ PublicKeySignature.prototype.signature = $util.newBuffer([]);
20138
22892
 
20139
22893
  /**
20140
- * Creates a new PublicKeyOrHash instance using the specified properties.
22894
+ * Creates a new PublicKeySignature instance using the specified properties.
20141
22895
  * @function create
20142
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22896
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20143
22897
  * @static
20144
- * @param {TW.BitcoinV2.Proto.IPublicKeyOrHash=} [properties] Properties to set
20145
- * @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash instance
22898
+ * @param {TW.BitcoinV2.Proto.IPublicKeySignature=} [properties] Properties to set
22899
+ * @returns {TW.BitcoinV2.Proto.PublicKeySignature} PublicKeySignature instance
20146
22900
  */
20147
- PublicKeyOrHash.create = function create(properties) {
20148
- return new PublicKeyOrHash(properties);
22901
+ PublicKeySignature.create = function create(properties) {
22902
+ return new PublicKeySignature(properties);
20149
22903
  };
20150
22904
 
20151
22905
  /**
20152
- * Encodes the specified PublicKeyOrHash message. Does not implicitly {@link TW.BitcoinV2.Proto.PublicKeyOrHash.verify|verify} messages.
22906
+ * Encodes the specified PublicKeySignature message. Does not implicitly {@link TW.BitcoinV2.Proto.PublicKeySignature.verify|verify} messages.
20153
22907
  * @function encode
20154
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22908
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20155
22909
  * @static
20156
- * @param {TW.BitcoinV2.Proto.IPublicKeyOrHash} message PublicKeyOrHash message or plain object to encode
22910
+ * @param {TW.BitcoinV2.Proto.IPublicKeySignature} message PublicKeySignature message or plain object to encode
20157
22911
  * @param {$protobuf.Writer} [writer] Writer to encode to
20158
22912
  * @returns {$protobuf.Writer} Writer
20159
22913
  */
20160
- PublicKeyOrHash.encode = function encode(message, writer) {
22914
+ PublicKeySignature.encode = function encode(message, writer) {
20161
22915
  if (!writer)
20162
22916
  writer = $Writer.create();
20163
- if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey"))
20164
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.pubkey);
20165
- if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
20166
- writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
22917
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
22918
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey);
22919
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
22920
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature);
20167
22921
  return writer;
20168
22922
  };
20169
22923
 
20170
22924
  /**
20171
- * Decodes a PublicKeyOrHash message from the specified reader or buffer.
22925
+ * Decodes a PublicKeySignature message from the specified reader or buffer.
20172
22926
  * @function decode
20173
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22927
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20174
22928
  * @static
20175
22929
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20176
22930
  * @param {number} [length] Message length if known beforehand
20177
- * @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash
22931
+ * @returns {TW.BitcoinV2.Proto.PublicKeySignature} PublicKeySignature
20178
22932
  * @throws {Error} If the payload is not a reader or valid buffer
20179
22933
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
20180
22934
  */
20181
- PublicKeyOrHash.decode = function decode(reader, length) {
22935
+ PublicKeySignature.decode = function decode(reader, length) {
20182
22936
  if (!(reader instanceof $Reader))
20183
22937
  reader = $Reader.create(reader);
20184
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BitcoinV2.Proto.PublicKeyOrHash();
22938
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BitcoinV2.Proto.PublicKeySignature();
20185
22939
  while (reader.pos < end) {
20186
22940
  var tag = reader.uint32();
20187
22941
  switch (tag >>> 3) {
20188
22942
  case 1:
20189
- message.pubkey = reader.bytes();
22943
+ message.publicKey = reader.bytes();
20190
22944
  break;
20191
22945
  case 2:
20192
- message.hash = reader.bytes();
22946
+ message.signature = reader.bytes();
20193
22947
  break;
20194
22948
  default:
20195
22949
  reader.skipType(tag & 7);
@@ -20200,95 +22954,98 @@
20200
22954
  };
20201
22955
 
20202
22956
  /**
20203
- * Verifies a PublicKeyOrHash message.
22957
+ * Verifies a PublicKeySignature message.
20204
22958
  * @function verify
20205
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22959
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20206
22960
  * @static
20207
22961
  * @param {Object.<string,*>} message Plain object to verify
20208
22962
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
20209
22963
  */
20210
- PublicKeyOrHash.verify = function verify(message) {
22964
+ PublicKeySignature.verify = function verify(message) {
20211
22965
  if (typeof message !== "object" || message === null)
20212
22966
  return "object expected";
20213
- var properties = {};
20214
- if (message.pubkey != null && message.hasOwnProperty("pubkey")) {
20215
- properties.variant = 1;
20216
- if (!(message.pubkey && typeof message.pubkey.length === "number" || $util.isString(message.pubkey)))
20217
- return "pubkey: buffer expected";
20218
- }
20219
- if (message.hash != null && message.hasOwnProperty("hash")) {
20220
- if (properties.variant === 1)
20221
- return "variant: multiple values";
20222
- properties.variant = 1;
20223
- if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
20224
- return "hash: buffer expected";
20225
- }
22967
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
22968
+ if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
22969
+ return "publicKey: buffer expected";
22970
+ if (message.signature != null && message.hasOwnProperty("signature"))
22971
+ if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
22972
+ return "signature: buffer expected";
20226
22973
  return null;
20227
22974
  };
20228
22975
 
20229
22976
  /**
20230
- * Creates a PublicKeyOrHash message from a plain object. Also converts values to their respective internal types.
22977
+ * Creates a PublicKeySignature message from a plain object. Also converts values to their respective internal types.
20231
22978
  * @function fromObject
20232
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
22979
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20233
22980
  * @static
20234
22981
  * @param {Object.<string,*>} object Plain object
20235
- * @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash
22982
+ * @returns {TW.BitcoinV2.Proto.PublicKeySignature} PublicKeySignature
20236
22983
  */
20237
- PublicKeyOrHash.fromObject = function fromObject(object) {
20238
- if (object instanceof $root.TW.BitcoinV2.Proto.PublicKeyOrHash)
22984
+ PublicKeySignature.fromObject = function fromObject(object) {
22985
+ if (object instanceof $root.TW.BitcoinV2.Proto.PublicKeySignature)
20239
22986
  return object;
20240
- var message = new $root.TW.BitcoinV2.Proto.PublicKeyOrHash();
20241
- if (object.pubkey != null)
20242
- if (typeof object.pubkey === "string")
20243
- $util.base64.decode(object.pubkey, message.pubkey = $util.newBuffer($util.base64.length(object.pubkey)), 0);
20244
- else if (object.pubkey.length)
20245
- message.pubkey = object.pubkey;
20246
- if (object.hash != null)
20247
- if (typeof object.hash === "string")
20248
- $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
20249
- else if (object.hash.length)
20250
- message.hash = object.hash;
22987
+ var message = new $root.TW.BitcoinV2.Proto.PublicKeySignature();
22988
+ if (object.publicKey != null)
22989
+ if (typeof object.publicKey === "string")
22990
+ $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
22991
+ else if (object.publicKey.length)
22992
+ message.publicKey = object.publicKey;
22993
+ if (object.signature != null)
22994
+ if (typeof object.signature === "string")
22995
+ $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
22996
+ else if (object.signature.length)
22997
+ message.signature = object.signature;
20251
22998
  return message;
20252
22999
  };
20253
23000
 
20254
23001
  /**
20255
- * Creates a plain object from a PublicKeyOrHash message. Also converts values to other types if specified.
23002
+ * Creates a plain object from a PublicKeySignature message. Also converts values to other types if specified.
20256
23003
  * @function toObject
20257
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
23004
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20258
23005
  * @static
20259
- * @param {TW.BitcoinV2.Proto.PublicKeyOrHash} message PublicKeyOrHash
23006
+ * @param {TW.BitcoinV2.Proto.PublicKeySignature} message PublicKeySignature
20260
23007
  * @param {$protobuf.IConversionOptions} [options] Conversion options
20261
23008
  * @returns {Object.<string,*>} Plain object
20262
23009
  */
20263
- PublicKeyOrHash.toObject = function toObject(message, options) {
23010
+ PublicKeySignature.toObject = function toObject(message, options) {
20264
23011
  if (!options)
20265
23012
  options = {};
20266
23013
  var object = {};
20267
- if (message.pubkey != null && message.hasOwnProperty("pubkey")) {
20268
- object.pubkey = options.bytes === String ? $util.base64.encode(message.pubkey, 0, message.pubkey.length) : options.bytes === Array ? Array.prototype.slice.call(message.pubkey) : message.pubkey;
20269
- if (options.oneofs)
20270
- object.variant = "pubkey";
20271
- }
20272
- if (message.hash != null && message.hasOwnProperty("hash")) {
20273
- object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
20274
- if (options.oneofs)
20275
- object.variant = "hash";
23014
+ if (options.defaults) {
23015
+ if (options.bytes === String)
23016
+ object.publicKey = "";
23017
+ else {
23018
+ object.publicKey = [];
23019
+ if (options.bytes !== Array)
23020
+ object.publicKey = $util.newBuffer(object.publicKey);
23021
+ }
23022
+ if (options.bytes === String)
23023
+ object.signature = "";
23024
+ else {
23025
+ object.signature = [];
23026
+ if (options.bytes !== Array)
23027
+ object.signature = $util.newBuffer(object.signature);
23028
+ }
20276
23029
  }
23030
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
23031
+ 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;
23032
+ if (message.signature != null && message.hasOwnProperty("signature"))
23033
+ 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;
20277
23034
  return object;
20278
23035
  };
20279
23036
 
20280
23037
  /**
20281
- * Converts this PublicKeyOrHash to JSON.
23038
+ * Converts this PublicKeySignature to JSON.
20282
23039
  * @function toJSON
20283
- * @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
23040
+ * @memberof TW.BitcoinV2.Proto.PublicKeySignature
20284
23041
  * @instance
20285
23042
  * @returns {Object.<string,*>} JSON object
20286
23043
  */
20287
- PublicKeyOrHash.prototype.toJSON = function toJSON() {
23044
+ PublicKeySignature.prototype.toJSON = function toJSON() {
20288
23045
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20289
23046
  };
20290
23047
 
20291
- return PublicKeyOrHash;
23048
+ return PublicKeySignature;
20292
23049
  })();
20293
23050
 
20294
23051
  Proto.OutPoint = (function() {
@@ -21002,6 +23759,11 @@
21002
23759
  * @property {TW.BitcoinV2.Proto.IPublicKeyOrHash|null} [p2wpkh] InputBuilder p2wpkh
21003
23760
  * @property {Uint8Array|null} [p2trKeyPath] InputBuilder p2trKeyPath
21004
23761
  * @property {TW.BitcoinV2.Proto.Input.IInputBrc20Inscription|null} [brc20Inscribe] InputBuilder brc20Inscribe
23762
+ * @property {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath|null} [babylonStakingTimelockPath] InputBuilder babylonStakingTimelockPath
23763
+ * @property {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath|null} [babylonStakingUnbondingPath] InputBuilder babylonStakingUnbondingPath
23764
+ * @property {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath|null} [babylonStakingSlashingPath] InputBuilder babylonStakingSlashingPath
23765
+ * @property {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath|null} [babylonUnbondingTimelockPath] InputBuilder babylonUnbondingTimelockPath
23766
+ * @property {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath|null} [babylonUnbondingSlashingPath] InputBuilder babylonUnbondingSlashingPath
21005
23767
  */
21006
23768
 
21007
23769
  /**
@@ -21059,17 +23821,57 @@
21059
23821
  */
21060
23822
  InputBuilder.prototype.brc20Inscribe = null;
21061
23823
 
23824
+ /**
23825
+ * InputBuilder babylonStakingTimelockPath.
23826
+ * @member {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath|null|undefined} babylonStakingTimelockPath
23827
+ * @memberof TW.BitcoinV2.Proto.Input.InputBuilder
23828
+ * @instance
23829
+ */
23830
+ InputBuilder.prototype.babylonStakingTimelockPath = null;
23831
+
23832
+ /**
23833
+ * InputBuilder babylonStakingUnbondingPath.
23834
+ * @member {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath|null|undefined} babylonStakingUnbondingPath
23835
+ * @memberof TW.BitcoinV2.Proto.Input.InputBuilder
23836
+ * @instance
23837
+ */
23838
+ InputBuilder.prototype.babylonStakingUnbondingPath = null;
23839
+
23840
+ /**
23841
+ * InputBuilder babylonStakingSlashingPath.
23842
+ * @member {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath|null|undefined} babylonStakingSlashingPath
23843
+ * @memberof TW.BitcoinV2.Proto.Input.InputBuilder
23844
+ * @instance
23845
+ */
23846
+ InputBuilder.prototype.babylonStakingSlashingPath = null;
23847
+
23848
+ /**
23849
+ * InputBuilder babylonUnbondingTimelockPath.
23850
+ * @member {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath|null|undefined} babylonUnbondingTimelockPath
23851
+ * @memberof TW.BitcoinV2.Proto.Input.InputBuilder
23852
+ * @instance
23853
+ */
23854
+ InputBuilder.prototype.babylonUnbondingTimelockPath = null;
23855
+
23856
+ /**
23857
+ * InputBuilder babylonUnbondingSlashingPath.
23858
+ * @member {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath|null|undefined} babylonUnbondingSlashingPath
23859
+ * @memberof TW.BitcoinV2.Proto.Input.InputBuilder
23860
+ * @instance
23861
+ */
23862
+ InputBuilder.prototype.babylonUnbondingSlashingPath = null;
23863
+
21062
23864
  // OneOf field names bound to virtual getters and setters
21063
23865
  var $oneOfFields;
21064
23866
 
21065
23867
  /**
21066
23868
  * InputBuilder variant.
21067
- * @member {"p2pk"|"p2pkh"|"p2wpkh"|"p2trKeyPath"|"brc20Inscribe"|undefined} variant
23869
+ * @member {"p2pk"|"p2pkh"|"p2wpkh"|"p2trKeyPath"|"brc20Inscribe"|"babylonStakingTimelockPath"|"babylonStakingUnbondingPath"|"babylonStakingSlashingPath"|"babylonUnbondingTimelockPath"|"babylonUnbondingSlashingPath"|undefined} variant
21068
23870
  * @memberof TW.BitcoinV2.Proto.Input.InputBuilder
21069
23871
  * @instance
21070
23872
  */
21071
23873
  Object.defineProperty(InputBuilder.prototype, "variant", {
21072
- get: $util.oneOfGetter($oneOfFields = ["p2pk", "p2pkh", "p2wpkh", "p2trKeyPath", "brc20Inscribe"]),
23874
+ get: $util.oneOfGetter($oneOfFields = ["p2pk", "p2pkh", "p2wpkh", "p2trKeyPath", "brc20Inscribe", "babylonStakingTimelockPath", "babylonStakingUnbondingPath", "babylonStakingSlashingPath", "babylonUnbondingTimelockPath", "babylonUnbondingSlashingPath"]),
21073
23875
  set: $util.oneOfSetter($oneOfFields)
21074
23876
  });
21075
23877
 
@@ -21107,6 +23909,16 @@
21107
23909
  writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.p2trKeyPath);
21108
23910
  if (message.brc20Inscribe != null && Object.hasOwnProperty.call(message, "brc20Inscribe"))
21109
23911
  $root.TW.BitcoinV2.Proto.Input.InputBrc20Inscription.encode(message.brc20Inscribe, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
23912
+ if (message.babylonStakingTimelockPath != null && Object.hasOwnProperty.call(message, "babylonStakingTimelockPath"))
23913
+ $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.encode(message.babylonStakingTimelockPath, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
23914
+ if (message.babylonStakingUnbondingPath != null && Object.hasOwnProperty.call(message, "babylonStakingUnbondingPath"))
23915
+ $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.encode(message.babylonStakingUnbondingPath, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
23916
+ if (message.babylonStakingSlashingPath != null && Object.hasOwnProperty.call(message, "babylonStakingSlashingPath"))
23917
+ $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.encode(message.babylonStakingSlashingPath, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
23918
+ if (message.babylonUnbondingTimelockPath != null && Object.hasOwnProperty.call(message, "babylonUnbondingTimelockPath"))
23919
+ $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.encode(message.babylonUnbondingTimelockPath, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
23920
+ if (message.babylonUnbondingSlashingPath != null && Object.hasOwnProperty.call(message, "babylonUnbondingSlashingPath"))
23921
+ $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.encode(message.babylonUnbondingSlashingPath, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
21110
23922
  return writer;
21111
23923
  };
21112
23924
 
@@ -21143,6 +23955,21 @@
21143
23955
  case 9:
21144
23956
  message.brc20Inscribe = $root.TW.BitcoinV2.Proto.Input.InputBrc20Inscription.decode(reader, reader.uint32());
21145
23957
  break;
23958
+ case 15:
23959
+ message.babylonStakingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.decode(reader, reader.uint32());
23960
+ break;
23961
+ case 16:
23962
+ message.babylonStakingUnbondingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.decode(reader, reader.uint32());
23963
+ break;
23964
+ case 17:
23965
+ message.babylonStakingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.decode(reader, reader.uint32());
23966
+ break;
23967
+ case 18:
23968
+ message.babylonUnbondingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.decode(reader, reader.uint32());
23969
+ break;
23970
+ case 19:
23971
+ message.babylonUnbondingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.decode(reader, reader.uint32());
23972
+ break;
21146
23973
  default:
21147
23974
  reader.skipType(tag & 7);
21148
23975
  break;
@@ -21205,6 +24032,56 @@
21205
24032
  return "brc20Inscribe." + error;
21206
24033
  }
21207
24034
  }
24035
+ if (message.babylonStakingTimelockPath != null && message.hasOwnProperty("babylonStakingTimelockPath")) {
24036
+ if (properties.variant === 1)
24037
+ return "variant: multiple values";
24038
+ properties.variant = 1;
24039
+ {
24040
+ var error = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.verify(message.babylonStakingTimelockPath);
24041
+ if (error)
24042
+ return "babylonStakingTimelockPath." + error;
24043
+ }
24044
+ }
24045
+ if (message.babylonStakingUnbondingPath != null && message.hasOwnProperty("babylonStakingUnbondingPath")) {
24046
+ if (properties.variant === 1)
24047
+ return "variant: multiple values";
24048
+ properties.variant = 1;
24049
+ {
24050
+ var error = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.verify(message.babylonStakingUnbondingPath);
24051
+ if (error)
24052
+ return "babylonStakingUnbondingPath." + error;
24053
+ }
24054
+ }
24055
+ if (message.babylonStakingSlashingPath != null && message.hasOwnProperty("babylonStakingSlashingPath")) {
24056
+ if (properties.variant === 1)
24057
+ return "variant: multiple values";
24058
+ properties.variant = 1;
24059
+ {
24060
+ var error = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.verify(message.babylonStakingSlashingPath);
24061
+ if (error)
24062
+ return "babylonStakingSlashingPath." + error;
24063
+ }
24064
+ }
24065
+ if (message.babylonUnbondingTimelockPath != null && message.hasOwnProperty("babylonUnbondingTimelockPath")) {
24066
+ if (properties.variant === 1)
24067
+ return "variant: multiple values";
24068
+ properties.variant = 1;
24069
+ {
24070
+ var error = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.verify(message.babylonUnbondingTimelockPath);
24071
+ if (error)
24072
+ return "babylonUnbondingTimelockPath." + error;
24073
+ }
24074
+ }
24075
+ if (message.babylonUnbondingSlashingPath != null && message.hasOwnProperty("babylonUnbondingSlashingPath")) {
24076
+ if (properties.variant === 1)
24077
+ return "variant: multiple values";
24078
+ properties.variant = 1;
24079
+ {
24080
+ var error = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.verify(message.babylonUnbondingSlashingPath);
24081
+ if (error)
24082
+ return "babylonUnbondingSlashingPath." + error;
24083
+ }
24084
+ }
21208
24085
  return null;
21209
24086
  };
21210
24087
 
@@ -21245,6 +24122,31 @@
21245
24122
  throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.brc20Inscribe: object expected");
21246
24123
  message.brc20Inscribe = $root.TW.BitcoinV2.Proto.Input.InputBrc20Inscription.fromObject(object.brc20Inscribe);
21247
24124
  }
24125
+ if (object.babylonStakingTimelockPath != null) {
24126
+ if (typeof object.babylonStakingTimelockPath !== "object")
24127
+ throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonStakingTimelockPath: object expected");
24128
+ message.babylonStakingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.fromObject(object.babylonStakingTimelockPath);
24129
+ }
24130
+ if (object.babylonStakingUnbondingPath != null) {
24131
+ if (typeof object.babylonStakingUnbondingPath !== "object")
24132
+ throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonStakingUnbondingPath: object expected");
24133
+ message.babylonStakingUnbondingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.fromObject(object.babylonStakingUnbondingPath);
24134
+ }
24135
+ if (object.babylonStakingSlashingPath != null) {
24136
+ if (typeof object.babylonStakingSlashingPath !== "object")
24137
+ throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonStakingSlashingPath: object expected");
24138
+ message.babylonStakingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.fromObject(object.babylonStakingSlashingPath);
24139
+ }
24140
+ if (object.babylonUnbondingTimelockPath != null) {
24141
+ if (typeof object.babylonUnbondingTimelockPath !== "object")
24142
+ throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonUnbondingTimelockPath: object expected");
24143
+ message.babylonUnbondingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.fromObject(object.babylonUnbondingTimelockPath);
24144
+ }
24145
+ if (object.babylonUnbondingSlashingPath != null) {
24146
+ if (typeof object.babylonUnbondingSlashingPath !== "object")
24147
+ throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonUnbondingSlashingPath: object expected");
24148
+ message.babylonUnbondingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.fromObject(object.babylonUnbondingSlashingPath);
24149
+ }
21248
24150
  return message;
21249
24151
  };
21250
24152
 
@@ -21286,6 +24188,31 @@
21286
24188
  if (options.oneofs)
21287
24189
  object.variant = "brc20Inscribe";
21288
24190
  }
24191
+ if (message.babylonStakingTimelockPath != null && message.hasOwnProperty("babylonStakingTimelockPath")) {
24192
+ object.babylonStakingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.toObject(message.babylonStakingTimelockPath, options);
24193
+ if (options.oneofs)
24194
+ object.variant = "babylonStakingTimelockPath";
24195
+ }
24196
+ if (message.babylonStakingUnbondingPath != null && message.hasOwnProperty("babylonStakingUnbondingPath")) {
24197
+ object.babylonStakingUnbondingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.toObject(message.babylonStakingUnbondingPath, options);
24198
+ if (options.oneofs)
24199
+ object.variant = "babylonStakingUnbondingPath";
24200
+ }
24201
+ if (message.babylonStakingSlashingPath != null && message.hasOwnProperty("babylonStakingSlashingPath")) {
24202
+ object.babylonStakingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.toObject(message.babylonStakingSlashingPath, options);
24203
+ if (options.oneofs)
24204
+ object.variant = "babylonStakingSlashingPath";
24205
+ }
24206
+ if (message.babylonUnbondingTimelockPath != null && message.hasOwnProperty("babylonUnbondingTimelockPath")) {
24207
+ object.babylonUnbondingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.toObject(message.babylonUnbondingTimelockPath, options);
24208
+ if (options.oneofs)
24209
+ object.variant = "babylonUnbondingTimelockPath";
24210
+ }
24211
+ if (message.babylonUnbondingSlashingPath != null && message.hasOwnProperty("babylonUnbondingSlashingPath")) {
24212
+ object.babylonUnbondingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.toObject(message.babylonUnbondingSlashingPath, options);
24213
+ if (options.oneofs)
24214
+ object.variant = "babylonUnbondingSlashingPath";
24215
+ }
21289
24216
  return object;
21290
24217
  };
21291
24218
 
@@ -22008,6 +24935,9 @@
22008
24935
  * @property {Uint8Array|null} [p2trDangerousAssumeTweaked] OutputBuilder p2trDangerousAssumeTweaked
22009
24936
  * @property {TW.BitcoinV2.Proto.Output.IOutputBrc20Inscription|null} [brc20Inscribe] OutputBuilder brc20Inscribe
22010
24937
  * @property {Uint8Array|null} [opReturn] OutputBuilder opReturn
24938
+ * @property {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput|null} [babylonStaking] OutputBuilder babylonStaking
24939
+ * @property {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput|null} [babylonUnbonding] OutputBuilder babylonUnbonding
24940
+ * @property {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn|null} [babylonStakingOpReturn] OutputBuilder babylonStakingOpReturn
22011
24941
  */
22012
24942
 
22013
24943
  /**
@@ -22105,17 +25035,41 @@
22105
25035
  */
22106
25036
  OutputBuilder.prototype.opReturn = null;
22107
25037
 
25038
+ /**
25039
+ * OutputBuilder babylonStaking.
25040
+ * @member {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput|null|undefined} babylonStaking
25041
+ * @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
25042
+ * @instance
25043
+ */
25044
+ OutputBuilder.prototype.babylonStaking = null;
25045
+
25046
+ /**
25047
+ * OutputBuilder babylonUnbonding.
25048
+ * @member {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput|null|undefined} babylonUnbonding
25049
+ * @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
25050
+ * @instance
25051
+ */
25052
+ OutputBuilder.prototype.babylonUnbonding = null;
25053
+
25054
+ /**
25055
+ * OutputBuilder babylonStakingOpReturn.
25056
+ * @member {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn|null|undefined} babylonStakingOpReturn
25057
+ * @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
25058
+ * @instance
25059
+ */
25060
+ OutputBuilder.prototype.babylonStakingOpReturn = null;
25061
+
22108
25062
  // OneOf field names bound to virtual getters and setters
22109
25063
  var $oneOfFields;
22110
25064
 
22111
25065
  /**
22112
25066
  * OutputBuilder variant.
22113
- * @member {"p2sh"|"p2pk"|"p2pkh"|"p2wsh"|"p2wpkh"|"p2trKeyPath"|"p2trScriptPath"|"p2trDangerousAssumeTweaked"|"brc20Inscribe"|"opReturn"|undefined} variant
25067
+ * @member {"p2sh"|"p2pk"|"p2pkh"|"p2wsh"|"p2wpkh"|"p2trKeyPath"|"p2trScriptPath"|"p2trDangerousAssumeTweaked"|"brc20Inscribe"|"opReturn"|"babylonStaking"|"babylonUnbonding"|"babylonStakingOpReturn"|undefined} variant
22114
25068
  * @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
22115
25069
  * @instance
22116
25070
  */
22117
25071
  Object.defineProperty(OutputBuilder.prototype, "variant", {
22118
- get: $util.oneOfGetter($oneOfFields = ["p2sh", "p2pk", "p2pkh", "p2wsh", "p2wpkh", "p2trKeyPath", "p2trScriptPath", "p2trDangerousAssumeTweaked", "brc20Inscribe", "opReturn"]),
25072
+ get: $util.oneOfGetter($oneOfFields = ["p2sh", "p2pk", "p2pkh", "p2wsh", "p2wpkh", "p2trKeyPath", "p2trScriptPath", "p2trDangerousAssumeTweaked", "brc20Inscribe", "opReturn", "babylonStaking", "babylonUnbonding", "babylonStakingOpReturn"]),
22119
25073
  set: $util.oneOfSetter($oneOfFields)
22120
25074
  });
22121
25075
 
@@ -22163,6 +25117,12 @@
22163
25117
  $root.TW.BitcoinV2.Proto.Output.OutputBrc20Inscription.encode(message.brc20Inscribe, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
22164
25118
  if (message.opReturn != null && Object.hasOwnProperty.call(message, "opReturn"))
22165
25119
  writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.opReturn);
25120
+ if (message.babylonStaking != null && Object.hasOwnProperty.call(message, "babylonStaking"))
25121
+ $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.encode(message.babylonStaking, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
25122
+ if (message.babylonUnbonding != null && Object.hasOwnProperty.call(message, "babylonUnbonding"))
25123
+ $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.encode(message.babylonUnbonding, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
25124
+ if (message.babylonStakingOpReturn != null && Object.hasOwnProperty.call(message, "babylonStakingOpReturn"))
25125
+ $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.encode(message.babylonStakingOpReturn, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
22166
25126
  return writer;
22167
25127
  };
22168
25128
 
@@ -22214,6 +25174,15 @@
22214
25174
  case 12:
22215
25175
  message.opReturn = reader.bytes();
22216
25176
  break;
25177
+ case 15:
25178
+ message.babylonStaking = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.decode(reader, reader.uint32());
25179
+ break;
25180
+ case 16:
25181
+ message.babylonUnbonding = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.decode(reader, reader.uint32());
25182
+ break;
25183
+ case 17:
25184
+ message.babylonStakingOpReturn = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.decode(reader, reader.uint32());
25185
+ break;
22217
25186
  default:
22218
25187
  reader.skipType(tag & 7);
22219
25188
  break;
@@ -22320,6 +25289,36 @@
22320
25289
  if (!(message.opReturn && typeof message.opReturn.length === "number" || $util.isString(message.opReturn)))
22321
25290
  return "opReturn: buffer expected";
22322
25291
  }
25292
+ if (message.babylonStaking != null && message.hasOwnProperty("babylonStaking")) {
25293
+ if (properties.variant === 1)
25294
+ return "variant: multiple values";
25295
+ properties.variant = 1;
25296
+ {
25297
+ var error = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.verify(message.babylonStaking);
25298
+ if (error)
25299
+ return "babylonStaking." + error;
25300
+ }
25301
+ }
25302
+ if (message.babylonUnbonding != null && message.hasOwnProperty("babylonUnbonding")) {
25303
+ if (properties.variant === 1)
25304
+ return "variant: multiple values";
25305
+ properties.variant = 1;
25306
+ {
25307
+ var error = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.verify(message.babylonUnbonding);
25308
+ if (error)
25309
+ return "babylonUnbonding." + error;
25310
+ }
25311
+ }
25312
+ if (message.babylonStakingOpReturn != null && message.hasOwnProperty("babylonStakingOpReturn")) {
25313
+ if (properties.variant === 1)
25314
+ return "variant: multiple values";
25315
+ properties.variant = 1;
25316
+ {
25317
+ var error = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.verify(message.babylonStakingOpReturn);
25318
+ if (error)
25319
+ return "babylonStakingOpReturn." + error;
25320
+ }
25321
+ }
22323
25322
  return null;
22324
25323
  };
22325
25324
 
@@ -22385,6 +25384,21 @@
22385
25384
  $util.base64.decode(object.opReturn, message.opReturn = $util.newBuffer($util.base64.length(object.opReturn)), 0);
22386
25385
  else if (object.opReturn.length)
22387
25386
  message.opReturn = object.opReturn;
25387
+ if (object.babylonStaking != null) {
25388
+ if (typeof object.babylonStaking !== "object")
25389
+ throw TypeError(".TW.BitcoinV2.Proto.Output.OutputBuilder.babylonStaking: object expected");
25390
+ message.babylonStaking = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.fromObject(object.babylonStaking);
25391
+ }
25392
+ if (object.babylonUnbonding != null) {
25393
+ if (typeof object.babylonUnbonding !== "object")
25394
+ throw TypeError(".TW.BitcoinV2.Proto.Output.OutputBuilder.babylonUnbonding: object expected");
25395
+ message.babylonUnbonding = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.fromObject(object.babylonUnbonding);
25396
+ }
25397
+ if (object.babylonStakingOpReturn != null) {
25398
+ if (typeof object.babylonStakingOpReturn !== "object")
25399
+ throw TypeError(".TW.BitcoinV2.Proto.Output.OutputBuilder.babylonStakingOpReturn: object expected");
25400
+ message.babylonStakingOpReturn = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.fromObject(object.babylonStakingOpReturn);
25401
+ }
22388
25402
  return message;
22389
25403
  };
22390
25404
 
@@ -22451,6 +25465,21 @@
22451
25465
  if (options.oneofs)
22452
25466
  object.variant = "opReturn";
22453
25467
  }
25468
+ if (message.babylonStaking != null && message.hasOwnProperty("babylonStaking")) {
25469
+ object.babylonStaking = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.toObject(message.babylonStaking, options);
25470
+ if (options.oneofs)
25471
+ object.variant = "babylonStaking";
25472
+ }
25473
+ if (message.babylonUnbonding != null && message.hasOwnProperty("babylonUnbonding")) {
25474
+ object.babylonUnbonding = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.toObject(message.babylonUnbonding, options);
25475
+ if (options.oneofs)
25476
+ object.variant = "babylonUnbonding";
25477
+ }
25478
+ if (message.babylonStakingOpReturn != null && message.hasOwnProperty("babylonStakingOpReturn")) {
25479
+ object.babylonStakingOpReturn = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.toObject(message.babylonStakingOpReturn, options);
25480
+ if (options.oneofs)
25481
+ object.variant = "babylonStakingOpReturn";
25482
+ }
22454
25483
  return object;
22455
25484
  };
22456
25485