@trustwallet/wallet-core 3.1.26 → 3.1.28

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.
@@ -45977,6 +45977,1706 @@
45977
45977
  return IoTeX;
45978
45978
  })();
45979
45979
 
45980
+ TW.LiquidStaking = (function() {
45981
+
45982
+ /**
45983
+ * Namespace LiquidStaking.
45984
+ * @memberof TW
45985
+ * @namespace
45986
+ */
45987
+ var LiquidStaking = {};
45988
+
45989
+ LiquidStaking.Proto = (function() {
45990
+
45991
+ /**
45992
+ * Namespace Proto.
45993
+ * @memberof TW.LiquidStaking
45994
+ * @namespace
45995
+ */
45996
+ var Proto = {};
45997
+
45998
+ /**
45999
+ * Coin enum.
46000
+ * @name TW.LiquidStaking.Proto.Coin
46001
+ * @enum {number}
46002
+ * @property {number} MATIC=0 MATIC value
46003
+ * @property {number} ATOM=1 ATOM value
46004
+ * @property {number} BNB=2 BNB value
46005
+ */
46006
+ Proto.Coin = (function() {
46007
+ var valuesById = {}, values = Object.create(valuesById);
46008
+ values[valuesById[0] = "MATIC"] = 0;
46009
+ values[valuesById[1] = "ATOM"] = 1;
46010
+ values[valuesById[2] = "BNB"] = 2;
46011
+ return values;
46012
+ })();
46013
+
46014
+ /**
46015
+ * Blockchain enum.
46016
+ * @name TW.LiquidStaking.Proto.Blockchain
46017
+ * @enum {number}
46018
+ * @property {number} ETHEREUM=0 ETHEREUM value
46019
+ * @property {number} POLYGON=1 POLYGON value
46020
+ * @property {number} STRIDE=2 STRIDE value
46021
+ * @property {number} BNB_BSC=3 BNB_BSC value
46022
+ */
46023
+ Proto.Blockchain = (function() {
46024
+ var valuesById = {}, values = Object.create(valuesById);
46025
+ values[valuesById[0] = "ETHEREUM"] = 0;
46026
+ values[valuesById[1] = "POLYGON"] = 1;
46027
+ values[valuesById[2] = "STRIDE"] = 2;
46028
+ values[valuesById[3] = "BNB_BSC"] = 3;
46029
+ return values;
46030
+ })();
46031
+
46032
+ /**
46033
+ * Protocol enum.
46034
+ * @name TW.LiquidStaking.Proto.Protocol
46035
+ * @enum {number}
46036
+ * @property {number} Strader=0 Strader value
46037
+ * @property {number} Stride=1 Stride value
46038
+ */
46039
+ Proto.Protocol = (function() {
46040
+ var valuesById = {}, values = Object.create(valuesById);
46041
+ values[valuesById[0] = "Strader"] = 0;
46042
+ values[valuesById[1] = "Stride"] = 1;
46043
+ return values;
46044
+ })();
46045
+
46046
+ /**
46047
+ * StatusCode enum.
46048
+ * @name TW.LiquidStaking.Proto.StatusCode
46049
+ * @enum {number}
46050
+ * @property {number} OK=0 OK value
46051
+ * @property {number} ERROR_ACTION_NOT_SET=1 ERROR_ACTION_NOT_SET value
46052
+ * @property {number} ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL=2 ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL value
46053
+ * @property {number} ERROR_SMART_CONTRACT_ADDRESS_NOT_SET=3 ERROR_SMART_CONTRACT_ADDRESS_NOT_SET value
46054
+ * @property {number} ERROR_INPUT_PROTO_DESERIALIZATION=4 ERROR_INPUT_PROTO_DESERIALIZATION value
46055
+ */
46056
+ Proto.StatusCode = (function() {
46057
+ var valuesById = {}, values = Object.create(valuesById);
46058
+ values[valuesById[0] = "OK"] = 0;
46059
+ values[valuesById[1] = "ERROR_ACTION_NOT_SET"] = 1;
46060
+ values[valuesById[2] = "ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL"] = 2;
46061
+ values[valuesById[3] = "ERROR_SMART_CONTRACT_ADDRESS_NOT_SET"] = 3;
46062
+ values[valuesById[4] = "ERROR_INPUT_PROTO_DESERIALIZATION"] = 4;
46063
+ return values;
46064
+ })();
46065
+
46066
+ Proto.Status = (function() {
46067
+
46068
+ /**
46069
+ * Properties of a Status.
46070
+ * @memberof TW.LiquidStaking.Proto
46071
+ * @interface IStatus
46072
+ * @property {TW.LiquidStaking.Proto.StatusCode|null} [code] Status code
46073
+ * @property {string|null} [message] Status message
46074
+ */
46075
+
46076
+ /**
46077
+ * Constructs a new Status.
46078
+ * @memberof TW.LiquidStaking.Proto
46079
+ * @classdesc Represents a Status.
46080
+ * @implements IStatus
46081
+ * @constructor
46082
+ * @param {TW.LiquidStaking.Proto.IStatus=} [properties] Properties to set
46083
+ */
46084
+ function Status(properties) {
46085
+ if (properties)
46086
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46087
+ if (properties[keys[i]] != null)
46088
+ this[keys[i]] = properties[keys[i]];
46089
+ }
46090
+
46091
+ /**
46092
+ * Status code.
46093
+ * @member {TW.LiquidStaking.Proto.StatusCode} code
46094
+ * @memberof TW.LiquidStaking.Proto.Status
46095
+ * @instance
46096
+ */
46097
+ Status.prototype.code = 0;
46098
+
46099
+ /**
46100
+ * Status message.
46101
+ * @member {string} message
46102
+ * @memberof TW.LiquidStaking.Proto.Status
46103
+ * @instance
46104
+ */
46105
+ Status.prototype.message = "";
46106
+
46107
+ /**
46108
+ * Creates a new Status instance using the specified properties.
46109
+ * @function create
46110
+ * @memberof TW.LiquidStaking.Proto.Status
46111
+ * @static
46112
+ * @param {TW.LiquidStaking.Proto.IStatus=} [properties] Properties to set
46113
+ * @returns {TW.LiquidStaking.Proto.Status} Status instance
46114
+ */
46115
+ Status.create = function create(properties) {
46116
+ return new Status(properties);
46117
+ };
46118
+
46119
+ /**
46120
+ * Encodes the specified Status message. Does not implicitly {@link TW.LiquidStaking.Proto.Status.verify|verify} messages.
46121
+ * @function encode
46122
+ * @memberof TW.LiquidStaking.Proto.Status
46123
+ * @static
46124
+ * @param {TW.LiquidStaking.Proto.IStatus} message Status message or plain object to encode
46125
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46126
+ * @returns {$protobuf.Writer} Writer
46127
+ */
46128
+ Status.encode = function encode(message, writer) {
46129
+ if (!writer)
46130
+ writer = $Writer.create();
46131
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
46132
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
46133
+ if (message.message != null && Object.hasOwnProperty.call(message, "message"))
46134
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
46135
+ return writer;
46136
+ };
46137
+
46138
+ /**
46139
+ * Decodes a Status message from the specified reader or buffer.
46140
+ * @function decode
46141
+ * @memberof TW.LiquidStaking.Proto.Status
46142
+ * @static
46143
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46144
+ * @param {number} [length] Message length if known beforehand
46145
+ * @returns {TW.LiquidStaking.Proto.Status} Status
46146
+ * @throws {Error} If the payload is not a reader or valid buffer
46147
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46148
+ */
46149
+ Status.decode = function decode(reader, length) {
46150
+ if (!(reader instanceof $Reader))
46151
+ reader = $Reader.create(reader);
46152
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Status();
46153
+ while (reader.pos < end) {
46154
+ var tag = reader.uint32();
46155
+ switch (tag >>> 3) {
46156
+ case 1:
46157
+ message.code = reader.int32();
46158
+ break;
46159
+ case 2:
46160
+ message.message = reader.string();
46161
+ break;
46162
+ default:
46163
+ reader.skipType(tag & 7);
46164
+ break;
46165
+ }
46166
+ }
46167
+ return message;
46168
+ };
46169
+
46170
+ /**
46171
+ * Verifies a Status message.
46172
+ * @function verify
46173
+ * @memberof TW.LiquidStaking.Proto.Status
46174
+ * @static
46175
+ * @param {Object.<string,*>} message Plain object to verify
46176
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46177
+ */
46178
+ Status.verify = function verify(message) {
46179
+ if (typeof message !== "object" || message === null)
46180
+ return "object expected";
46181
+ if (message.code != null && message.hasOwnProperty("code"))
46182
+ switch (message.code) {
46183
+ default:
46184
+ return "code: enum value expected";
46185
+ case 0:
46186
+ case 1:
46187
+ case 2:
46188
+ case 3:
46189
+ case 4:
46190
+ break;
46191
+ }
46192
+ if (message.message != null && message.hasOwnProperty("message"))
46193
+ if (!$util.isString(message.message))
46194
+ return "message: string expected";
46195
+ return null;
46196
+ };
46197
+
46198
+ /**
46199
+ * Creates a Status message from a plain object. Also converts values to their respective internal types.
46200
+ * @function fromObject
46201
+ * @memberof TW.LiquidStaking.Proto.Status
46202
+ * @static
46203
+ * @param {Object.<string,*>} object Plain object
46204
+ * @returns {TW.LiquidStaking.Proto.Status} Status
46205
+ */
46206
+ Status.fromObject = function fromObject(object) {
46207
+ if (object instanceof $root.TW.LiquidStaking.Proto.Status)
46208
+ return object;
46209
+ var message = new $root.TW.LiquidStaking.Proto.Status();
46210
+ switch (object.code) {
46211
+ case "OK":
46212
+ case 0:
46213
+ message.code = 0;
46214
+ break;
46215
+ case "ERROR_ACTION_NOT_SET":
46216
+ case 1:
46217
+ message.code = 1;
46218
+ break;
46219
+ case "ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL":
46220
+ case 2:
46221
+ message.code = 2;
46222
+ break;
46223
+ case "ERROR_SMART_CONTRACT_ADDRESS_NOT_SET":
46224
+ case 3:
46225
+ message.code = 3;
46226
+ break;
46227
+ case "ERROR_INPUT_PROTO_DESERIALIZATION":
46228
+ case 4:
46229
+ message.code = 4;
46230
+ break;
46231
+ }
46232
+ if (object.message != null)
46233
+ message.message = String(object.message);
46234
+ return message;
46235
+ };
46236
+
46237
+ /**
46238
+ * Creates a plain object from a Status message. Also converts values to other types if specified.
46239
+ * @function toObject
46240
+ * @memberof TW.LiquidStaking.Proto.Status
46241
+ * @static
46242
+ * @param {TW.LiquidStaking.Proto.Status} message Status
46243
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46244
+ * @returns {Object.<string,*>} Plain object
46245
+ */
46246
+ Status.toObject = function toObject(message, options) {
46247
+ if (!options)
46248
+ options = {};
46249
+ var object = {};
46250
+ if (options.defaults) {
46251
+ object.code = options.enums === String ? "OK" : 0;
46252
+ object.message = "";
46253
+ }
46254
+ if (message.code != null && message.hasOwnProperty("code"))
46255
+ object.code = options.enums === String ? $root.TW.LiquidStaking.Proto.StatusCode[message.code] : message.code;
46256
+ if (message.message != null && message.hasOwnProperty("message"))
46257
+ object.message = message.message;
46258
+ return object;
46259
+ };
46260
+
46261
+ /**
46262
+ * Converts this Status to JSON.
46263
+ * @function toJSON
46264
+ * @memberof TW.LiquidStaking.Proto.Status
46265
+ * @instance
46266
+ * @returns {Object.<string,*>} JSON object
46267
+ */
46268
+ Status.prototype.toJSON = function toJSON() {
46269
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46270
+ };
46271
+
46272
+ return Status;
46273
+ })();
46274
+
46275
+ Proto.Asset = (function() {
46276
+
46277
+ /**
46278
+ * Properties of an Asset.
46279
+ * @memberof TW.LiquidStaking.Proto
46280
+ * @interface IAsset
46281
+ * @property {TW.LiquidStaking.Proto.Coin|null} [stakingToken] Asset stakingToken
46282
+ * @property {string|null} [liquidToken] Asset liquidToken
46283
+ * @property {string|null} [denom] Asset denom
46284
+ * @property {string|null} [fromAddress] Asset fromAddress
46285
+ */
46286
+
46287
+ /**
46288
+ * Constructs a new Asset.
46289
+ * @memberof TW.LiquidStaking.Proto
46290
+ * @classdesc Represents an Asset.
46291
+ * @implements IAsset
46292
+ * @constructor
46293
+ * @param {TW.LiquidStaking.Proto.IAsset=} [properties] Properties to set
46294
+ */
46295
+ function Asset(properties) {
46296
+ if (properties)
46297
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46298
+ if (properties[keys[i]] != null)
46299
+ this[keys[i]] = properties[keys[i]];
46300
+ }
46301
+
46302
+ /**
46303
+ * Asset stakingToken.
46304
+ * @member {TW.LiquidStaking.Proto.Coin} stakingToken
46305
+ * @memberof TW.LiquidStaking.Proto.Asset
46306
+ * @instance
46307
+ */
46308
+ Asset.prototype.stakingToken = 0;
46309
+
46310
+ /**
46311
+ * Asset liquidToken.
46312
+ * @member {string} liquidToken
46313
+ * @memberof TW.LiquidStaking.Proto.Asset
46314
+ * @instance
46315
+ */
46316
+ Asset.prototype.liquidToken = "";
46317
+
46318
+ /**
46319
+ * Asset denom.
46320
+ * @member {string} denom
46321
+ * @memberof TW.LiquidStaking.Proto.Asset
46322
+ * @instance
46323
+ */
46324
+ Asset.prototype.denom = "";
46325
+
46326
+ /**
46327
+ * Asset fromAddress.
46328
+ * @member {string} fromAddress
46329
+ * @memberof TW.LiquidStaking.Proto.Asset
46330
+ * @instance
46331
+ */
46332
+ Asset.prototype.fromAddress = "";
46333
+
46334
+ /**
46335
+ * Creates a new Asset instance using the specified properties.
46336
+ * @function create
46337
+ * @memberof TW.LiquidStaking.Proto.Asset
46338
+ * @static
46339
+ * @param {TW.LiquidStaking.Proto.IAsset=} [properties] Properties to set
46340
+ * @returns {TW.LiquidStaking.Proto.Asset} Asset instance
46341
+ */
46342
+ Asset.create = function create(properties) {
46343
+ return new Asset(properties);
46344
+ };
46345
+
46346
+ /**
46347
+ * Encodes the specified Asset message. Does not implicitly {@link TW.LiquidStaking.Proto.Asset.verify|verify} messages.
46348
+ * @function encode
46349
+ * @memberof TW.LiquidStaking.Proto.Asset
46350
+ * @static
46351
+ * @param {TW.LiquidStaking.Proto.IAsset} message Asset message or plain object to encode
46352
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46353
+ * @returns {$protobuf.Writer} Writer
46354
+ */
46355
+ Asset.encode = function encode(message, writer) {
46356
+ if (!writer)
46357
+ writer = $Writer.create();
46358
+ if (message.stakingToken != null && Object.hasOwnProperty.call(message, "stakingToken"))
46359
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.stakingToken);
46360
+ if (message.liquidToken != null && Object.hasOwnProperty.call(message, "liquidToken"))
46361
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.liquidToken);
46362
+ if (message.denom != null && Object.hasOwnProperty.call(message, "denom"))
46363
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.denom);
46364
+ if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress"))
46365
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.fromAddress);
46366
+ return writer;
46367
+ };
46368
+
46369
+ /**
46370
+ * Decodes an Asset message from the specified reader or buffer.
46371
+ * @function decode
46372
+ * @memberof TW.LiquidStaking.Proto.Asset
46373
+ * @static
46374
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46375
+ * @param {number} [length] Message length if known beforehand
46376
+ * @returns {TW.LiquidStaking.Proto.Asset} Asset
46377
+ * @throws {Error} If the payload is not a reader or valid buffer
46378
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46379
+ */
46380
+ Asset.decode = function decode(reader, length) {
46381
+ if (!(reader instanceof $Reader))
46382
+ reader = $Reader.create(reader);
46383
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Asset();
46384
+ while (reader.pos < end) {
46385
+ var tag = reader.uint32();
46386
+ switch (tag >>> 3) {
46387
+ case 1:
46388
+ message.stakingToken = reader.int32();
46389
+ break;
46390
+ case 2:
46391
+ message.liquidToken = reader.string();
46392
+ break;
46393
+ case 3:
46394
+ message.denom = reader.string();
46395
+ break;
46396
+ case 4:
46397
+ message.fromAddress = reader.string();
46398
+ break;
46399
+ default:
46400
+ reader.skipType(tag & 7);
46401
+ break;
46402
+ }
46403
+ }
46404
+ return message;
46405
+ };
46406
+
46407
+ /**
46408
+ * Verifies an Asset message.
46409
+ * @function verify
46410
+ * @memberof TW.LiquidStaking.Proto.Asset
46411
+ * @static
46412
+ * @param {Object.<string,*>} message Plain object to verify
46413
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46414
+ */
46415
+ Asset.verify = function verify(message) {
46416
+ if (typeof message !== "object" || message === null)
46417
+ return "object expected";
46418
+ if (message.stakingToken != null && message.hasOwnProperty("stakingToken"))
46419
+ switch (message.stakingToken) {
46420
+ default:
46421
+ return "stakingToken: enum value expected";
46422
+ case 0:
46423
+ case 1:
46424
+ case 2:
46425
+ break;
46426
+ }
46427
+ if (message.liquidToken != null && message.hasOwnProperty("liquidToken"))
46428
+ if (!$util.isString(message.liquidToken))
46429
+ return "liquidToken: string expected";
46430
+ if (message.denom != null && message.hasOwnProperty("denom"))
46431
+ if (!$util.isString(message.denom))
46432
+ return "denom: string expected";
46433
+ if (message.fromAddress != null && message.hasOwnProperty("fromAddress"))
46434
+ if (!$util.isString(message.fromAddress))
46435
+ return "fromAddress: string expected";
46436
+ return null;
46437
+ };
46438
+
46439
+ /**
46440
+ * Creates an Asset message from a plain object. Also converts values to their respective internal types.
46441
+ * @function fromObject
46442
+ * @memberof TW.LiquidStaking.Proto.Asset
46443
+ * @static
46444
+ * @param {Object.<string,*>} object Plain object
46445
+ * @returns {TW.LiquidStaking.Proto.Asset} Asset
46446
+ */
46447
+ Asset.fromObject = function fromObject(object) {
46448
+ if (object instanceof $root.TW.LiquidStaking.Proto.Asset)
46449
+ return object;
46450
+ var message = new $root.TW.LiquidStaking.Proto.Asset();
46451
+ switch (object.stakingToken) {
46452
+ case "MATIC":
46453
+ case 0:
46454
+ message.stakingToken = 0;
46455
+ break;
46456
+ case "ATOM":
46457
+ case 1:
46458
+ message.stakingToken = 1;
46459
+ break;
46460
+ case "BNB":
46461
+ case 2:
46462
+ message.stakingToken = 2;
46463
+ break;
46464
+ }
46465
+ if (object.liquidToken != null)
46466
+ message.liquidToken = String(object.liquidToken);
46467
+ if (object.denom != null)
46468
+ message.denom = String(object.denom);
46469
+ if (object.fromAddress != null)
46470
+ message.fromAddress = String(object.fromAddress);
46471
+ return message;
46472
+ };
46473
+
46474
+ /**
46475
+ * Creates a plain object from an Asset message. Also converts values to other types if specified.
46476
+ * @function toObject
46477
+ * @memberof TW.LiquidStaking.Proto.Asset
46478
+ * @static
46479
+ * @param {TW.LiquidStaking.Proto.Asset} message Asset
46480
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46481
+ * @returns {Object.<string,*>} Plain object
46482
+ */
46483
+ Asset.toObject = function toObject(message, options) {
46484
+ if (!options)
46485
+ options = {};
46486
+ var object = {};
46487
+ if (options.defaults) {
46488
+ object.stakingToken = options.enums === String ? "MATIC" : 0;
46489
+ object.liquidToken = "";
46490
+ object.denom = "";
46491
+ object.fromAddress = "";
46492
+ }
46493
+ if (message.stakingToken != null && message.hasOwnProperty("stakingToken"))
46494
+ object.stakingToken = options.enums === String ? $root.TW.LiquidStaking.Proto.Coin[message.stakingToken] : message.stakingToken;
46495
+ if (message.liquidToken != null && message.hasOwnProperty("liquidToken"))
46496
+ object.liquidToken = message.liquidToken;
46497
+ if (message.denom != null && message.hasOwnProperty("denom"))
46498
+ object.denom = message.denom;
46499
+ if (message.fromAddress != null && message.hasOwnProperty("fromAddress"))
46500
+ object.fromAddress = message.fromAddress;
46501
+ return object;
46502
+ };
46503
+
46504
+ /**
46505
+ * Converts this Asset to JSON.
46506
+ * @function toJSON
46507
+ * @memberof TW.LiquidStaking.Proto.Asset
46508
+ * @instance
46509
+ * @returns {Object.<string,*>} JSON object
46510
+ */
46511
+ Asset.prototype.toJSON = function toJSON() {
46512
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46513
+ };
46514
+
46515
+ return Asset;
46516
+ })();
46517
+
46518
+ Proto.Stake = (function() {
46519
+
46520
+ /**
46521
+ * Properties of a Stake.
46522
+ * @memberof TW.LiquidStaking.Proto
46523
+ * @interface IStake
46524
+ * @property {TW.LiquidStaking.Proto.IAsset|null} [asset] Stake asset
46525
+ * @property {string|null} [amount] Stake amount
46526
+ */
46527
+
46528
+ /**
46529
+ * Constructs a new Stake.
46530
+ * @memberof TW.LiquidStaking.Proto
46531
+ * @classdesc Represents a Stake.
46532
+ * @implements IStake
46533
+ * @constructor
46534
+ * @param {TW.LiquidStaking.Proto.IStake=} [properties] Properties to set
46535
+ */
46536
+ function Stake(properties) {
46537
+ if (properties)
46538
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46539
+ if (properties[keys[i]] != null)
46540
+ this[keys[i]] = properties[keys[i]];
46541
+ }
46542
+
46543
+ /**
46544
+ * Stake asset.
46545
+ * @member {TW.LiquidStaking.Proto.IAsset|null|undefined} asset
46546
+ * @memberof TW.LiquidStaking.Proto.Stake
46547
+ * @instance
46548
+ */
46549
+ Stake.prototype.asset = null;
46550
+
46551
+ /**
46552
+ * Stake amount.
46553
+ * @member {string} amount
46554
+ * @memberof TW.LiquidStaking.Proto.Stake
46555
+ * @instance
46556
+ */
46557
+ Stake.prototype.amount = "";
46558
+
46559
+ /**
46560
+ * Creates a new Stake instance using the specified properties.
46561
+ * @function create
46562
+ * @memberof TW.LiquidStaking.Proto.Stake
46563
+ * @static
46564
+ * @param {TW.LiquidStaking.Proto.IStake=} [properties] Properties to set
46565
+ * @returns {TW.LiquidStaking.Proto.Stake} Stake instance
46566
+ */
46567
+ Stake.create = function create(properties) {
46568
+ return new Stake(properties);
46569
+ };
46570
+
46571
+ /**
46572
+ * Encodes the specified Stake message. Does not implicitly {@link TW.LiquidStaking.Proto.Stake.verify|verify} messages.
46573
+ * @function encode
46574
+ * @memberof TW.LiquidStaking.Proto.Stake
46575
+ * @static
46576
+ * @param {TW.LiquidStaking.Proto.IStake} message Stake message or plain object to encode
46577
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46578
+ * @returns {$protobuf.Writer} Writer
46579
+ */
46580
+ Stake.encode = function encode(message, writer) {
46581
+ if (!writer)
46582
+ writer = $Writer.create();
46583
+ if (message.asset != null && Object.hasOwnProperty.call(message, "asset"))
46584
+ $root.TW.LiquidStaking.Proto.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
46585
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
46586
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount);
46587
+ return writer;
46588
+ };
46589
+
46590
+ /**
46591
+ * Decodes a Stake message from the specified reader or buffer.
46592
+ * @function decode
46593
+ * @memberof TW.LiquidStaking.Proto.Stake
46594
+ * @static
46595
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46596
+ * @param {number} [length] Message length if known beforehand
46597
+ * @returns {TW.LiquidStaking.Proto.Stake} Stake
46598
+ * @throws {Error} If the payload is not a reader or valid buffer
46599
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46600
+ */
46601
+ Stake.decode = function decode(reader, length) {
46602
+ if (!(reader instanceof $Reader))
46603
+ reader = $Reader.create(reader);
46604
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Stake();
46605
+ while (reader.pos < end) {
46606
+ var tag = reader.uint32();
46607
+ switch (tag >>> 3) {
46608
+ case 1:
46609
+ message.asset = $root.TW.LiquidStaking.Proto.Asset.decode(reader, reader.uint32());
46610
+ break;
46611
+ case 2:
46612
+ message.amount = reader.string();
46613
+ break;
46614
+ default:
46615
+ reader.skipType(tag & 7);
46616
+ break;
46617
+ }
46618
+ }
46619
+ return message;
46620
+ };
46621
+
46622
+ /**
46623
+ * Verifies a Stake message.
46624
+ * @function verify
46625
+ * @memberof TW.LiquidStaking.Proto.Stake
46626
+ * @static
46627
+ * @param {Object.<string,*>} message Plain object to verify
46628
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46629
+ */
46630
+ Stake.verify = function verify(message) {
46631
+ if (typeof message !== "object" || message === null)
46632
+ return "object expected";
46633
+ if (message.asset != null && message.hasOwnProperty("asset")) {
46634
+ var error = $root.TW.LiquidStaking.Proto.Asset.verify(message.asset);
46635
+ if (error)
46636
+ return "asset." + error;
46637
+ }
46638
+ if (message.amount != null && message.hasOwnProperty("amount"))
46639
+ if (!$util.isString(message.amount))
46640
+ return "amount: string expected";
46641
+ return null;
46642
+ };
46643
+
46644
+ /**
46645
+ * Creates a Stake message from a plain object. Also converts values to their respective internal types.
46646
+ * @function fromObject
46647
+ * @memberof TW.LiquidStaking.Proto.Stake
46648
+ * @static
46649
+ * @param {Object.<string,*>} object Plain object
46650
+ * @returns {TW.LiquidStaking.Proto.Stake} Stake
46651
+ */
46652
+ Stake.fromObject = function fromObject(object) {
46653
+ if (object instanceof $root.TW.LiquidStaking.Proto.Stake)
46654
+ return object;
46655
+ var message = new $root.TW.LiquidStaking.Proto.Stake();
46656
+ if (object.asset != null) {
46657
+ if (typeof object.asset !== "object")
46658
+ throw TypeError(".TW.LiquidStaking.Proto.Stake.asset: object expected");
46659
+ message.asset = $root.TW.LiquidStaking.Proto.Asset.fromObject(object.asset);
46660
+ }
46661
+ if (object.amount != null)
46662
+ message.amount = String(object.amount);
46663
+ return message;
46664
+ };
46665
+
46666
+ /**
46667
+ * Creates a plain object from a Stake message. Also converts values to other types if specified.
46668
+ * @function toObject
46669
+ * @memberof TW.LiquidStaking.Proto.Stake
46670
+ * @static
46671
+ * @param {TW.LiquidStaking.Proto.Stake} message Stake
46672
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46673
+ * @returns {Object.<string,*>} Plain object
46674
+ */
46675
+ Stake.toObject = function toObject(message, options) {
46676
+ if (!options)
46677
+ options = {};
46678
+ var object = {};
46679
+ if (options.defaults) {
46680
+ object.asset = null;
46681
+ object.amount = "";
46682
+ }
46683
+ if (message.asset != null && message.hasOwnProperty("asset"))
46684
+ object.asset = $root.TW.LiquidStaking.Proto.Asset.toObject(message.asset, options);
46685
+ if (message.amount != null && message.hasOwnProperty("amount"))
46686
+ object.amount = message.amount;
46687
+ return object;
46688
+ };
46689
+
46690
+ /**
46691
+ * Converts this Stake to JSON.
46692
+ * @function toJSON
46693
+ * @memberof TW.LiquidStaking.Proto.Stake
46694
+ * @instance
46695
+ * @returns {Object.<string,*>} JSON object
46696
+ */
46697
+ Stake.prototype.toJSON = function toJSON() {
46698
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46699
+ };
46700
+
46701
+ return Stake;
46702
+ })();
46703
+
46704
+ Proto.Unstake = (function() {
46705
+
46706
+ /**
46707
+ * Properties of an Unstake.
46708
+ * @memberof TW.LiquidStaking.Proto
46709
+ * @interface IUnstake
46710
+ * @property {TW.LiquidStaking.Proto.IAsset|null} [asset] Unstake asset
46711
+ * @property {string|null} [amount] Unstake amount
46712
+ */
46713
+
46714
+ /**
46715
+ * Constructs a new Unstake.
46716
+ * @memberof TW.LiquidStaking.Proto
46717
+ * @classdesc Represents an Unstake.
46718
+ * @implements IUnstake
46719
+ * @constructor
46720
+ * @param {TW.LiquidStaking.Proto.IUnstake=} [properties] Properties to set
46721
+ */
46722
+ function Unstake(properties) {
46723
+ if (properties)
46724
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46725
+ if (properties[keys[i]] != null)
46726
+ this[keys[i]] = properties[keys[i]];
46727
+ }
46728
+
46729
+ /**
46730
+ * Unstake asset.
46731
+ * @member {TW.LiquidStaking.Proto.IAsset|null|undefined} asset
46732
+ * @memberof TW.LiquidStaking.Proto.Unstake
46733
+ * @instance
46734
+ */
46735
+ Unstake.prototype.asset = null;
46736
+
46737
+ /**
46738
+ * Unstake amount.
46739
+ * @member {string} amount
46740
+ * @memberof TW.LiquidStaking.Proto.Unstake
46741
+ * @instance
46742
+ */
46743
+ Unstake.prototype.amount = "";
46744
+
46745
+ /**
46746
+ * Creates a new Unstake instance using the specified properties.
46747
+ * @function create
46748
+ * @memberof TW.LiquidStaking.Proto.Unstake
46749
+ * @static
46750
+ * @param {TW.LiquidStaking.Proto.IUnstake=} [properties] Properties to set
46751
+ * @returns {TW.LiquidStaking.Proto.Unstake} Unstake instance
46752
+ */
46753
+ Unstake.create = function create(properties) {
46754
+ return new Unstake(properties);
46755
+ };
46756
+
46757
+ /**
46758
+ * Encodes the specified Unstake message. Does not implicitly {@link TW.LiquidStaking.Proto.Unstake.verify|verify} messages.
46759
+ * @function encode
46760
+ * @memberof TW.LiquidStaking.Proto.Unstake
46761
+ * @static
46762
+ * @param {TW.LiquidStaking.Proto.IUnstake} message Unstake message or plain object to encode
46763
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46764
+ * @returns {$protobuf.Writer} Writer
46765
+ */
46766
+ Unstake.encode = function encode(message, writer) {
46767
+ if (!writer)
46768
+ writer = $Writer.create();
46769
+ if (message.asset != null && Object.hasOwnProperty.call(message, "asset"))
46770
+ $root.TW.LiquidStaking.Proto.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
46771
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
46772
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount);
46773
+ return writer;
46774
+ };
46775
+
46776
+ /**
46777
+ * Decodes an Unstake message from the specified reader or buffer.
46778
+ * @function decode
46779
+ * @memberof TW.LiquidStaking.Proto.Unstake
46780
+ * @static
46781
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46782
+ * @param {number} [length] Message length if known beforehand
46783
+ * @returns {TW.LiquidStaking.Proto.Unstake} Unstake
46784
+ * @throws {Error} If the payload is not a reader or valid buffer
46785
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46786
+ */
46787
+ Unstake.decode = function decode(reader, length) {
46788
+ if (!(reader instanceof $Reader))
46789
+ reader = $Reader.create(reader);
46790
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Unstake();
46791
+ while (reader.pos < end) {
46792
+ var tag = reader.uint32();
46793
+ switch (tag >>> 3) {
46794
+ case 1:
46795
+ message.asset = $root.TW.LiquidStaking.Proto.Asset.decode(reader, reader.uint32());
46796
+ break;
46797
+ case 2:
46798
+ message.amount = reader.string();
46799
+ break;
46800
+ default:
46801
+ reader.skipType(tag & 7);
46802
+ break;
46803
+ }
46804
+ }
46805
+ return message;
46806
+ };
46807
+
46808
+ /**
46809
+ * Verifies an Unstake message.
46810
+ * @function verify
46811
+ * @memberof TW.LiquidStaking.Proto.Unstake
46812
+ * @static
46813
+ * @param {Object.<string,*>} message Plain object to verify
46814
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46815
+ */
46816
+ Unstake.verify = function verify(message) {
46817
+ if (typeof message !== "object" || message === null)
46818
+ return "object expected";
46819
+ if (message.asset != null && message.hasOwnProperty("asset")) {
46820
+ var error = $root.TW.LiquidStaking.Proto.Asset.verify(message.asset);
46821
+ if (error)
46822
+ return "asset." + error;
46823
+ }
46824
+ if (message.amount != null && message.hasOwnProperty("amount"))
46825
+ if (!$util.isString(message.amount))
46826
+ return "amount: string expected";
46827
+ return null;
46828
+ };
46829
+
46830
+ /**
46831
+ * Creates an Unstake message from a plain object. Also converts values to their respective internal types.
46832
+ * @function fromObject
46833
+ * @memberof TW.LiquidStaking.Proto.Unstake
46834
+ * @static
46835
+ * @param {Object.<string,*>} object Plain object
46836
+ * @returns {TW.LiquidStaking.Proto.Unstake} Unstake
46837
+ */
46838
+ Unstake.fromObject = function fromObject(object) {
46839
+ if (object instanceof $root.TW.LiquidStaking.Proto.Unstake)
46840
+ return object;
46841
+ var message = new $root.TW.LiquidStaking.Proto.Unstake();
46842
+ if (object.asset != null) {
46843
+ if (typeof object.asset !== "object")
46844
+ throw TypeError(".TW.LiquidStaking.Proto.Unstake.asset: object expected");
46845
+ message.asset = $root.TW.LiquidStaking.Proto.Asset.fromObject(object.asset);
46846
+ }
46847
+ if (object.amount != null)
46848
+ message.amount = String(object.amount);
46849
+ return message;
46850
+ };
46851
+
46852
+ /**
46853
+ * Creates a plain object from an Unstake message. Also converts values to other types if specified.
46854
+ * @function toObject
46855
+ * @memberof TW.LiquidStaking.Proto.Unstake
46856
+ * @static
46857
+ * @param {TW.LiquidStaking.Proto.Unstake} message Unstake
46858
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46859
+ * @returns {Object.<string,*>} Plain object
46860
+ */
46861
+ Unstake.toObject = function toObject(message, options) {
46862
+ if (!options)
46863
+ options = {};
46864
+ var object = {};
46865
+ if (options.defaults) {
46866
+ object.asset = null;
46867
+ object.amount = "";
46868
+ }
46869
+ if (message.asset != null && message.hasOwnProperty("asset"))
46870
+ object.asset = $root.TW.LiquidStaking.Proto.Asset.toObject(message.asset, options);
46871
+ if (message.amount != null && message.hasOwnProperty("amount"))
46872
+ object.amount = message.amount;
46873
+ return object;
46874
+ };
46875
+
46876
+ /**
46877
+ * Converts this Unstake to JSON.
46878
+ * @function toJSON
46879
+ * @memberof TW.LiquidStaking.Proto.Unstake
46880
+ * @instance
46881
+ * @returns {Object.<string,*>} JSON object
46882
+ */
46883
+ Unstake.prototype.toJSON = function toJSON() {
46884
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46885
+ };
46886
+
46887
+ return Unstake;
46888
+ })();
46889
+
46890
+ Proto.Withdraw = (function() {
46891
+
46892
+ /**
46893
+ * Properties of a Withdraw.
46894
+ * @memberof TW.LiquidStaking.Proto
46895
+ * @interface IWithdraw
46896
+ * @property {TW.LiquidStaking.Proto.IAsset|null} [asset] Withdraw asset
46897
+ * @property {string|null} [amount] Withdraw amount
46898
+ */
46899
+
46900
+ /**
46901
+ * Constructs a new Withdraw.
46902
+ * @memberof TW.LiquidStaking.Proto
46903
+ * @classdesc Represents a Withdraw.
46904
+ * @implements IWithdraw
46905
+ * @constructor
46906
+ * @param {TW.LiquidStaking.Proto.IWithdraw=} [properties] Properties to set
46907
+ */
46908
+ function Withdraw(properties) {
46909
+ if (properties)
46910
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46911
+ if (properties[keys[i]] != null)
46912
+ this[keys[i]] = properties[keys[i]];
46913
+ }
46914
+
46915
+ /**
46916
+ * Withdraw asset.
46917
+ * @member {TW.LiquidStaking.Proto.IAsset|null|undefined} asset
46918
+ * @memberof TW.LiquidStaking.Proto.Withdraw
46919
+ * @instance
46920
+ */
46921
+ Withdraw.prototype.asset = null;
46922
+
46923
+ /**
46924
+ * Withdraw amount.
46925
+ * @member {string} amount
46926
+ * @memberof TW.LiquidStaking.Proto.Withdraw
46927
+ * @instance
46928
+ */
46929
+ Withdraw.prototype.amount = "";
46930
+
46931
+ /**
46932
+ * Creates a new Withdraw instance using the specified properties.
46933
+ * @function create
46934
+ * @memberof TW.LiquidStaking.Proto.Withdraw
46935
+ * @static
46936
+ * @param {TW.LiquidStaking.Proto.IWithdraw=} [properties] Properties to set
46937
+ * @returns {TW.LiquidStaking.Proto.Withdraw} Withdraw instance
46938
+ */
46939
+ Withdraw.create = function create(properties) {
46940
+ return new Withdraw(properties);
46941
+ };
46942
+
46943
+ /**
46944
+ * Encodes the specified Withdraw message. Does not implicitly {@link TW.LiquidStaking.Proto.Withdraw.verify|verify} messages.
46945
+ * @function encode
46946
+ * @memberof TW.LiquidStaking.Proto.Withdraw
46947
+ * @static
46948
+ * @param {TW.LiquidStaking.Proto.IWithdraw} message Withdraw message or plain object to encode
46949
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46950
+ * @returns {$protobuf.Writer} Writer
46951
+ */
46952
+ Withdraw.encode = function encode(message, writer) {
46953
+ if (!writer)
46954
+ writer = $Writer.create();
46955
+ if (message.asset != null && Object.hasOwnProperty.call(message, "asset"))
46956
+ $root.TW.LiquidStaking.Proto.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
46957
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
46958
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount);
46959
+ return writer;
46960
+ };
46961
+
46962
+ /**
46963
+ * Decodes a Withdraw message from the specified reader or buffer.
46964
+ * @function decode
46965
+ * @memberof TW.LiquidStaking.Proto.Withdraw
46966
+ * @static
46967
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46968
+ * @param {number} [length] Message length if known beforehand
46969
+ * @returns {TW.LiquidStaking.Proto.Withdraw} Withdraw
46970
+ * @throws {Error} If the payload is not a reader or valid buffer
46971
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46972
+ */
46973
+ Withdraw.decode = function decode(reader, length) {
46974
+ if (!(reader instanceof $Reader))
46975
+ reader = $Reader.create(reader);
46976
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Withdraw();
46977
+ while (reader.pos < end) {
46978
+ var tag = reader.uint32();
46979
+ switch (tag >>> 3) {
46980
+ case 1:
46981
+ message.asset = $root.TW.LiquidStaking.Proto.Asset.decode(reader, reader.uint32());
46982
+ break;
46983
+ case 2:
46984
+ message.amount = reader.string();
46985
+ break;
46986
+ default:
46987
+ reader.skipType(tag & 7);
46988
+ break;
46989
+ }
46990
+ }
46991
+ return message;
46992
+ };
46993
+
46994
+ /**
46995
+ * Verifies a Withdraw message.
46996
+ * @function verify
46997
+ * @memberof TW.LiquidStaking.Proto.Withdraw
46998
+ * @static
46999
+ * @param {Object.<string,*>} message Plain object to verify
47000
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47001
+ */
47002
+ Withdraw.verify = function verify(message) {
47003
+ if (typeof message !== "object" || message === null)
47004
+ return "object expected";
47005
+ if (message.asset != null && message.hasOwnProperty("asset")) {
47006
+ var error = $root.TW.LiquidStaking.Proto.Asset.verify(message.asset);
47007
+ if (error)
47008
+ return "asset." + error;
47009
+ }
47010
+ if (message.amount != null && message.hasOwnProperty("amount"))
47011
+ if (!$util.isString(message.amount))
47012
+ return "amount: string expected";
47013
+ return null;
47014
+ };
47015
+
47016
+ /**
47017
+ * Creates a Withdraw message from a plain object. Also converts values to their respective internal types.
47018
+ * @function fromObject
47019
+ * @memberof TW.LiquidStaking.Proto.Withdraw
47020
+ * @static
47021
+ * @param {Object.<string,*>} object Plain object
47022
+ * @returns {TW.LiquidStaking.Proto.Withdraw} Withdraw
47023
+ */
47024
+ Withdraw.fromObject = function fromObject(object) {
47025
+ if (object instanceof $root.TW.LiquidStaking.Proto.Withdraw)
47026
+ return object;
47027
+ var message = new $root.TW.LiquidStaking.Proto.Withdraw();
47028
+ if (object.asset != null) {
47029
+ if (typeof object.asset !== "object")
47030
+ throw TypeError(".TW.LiquidStaking.Proto.Withdraw.asset: object expected");
47031
+ message.asset = $root.TW.LiquidStaking.Proto.Asset.fromObject(object.asset);
47032
+ }
47033
+ if (object.amount != null)
47034
+ message.amount = String(object.amount);
47035
+ return message;
47036
+ };
47037
+
47038
+ /**
47039
+ * Creates a plain object from a Withdraw message. Also converts values to other types if specified.
47040
+ * @function toObject
47041
+ * @memberof TW.LiquidStaking.Proto.Withdraw
47042
+ * @static
47043
+ * @param {TW.LiquidStaking.Proto.Withdraw} message Withdraw
47044
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47045
+ * @returns {Object.<string,*>} Plain object
47046
+ */
47047
+ Withdraw.toObject = function toObject(message, options) {
47048
+ if (!options)
47049
+ options = {};
47050
+ var object = {};
47051
+ if (options.defaults) {
47052
+ object.asset = null;
47053
+ object.amount = "";
47054
+ }
47055
+ if (message.asset != null && message.hasOwnProperty("asset"))
47056
+ object.asset = $root.TW.LiquidStaking.Proto.Asset.toObject(message.asset, options);
47057
+ if (message.amount != null && message.hasOwnProperty("amount"))
47058
+ object.amount = message.amount;
47059
+ return object;
47060
+ };
47061
+
47062
+ /**
47063
+ * Converts this Withdraw to JSON.
47064
+ * @function toJSON
47065
+ * @memberof TW.LiquidStaking.Proto.Withdraw
47066
+ * @instance
47067
+ * @returns {Object.<string,*>} JSON object
47068
+ */
47069
+ Withdraw.prototype.toJSON = function toJSON() {
47070
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
47071
+ };
47072
+
47073
+ return Withdraw;
47074
+ })();
47075
+
47076
+ Proto.Input = (function() {
47077
+
47078
+ /**
47079
+ * Properties of an Input.
47080
+ * @memberof TW.LiquidStaking.Proto
47081
+ * @interface IInput
47082
+ * @property {TW.LiquidStaking.Proto.IStake|null} [stake] Input stake
47083
+ * @property {TW.LiquidStaking.Proto.IUnstake|null} [unstake] Input unstake
47084
+ * @property {TW.LiquidStaking.Proto.IWithdraw|null} [withdraw] Input withdraw
47085
+ * @property {string|null} [smartContractAddress] Input smartContractAddress
47086
+ * @property {TW.LiquidStaking.Proto.Protocol|null} [protocol] Input protocol
47087
+ * @property {TW.LiquidStaking.Proto.Blockchain|null} [blockchain] Input blockchain
47088
+ */
47089
+
47090
+ /**
47091
+ * Constructs a new Input.
47092
+ * @memberof TW.LiquidStaking.Proto
47093
+ * @classdesc Represents an Input.
47094
+ * @implements IInput
47095
+ * @constructor
47096
+ * @param {TW.LiquidStaking.Proto.IInput=} [properties] Properties to set
47097
+ */
47098
+ function Input(properties) {
47099
+ if (properties)
47100
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47101
+ if (properties[keys[i]] != null)
47102
+ this[keys[i]] = properties[keys[i]];
47103
+ }
47104
+
47105
+ /**
47106
+ * Input stake.
47107
+ * @member {TW.LiquidStaking.Proto.IStake|null|undefined} stake
47108
+ * @memberof TW.LiquidStaking.Proto.Input
47109
+ * @instance
47110
+ */
47111
+ Input.prototype.stake = null;
47112
+
47113
+ /**
47114
+ * Input unstake.
47115
+ * @member {TW.LiquidStaking.Proto.IUnstake|null|undefined} unstake
47116
+ * @memberof TW.LiquidStaking.Proto.Input
47117
+ * @instance
47118
+ */
47119
+ Input.prototype.unstake = null;
47120
+
47121
+ /**
47122
+ * Input withdraw.
47123
+ * @member {TW.LiquidStaking.Proto.IWithdraw|null|undefined} withdraw
47124
+ * @memberof TW.LiquidStaking.Proto.Input
47125
+ * @instance
47126
+ */
47127
+ Input.prototype.withdraw = null;
47128
+
47129
+ /**
47130
+ * Input smartContractAddress.
47131
+ * @member {string} smartContractAddress
47132
+ * @memberof TW.LiquidStaking.Proto.Input
47133
+ * @instance
47134
+ */
47135
+ Input.prototype.smartContractAddress = "";
47136
+
47137
+ /**
47138
+ * Input protocol.
47139
+ * @member {TW.LiquidStaking.Proto.Protocol} protocol
47140
+ * @memberof TW.LiquidStaking.Proto.Input
47141
+ * @instance
47142
+ */
47143
+ Input.prototype.protocol = 0;
47144
+
47145
+ /**
47146
+ * Input blockchain.
47147
+ * @member {TW.LiquidStaking.Proto.Blockchain} blockchain
47148
+ * @memberof TW.LiquidStaking.Proto.Input
47149
+ * @instance
47150
+ */
47151
+ Input.prototype.blockchain = 0;
47152
+
47153
+ // OneOf field names bound to virtual getters and setters
47154
+ var $oneOfFields;
47155
+
47156
+ /**
47157
+ * Input action.
47158
+ * @member {"stake"|"unstake"|"withdraw"|undefined} action
47159
+ * @memberof TW.LiquidStaking.Proto.Input
47160
+ * @instance
47161
+ */
47162
+ Object.defineProperty(Input.prototype, "action", {
47163
+ get: $util.oneOfGetter($oneOfFields = ["stake", "unstake", "withdraw"]),
47164
+ set: $util.oneOfSetter($oneOfFields)
47165
+ });
47166
+
47167
+ /**
47168
+ * Creates a new Input instance using the specified properties.
47169
+ * @function create
47170
+ * @memberof TW.LiquidStaking.Proto.Input
47171
+ * @static
47172
+ * @param {TW.LiquidStaking.Proto.IInput=} [properties] Properties to set
47173
+ * @returns {TW.LiquidStaking.Proto.Input} Input instance
47174
+ */
47175
+ Input.create = function create(properties) {
47176
+ return new Input(properties);
47177
+ };
47178
+
47179
+ /**
47180
+ * Encodes the specified Input message. Does not implicitly {@link TW.LiquidStaking.Proto.Input.verify|verify} messages.
47181
+ * @function encode
47182
+ * @memberof TW.LiquidStaking.Proto.Input
47183
+ * @static
47184
+ * @param {TW.LiquidStaking.Proto.IInput} message Input message or plain object to encode
47185
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47186
+ * @returns {$protobuf.Writer} Writer
47187
+ */
47188
+ Input.encode = function encode(message, writer) {
47189
+ if (!writer)
47190
+ writer = $Writer.create();
47191
+ if (message.stake != null && Object.hasOwnProperty.call(message, "stake"))
47192
+ $root.TW.LiquidStaking.Proto.Stake.encode(message.stake, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
47193
+ if (message.unstake != null && Object.hasOwnProperty.call(message, "unstake"))
47194
+ $root.TW.LiquidStaking.Proto.Unstake.encode(message.unstake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
47195
+ if (message.withdraw != null && Object.hasOwnProperty.call(message, "withdraw"))
47196
+ $root.TW.LiquidStaking.Proto.Withdraw.encode(message.withdraw, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
47197
+ if (message.smartContractAddress != null && Object.hasOwnProperty.call(message, "smartContractAddress"))
47198
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.smartContractAddress);
47199
+ if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol"))
47200
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protocol);
47201
+ if (message.blockchain != null && Object.hasOwnProperty.call(message, "blockchain"))
47202
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.blockchain);
47203
+ return writer;
47204
+ };
47205
+
47206
+ /**
47207
+ * Decodes an Input message from the specified reader or buffer.
47208
+ * @function decode
47209
+ * @memberof TW.LiquidStaking.Proto.Input
47210
+ * @static
47211
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47212
+ * @param {number} [length] Message length if known beforehand
47213
+ * @returns {TW.LiquidStaking.Proto.Input} Input
47214
+ * @throws {Error} If the payload is not a reader or valid buffer
47215
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47216
+ */
47217
+ Input.decode = function decode(reader, length) {
47218
+ if (!(reader instanceof $Reader))
47219
+ reader = $Reader.create(reader);
47220
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Input();
47221
+ while (reader.pos < end) {
47222
+ var tag = reader.uint32();
47223
+ switch (tag >>> 3) {
47224
+ case 1:
47225
+ message.stake = $root.TW.LiquidStaking.Proto.Stake.decode(reader, reader.uint32());
47226
+ break;
47227
+ case 2:
47228
+ message.unstake = $root.TW.LiquidStaking.Proto.Unstake.decode(reader, reader.uint32());
47229
+ break;
47230
+ case 3:
47231
+ message.withdraw = $root.TW.LiquidStaking.Proto.Withdraw.decode(reader, reader.uint32());
47232
+ break;
47233
+ case 4:
47234
+ message.smartContractAddress = reader.string();
47235
+ break;
47236
+ case 5:
47237
+ message.protocol = reader.int32();
47238
+ break;
47239
+ case 6:
47240
+ message.blockchain = reader.int32();
47241
+ break;
47242
+ default:
47243
+ reader.skipType(tag & 7);
47244
+ break;
47245
+ }
47246
+ }
47247
+ return message;
47248
+ };
47249
+
47250
+ /**
47251
+ * Verifies an Input message.
47252
+ * @function verify
47253
+ * @memberof TW.LiquidStaking.Proto.Input
47254
+ * @static
47255
+ * @param {Object.<string,*>} message Plain object to verify
47256
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47257
+ */
47258
+ Input.verify = function verify(message) {
47259
+ if (typeof message !== "object" || message === null)
47260
+ return "object expected";
47261
+ var properties = {};
47262
+ if (message.stake != null && message.hasOwnProperty("stake")) {
47263
+ properties.action = 1;
47264
+ {
47265
+ var error = $root.TW.LiquidStaking.Proto.Stake.verify(message.stake);
47266
+ if (error)
47267
+ return "stake." + error;
47268
+ }
47269
+ }
47270
+ if (message.unstake != null && message.hasOwnProperty("unstake")) {
47271
+ if (properties.action === 1)
47272
+ return "action: multiple values";
47273
+ properties.action = 1;
47274
+ {
47275
+ var error = $root.TW.LiquidStaking.Proto.Unstake.verify(message.unstake);
47276
+ if (error)
47277
+ return "unstake." + error;
47278
+ }
47279
+ }
47280
+ if (message.withdraw != null && message.hasOwnProperty("withdraw")) {
47281
+ if (properties.action === 1)
47282
+ return "action: multiple values";
47283
+ properties.action = 1;
47284
+ {
47285
+ var error = $root.TW.LiquidStaking.Proto.Withdraw.verify(message.withdraw);
47286
+ if (error)
47287
+ return "withdraw." + error;
47288
+ }
47289
+ }
47290
+ if (message.smartContractAddress != null && message.hasOwnProperty("smartContractAddress"))
47291
+ if (!$util.isString(message.smartContractAddress))
47292
+ return "smartContractAddress: string expected";
47293
+ if (message.protocol != null && message.hasOwnProperty("protocol"))
47294
+ switch (message.protocol) {
47295
+ default:
47296
+ return "protocol: enum value expected";
47297
+ case 0:
47298
+ case 1:
47299
+ break;
47300
+ }
47301
+ if (message.blockchain != null && message.hasOwnProperty("blockchain"))
47302
+ switch (message.blockchain) {
47303
+ default:
47304
+ return "blockchain: enum value expected";
47305
+ case 0:
47306
+ case 1:
47307
+ case 2:
47308
+ case 3:
47309
+ break;
47310
+ }
47311
+ return null;
47312
+ };
47313
+
47314
+ /**
47315
+ * Creates an Input message from a plain object. Also converts values to their respective internal types.
47316
+ * @function fromObject
47317
+ * @memberof TW.LiquidStaking.Proto.Input
47318
+ * @static
47319
+ * @param {Object.<string,*>} object Plain object
47320
+ * @returns {TW.LiquidStaking.Proto.Input} Input
47321
+ */
47322
+ Input.fromObject = function fromObject(object) {
47323
+ if (object instanceof $root.TW.LiquidStaking.Proto.Input)
47324
+ return object;
47325
+ var message = new $root.TW.LiquidStaking.Proto.Input();
47326
+ if (object.stake != null) {
47327
+ if (typeof object.stake !== "object")
47328
+ throw TypeError(".TW.LiquidStaking.Proto.Input.stake: object expected");
47329
+ message.stake = $root.TW.LiquidStaking.Proto.Stake.fromObject(object.stake);
47330
+ }
47331
+ if (object.unstake != null) {
47332
+ if (typeof object.unstake !== "object")
47333
+ throw TypeError(".TW.LiquidStaking.Proto.Input.unstake: object expected");
47334
+ message.unstake = $root.TW.LiquidStaking.Proto.Unstake.fromObject(object.unstake);
47335
+ }
47336
+ if (object.withdraw != null) {
47337
+ if (typeof object.withdraw !== "object")
47338
+ throw TypeError(".TW.LiquidStaking.Proto.Input.withdraw: object expected");
47339
+ message.withdraw = $root.TW.LiquidStaking.Proto.Withdraw.fromObject(object.withdraw);
47340
+ }
47341
+ if (object.smartContractAddress != null)
47342
+ message.smartContractAddress = String(object.smartContractAddress);
47343
+ switch (object.protocol) {
47344
+ case "Strader":
47345
+ case 0:
47346
+ message.protocol = 0;
47347
+ break;
47348
+ case "Stride":
47349
+ case 1:
47350
+ message.protocol = 1;
47351
+ break;
47352
+ }
47353
+ switch (object.blockchain) {
47354
+ case "ETHEREUM":
47355
+ case 0:
47356
+ message.blockchain = 0;
47357
+ break;
47358
+ case "POLYGON":
47359
+ case 1:
47360
+ message.blockchain = 1;
47361
+ break;
47362
+ case "STRIDE":
47363
+ case 2:
47364
+ message.blockchain = 2;
47365
+ break;
47366
+ case "BNB_BSC":
47367
+ case 3:
47368
+ message.blockchain = 3;
47369
+ break;
47370
+ }
47371
+ return message;
47372
+ };
47373
+
47374
+ /**
47375
+ * Creates a plain object from an Input message. Also converts values to other types if specified.
47376
+ * @function toObject
47377
+ * @memberof TW.LiquidStaking.Proto.Input
47378
+ * @static
47379
+ * @param {TW.LiquidStaking.Proto.Input} message Input
47380
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47381
+ * @returns {Object.<string,*>} Plain object
47382
+ */
47383
+ Input.toObject = function toObject(message, options) {
47384
+ if (!options)
47385
+ options = {};
47386
+ var object = {};
47387
+ if (options.defaults) {
47388
+ object.smartContractAddress = "";
47389
+ object.protocol = options.enums === String ? "Strader" : 0;
47390
+ object.blockchain = options.enums === String ? "ETHEREUM" : 0;
47391
+ }
47392
+ if (message.stake != null && message.hasOwnProperty("stake")) {
47393
+ object.stake = $root.TW.LiquidStaking.Proto.Stake.toObject(message.stake, options);
47394
+ if (options.oneofs)
47395
+ object.action = "stake";
47396
+ }
47397
+ if (message.unstake != null && message.hasOwnProperty("unstake")) {
47398
+ object.unstake = $root.TW.LiquidStaking.Proto.Unstake.toObject(message.unstake, options);
47399
+ if (options.oneofs)
47400
+ object.action = "unstake";
47401
+ }
47402
+ if (message.withdraw != null && message.hasOwnProperty("withdraw")) {
47403
+ object.withdraw = $root.TW.LiquidStaking.Proto.Withdraw.toObject(message.withdraw, options);
47404
+ if (options.oneofs)
47405
+ object.action = "withdraw";
47406
+ }
47407
+ if (message.smartContractAddress != null && message.hasOwnProperty("smartContractAddress"))
47408
+ object.smartContractAddress = message.smartContractAddress;
47409
+ if (message.protocol != null && message.hasOwnProperty("protocol"))
47410
+ object.protocol = options.enums === String ? $root.TW.LiquidStaking.Proto.Protocol[message.protocol] : message.protocol;
47411
+ if (message.blockchain != null && message.hasOwnProperty("blockchain"))
47412
+ object.blockchain = options.enums === String ? $root.TW.LiquidStaking.Proto.Blockchain[message.blockchain] : message.blockchain;
47413
+ return object;
47414
+ };
47415
+
47416
+ /**
47417
+ * Converts this Input to JSON.
47418
+ * @function toJSON
47419
+ * @memberof TW.LiquidStaking.Proto.Input
47420
+ * @instance
47421
+ * @returns {Object.<string,*>} JSON object
47422
+ */
47423
+ Input.prototype.toJSON = function toJSON() {
47424
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
47425
+ };
47426
+
47427
+ return Input;
47428
+ })();
47429
+
47430
+ Proto.Output = (function() {
47431
+
47432
+ /**
47433
+ * Properties of an Output.
47434
+ * @memberof TW.LiquidStaking.Proto
47435
+ * @interface IOutput
47436
+ * @property {TW.LiquidStaking.Proto.IStatus|null} [status] Output status
47437
+ * @property {TW.Ethereum.Proto.ISigningInput|null} [ethereum] Output ethereum
47438
+ * @property {TW.Cosmos.Proto.ISigningInput|null} [cosmos] Output cosmos
47439
+ */
47440
+
47441
+ /**
47442
+ * Constructs a new Output.
47443
+ * @memberof TW.LiquidStaking.Proto
47444
+ * @classdesc Represents an Output.
47445
+ * @implements IOutput
47446
+ * @constructor
47447
+ * @param {TW.LiquidStaking.Proto.IOutput=} [properties] Properties to set
47448
+ */
47449
+ function Output(properties) {
47450
+ if (properties)
47451
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47452
+ if (properties[keys[i]] != null)
47453
+ this[keys[i]] = properties[keys[i]];
47454
+ }
47455
+
47456
+ /**
47457
+ * Output status.
47458
+ * @member {TW.LiquidStaking.Proto.IStatus|null|undefined} status
47459
+ * @memberof TW.LiquidStaking.Proto.Output
47460
+ * @instance
47461
+ */
47462
+ Output.prototype.status = null;
47463
+
47464
+ /**
47465
+ * Output ethereum.
47466
+ * @member {TW.Ethereum.Proto.ISigningInput|null|undefined} ethereum
47467
+ * @memberof TW.LiquidStaking.Proto.Output
47468
+ * @instance
47469
+ */
47470
+ Output.prototype.ethereum = null;
47471
+
47472
+ /**
47473
+ * Output cosmos.
47474
+ * @member {TW.Cosmos.Proto.ISigningInput|null|undefined} cosmos
47475
+ * @memberof TW.LiquidStaking.Proto.Output
47476
+ * @instance
47477
+ */
47478
+ Output.prototype.cosmos = null;
47479
+
47480
+ // OneOf field names bound to virtual getters and setters
47481
+ var $oneOfFields;
47482
+
47483
+ /**
47484
+ * Output signingInputOneof.
47485
+ * @member {"ethereum"|"cosmos"|undefined} signingInputOneof
47486
+ * @memberof TW.LiquidStaking.Proto.Output
47487
+ * @instance
47488
+ */
47489
+ Object.defineProperty(Output.prototype, "signingInputOneof", {
47490
+ get: $util.oneOfGetter($oneOfFields = ["ethereum", "cosmos"]),
47491
+ set: $util.oneOfSetter($oneOfFields)
47492
+ });
47493
+
47494
+ /**
47495
+ * Creates a new Output instance using the specified properties.
47496
+ * @function create
47497
+ * @memberof TW.LiquidStaking.Proto.Output
47498
+ * @static
47499
+ * @param {TW.LiquidStaking.Proto.IOutput=} [properties] Properties to set
47500
+ * @returns {TW.LiquidStaking.Proto.Output} Output instance
47501
+ */
47502
+ Output.create = function create(properties) {
47503
+ return new Output(properties);
47504
+ };
47505
+
47506
+ /**
47507
+ * Encodes the specified Output message. Does not implicitly {@link TW.LiquidStaking.Proto.Output.verify|verify} messages.
47508
+ * @function encode
47509
+ * @memberof TW.LiquidStaking.Proto.Output
47510
+ * @static
47511
+ * @param {TW.LiquidStaking.Proto.IOutput} message Output message or plain object to encode
47512
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47513
+ * @returns {$protobuf.Writer} Writer
47514
+ */
47515
+ Output.encode = function encode(message, writer) {
47516
+ if (!writer)
47517
+ writer = $Writer.create();
47518
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
47519
+ $root.TW.LiquidStaking.Proto.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
47520
+ if (message.ethereum != null && Object.hasOwnProperty.call(message, "ethereum"))
47521
+ $root.TW.Ethereum.Proto.SigningInput.encode(message.ethereum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
47522
+ if (message.cosmos != null && Object.hasOwnProperty.call(message, "cosmos"))
47523
+ $root.TW.Cosmos.Proto.SigningInput.encode(message.cosmos, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
47524
+ return writer;
47525
+ };
47526
+
47527
+ /**
47528
+ * Decodes an Output message from the specified reader or buffer.
47529
+ * @function decode
47530
+ * @memberof TW.LiquidStaking.Proto.Output
47531
+ * @static
47532
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47533
+ * @param {number} [length] Message length if known beforehand
47534
+ * @returns {TW.LiquidStaking.Proto.Output} Output
47535
+ * @throws {Error} If the payload is not a reader or valid buffer
47536
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47537
+ */
47538
+ Output.decode = function decode(reader, length) {
47539
+ if (!(reader instanceof $Reader))
47540
+ reader = $Reader.create(reader);
47541
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.LiquidStaking.Proto.Output();
47542
+ while (reader.pos < end) {
47543
+ var tag = reader.uint32();
47544
+ switch (tag >>> 3) {
47545
+ case 1:
47546
+ message.status = $root.TW.LiquidStaking.Proto.Status.decode(reader, reader.uint32());
47547
+ break;
47548
+ case 2:
47549
+ message.ethereum = $root.TW.Ethereum.Proto.SigningInput.decode(reader, reader.uint32());
47550
+ break;
47551
+ case 3:
47552
+ message.cosmos = $root.TW.Cosmos.Proto.SigningInput.decode(reader, reader.uint32());
47553
+ break;
47554
+ default:
47555
+ reader.skipType(tag & 7);
47556
+ break;
47557
+ }
47558
+ }
47559
+ return message;
47560
+ };
47561
+
47562
+ /**
47563
+ * Verifies an Output message.
47564
+ * @function verify
47565
+ * @memberof TW.LiquidStaking.Proto.Output
47566
+ * @static
47567
+ * @param {Object.<string,*>} message Plain object to verify
47568
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47569
+ */
47570
+ Output.verify = function verify(message) {
47571
+ if (typeof message !== "object" || message === null)
47572
+ return "object expected";
47573
+ var properties = {};
47574
+ if (message.status != null && message.hasOwnProperty("status")) {
47575
+ var error = $root.TW.LiquidStaking.Proto.Status.verify(message.status);
47576
+ if (error)
47577
+ return "status." + error;
47578
+ }
47579
+ if (message.ethereum != null && message.hasOwnProperty("ethereum")) {
47580
+ properties.signingInputOneof = 1;
47581
+ {
47582
+ var error = $root.TW.Ethereum.Proto.SigningInput.verify(message.ethereum);
47583
+ if (error)
47584
+ return "ethereum." + error;
47585
+ }
47586
+ }
47587
+ if (message.cosmos != null && message.hasOwnProperty("cosmos")) {
47588
+ if (properties.signingInputOneof === 1)
47589
+ return "signingInputOneof: multiple values";
47590
+ properties.signingInputOneof = 1;
47591
+ {
47592
+ var error = $root.TW.Cosmos.Proto.SigningInput.verify(message.cosmos);
47593
+ if (error)
47594
+ return "cosmos." + error;
47595
+ }
47596
+ }
47597
+ return null;
47598
+ };
47599
+
47600
+ /**
47601
+ * Creates an Output message from a plain object. Also converts values to their respective internal types.
47602
+ * @function fromObject
47603
+ * @memberof TW.LiquidStaking.Proto.Output
47604
+ * @static
47605
+ * @param {Object.<string,*>} object Plain object
47606
+ * @returns {TW.LiquidStaking.Proto.Output} Output
47607
+ */
47608
+ Output.fromObject = function fromObject(object) {
47609
+ if (object instanceof $root.TW.LiquidStaking.Proto.Output)
47610
+ return object;
47611
+ var message = new $root.TW.LiquidStaking.Proto.Output();
47612
+ if (object.status != null) {
47613
+ if (typeof object.status !== "object")
47614
+ throw TypeError(".TW.LiquidStaking.Proto.Output.status: object expected");
47615
+ message.status = $root.TW.LiquidStaking.Proto.Status.fromObject(object.status);
47616
+ }
47617
+ if (object.ethereum != null) {
47618
+ if (typeof object.ethereum !== "object")
47619
+ throw TypeError(".TW.LiquidStaking.Proto.Output.ethereum: object expected");
47620
+ message.ethereum = $root.TW.Ethereum.Proto.SigningInput.fromObject(object.ethereum);
47621
+ }
47622
+ if (object.cosmos != null) {
47623
+ if (typeof object.cosmos !== "object")
47624
+ throw TypeError(".TW.LiquidStaking.Proto.Output.cosmos: object expected");
47625
+ message.cosmos = $root.TW.Cosmos.Proto.SigningInput.fromObject(object.cosmos);
47626
+ }
47627
+ return message;
47628
+ };
47629
+
47630
+ /**
47631
+ * Creates a plain object from an Output message. Also converts values to other types if specified.
47632
+ * @function toObject
47633
+ * @memberof TW.LiquidStaking.Proto.Output
47634
+ * @static
47635
+ * @param {TW.LiquidStaking.Proto.Output} message Output
47636
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47637
+ * @returns {Object.<string,*>} Plain object
47638
+ */
47639
+ Output.toObject = function toObject(message, options) {
47640
+ if (!options)
47641
+ options = {};
47642
+ var object = {};
47643
+ if (options.defaults)
47644
+ object.status = null;
47645
+ if (message.status != null && message.hasOwnProperty("status"))
47646
+ object.status = $root.TW.LiquidStaking.Proto.Status.toObject(message.status, options);
47647
+ if (message.ethereum != null && message.hasOwnProperty("ethereum")) {
47648
+ object.ethereum = $root.TW.Ethereum.Proto.SigningInput.toObject(message.ethereum, options);
47649
+ if (options.oneofs)
47650
+ object.signingInputOneof = "ethereum";
47651
+ }
47652
+ if (message.cosmos != null && message.hasOwnProperty("cosmos")) {
47653
+ object.cosmos = $root.TW.Cosmos.Proto.SigningInput.toObject(message.cosmos, options);
47654
+ if (options.oneofs)
47655
+ object.signingInputOneof = "cosmos";
47656
+ }
47657
+ return object;
47658
+ };
47659
+
47660
+ /**
47661
+ * Converts this Output to JSON.
47662
+ * @function toJSON
47663
+ * @memberof TW.LiquidStaking.Proto.Output
47664
+ * @instance
47665
+ * @returns {Object.<string,*>} JSON object
47666
+ */
47667
+ Output.prototype.toJSON = function toJSON() {
47668
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
47669
+ };
47670
+
47671
+ return Output;
47672
+ })();
47673
+
47674
+ return Proto;
47675
+ })();
47676
+
47677
+ return LiquidStaking;
47678
+ })();
47679
+
45980
47680
  TW.MultiversX = (function() {
45981
47681
 
45982
47682
  /**
@@ -46896,6 +48596,7 @@
46896
48596
  * @property {string|null} [senderUsername] Accounts senderUsername
46897
48597
  * @property {string|null} [receiver] Accounts receiver
46898
48598
  * @property {string|null} [receiverUsername] Accounts receiverUsername
48599
+ * @property {string|null} [guardian] Accounts guardian
46899
48600
  */
46900
48601
 
46901
48602
  /**
@@ -46953,6 +48654,14 @@
46953
48654
  */
46954
48655
  Accounts.prototype.receiverUsername = "";
46955
48656
 
48657
+ /**
48658
+ * Accounts guardian.
48659
+ * @member {string} guardian
48660
+ * @memberof TW.MultiversX.Proto.Accounts
48661
+ * @instance
48662
+ */
48663
+ Accounts.prototype.guardian = "";
48664
+
46956
48665
  /**
46957
48666
  * Creates a new Accounts instance using the specified properties.
46958
48667
  * @function create
@@ -46987,6 +48696,8 @@
46987
48696
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.receiver);
46988
48697
  if (message.receiverUsername != null && Object.hasOwnProperty.call(message, "receiverUsername"))
46989
48698
  writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiverUsername);
48699
+ if (message.guardian != null && Object.hasOwnProperty.call(message, "guardian"))
48700
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.guardian);
46990
48701
  return writer;
46991
48702
  };
46992
48703
 
@@ -47023,6 +48734,9 @@
47023
48734
  case 5:
47024
48735
  message.receiverUsername = reader.string();
47025
48736
  break;
48737
+ case 6:
48738
+ message.guardian = reader.string();
48739
+ break;
47026
48740
  default:
47027
48741
  reader.skipType(tag & 7);
47028
48742
  break;
@@ -47057,6 +48771,9 @@
47057
48771
  if (message.receiverUsername != null && message.hasOwnProperty("receiverUsername"))
47058
48772
  if (!$util.isString(message.receiverUsername))
47059
48773
  return "receiverUsername: string expected";
48774
+ if (message.guardian != null && message.hasOwnProperty("guardian"))
48775
+ if (!$util.isString(message.guardian))
48776
+ return "guardian: string expected";
47060
48777
  return null;
47061
48778
  };
47062
48779
 
@@ -47089,6 +48806,8 @@
47089
48806
  message.receiver = String(object.receiver);
47090
48807
  if (object.receiverUsername != null)
47091
48808
  message.receiverUsername = String(object.receiverUsername);
48809
+ if (object.guardian != null)
48810
+ message.guardian = String(object.guardian);
47092
48811
  return message;
47093
48812
  };
47094
48813
 
@@ -47115,6 +48834,7 @@
47115
48834
  object.senderUsername = "";
47116
48835
  object.receiver = "";
47117
48836
  object.receiverUsername = "";
48837
+ object.guardian = "";
47118
48838
  }
47119
48839
  if (message.senderNonce != null && message.hasOwnProperty("senderNonce"))
47120
48840
  if (typeof message.senderNonce === "number")
@@ -47129,6 +48849,8 @@
47129
48849
  object.receiver = message.receiver;
47130
48850
  if (message.receiverUsername != null && message.hasOwnProperty("receiverUsername"))
47131
48851
  object.receiverUsername = message.receiverUsername;
48852
+ if (message.guardian != null && message.hasOwnProperty("guardian"))
48853
+ object.guardian = message.guardian;
47132
48854
  return object;
47133
48855
  };
47134
48856