@trustwallet/wallet-core 4.2.0-dev-rc4 → 4.2.0
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.
- package/dist/generated/core_proto.d.ts +1079 -2
- package/dist/generated/core_proto.js +2844 -88
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +1 -0
- package/package.json +1 -1
@@ -7258,6 +7258,2269 @@
|
|
7258
7258
|
return Aptos;
|
7259
7259
|
})();
|
7260
7260
|
|
7261
|
+
TW.BabylonStaking = (function() {
|
7262
|
+
|
7263
|
+
/**
|
7264
|
+
* Namespace BabylonStaking.
|
7265
|
+
* @memberof TW
|
7266
|
+
* @namespace
|
7267
|
+
*/
|
7268
|
+
var BabylonStaking = {};
|
7269
|
+
|
7270
|
+
BabylonStaking.Proto = (function() {
|
7271
|
+
|
7272
|
+
/**
|
7273
|
+
* Namespace Proto.
|
7274
|
+
* @memberof TW.BabylonStaking
|
7275
|
+
* @namespace
|
7276
|
+
*/
|
7277
|
+
var Proto = {};
|
7278
|
+
|
7279
|
+
Proto.PublicKeySignature = (function() {
|
7280
|
+
|
7281
|
+
/**
|
7282
|
+
* Properties of a PublicKeySignature.
|
7283
|
+
* @memberof TW.BabylonStaking.Proto
|
7284
|
+
* @interface IPublicKeySignature
|
7285
|
+
* @property {Uint8Array|null} [publicKey] PublicKeySignature publicKey
|
7286
|
+
* @property {Uint8Array|null} [signature] PublicKeySignature signature
|
7287
|
+
*/
|
7288
|
+
|
7289
|
+
/**
|
7290
|
+
* Constructs a new PublicKeySignature.
|
7291
|
+
* @memberof TW.BabylonStaking.Proto
|
7292
|
+
* @classdesc Represents a PublicKeySignature.
|
7293
|
+
* @implements IPublicKeySignature
|
7294
|
+
* @constructor
|
7295
|
+
* @param {TW.BabylonStaking.Proto.IPublicKeySignature=} [properties] Properties to set
|
7296
|
+
*/
|
7297
|
+
function PublicKeySignature(properties) {
|
7298
|
+
if (properties)
|
7299
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7300
|
+
if (properties[keys[i]] != null)
|
7301
|
+
this[keys[i]] = properties[keys[i]];
|
7302
|
+
}
|
7303
|
+
|
7304
|
+
/**
|
7305
|
+
* PublicKeySignature publicKey.
|
7306
|
+
* @member {Uint8Array} publicKey
|
7307
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7308
|
+
* @instance
|
7309
|
+
*/
|
7310
|
+
PublicKeySignature.prototype.publicKey = $util.newBuffer([]);
|
7311
|
+
|
7312
|
+
/**
|
7313
|
+
* PublicKeySignature signature.
|
7314
|
+
* @member {Uint8Array} signature
|
7315
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7316
|
+
* @instance
|
7317
|
+
*/
|
7318
|
+
PublicKeySignature.prototype.signature = $util.newBuffer([]);
|
7319
|
+
|
7320
|
+
/**
|
7321
|
+
* Creates a new PublicKeySignature instance using the specified properties.
|
7322
|
+
* @function create
|
7323
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7324
|
+
* @static
|
7325
|
+
* @param {TW.BabylonStaking.Proto.IPublicKeySignature=} [properties] Properties to set
|
7326
|
+
* @returns {TW.BabylonStaking.Proto.PublicKeySignature} PublicKeySignature instance
|
7327
|
+
*/
|
7328
|
+
PublicKeySignature.create = function create(properties) {
|
7329
|
+
return new PublicKeySignature(properties);
|
7330
|
+
};
|
7331
|
+
|
7332
|
+
/**
|
7333
|
+
* Encodes the specified PublicKeySignature message. Does not implicitly {@link TW.BabylonStaking.Proto.PublicKeySignature.verify|verify} messages.
|
7334
|
+
* @function encode
|
7335
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7336
|
+
* @static
|
7337
|
+
* @param {TW.BabylonStaking.Proto.IPublicKeySignature} message PublicKeySignature message or plain object to encode
|
7338
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
7339
|
+
* @returns {$protobuf.Writer} Writer
|
7340
|
+
*/
|
7341
|
+
PublicKeySignature.encode = function encode(message, writer) {
|
7342
|
+
if (!writer)
|
7343
|
+
writer = $Writer.create();
|
7344
|
+
if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
|
7345
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey);
|
7346
|
+
if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
|
7347
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature);
|
7348
|
+
return writer;
|
7349
|
+
};
|
7350
|
+
|
7351
|
+
/**
|
7352
|
+
* Decodes a PublicKeySignature message from the specified reader or buffer.
|
7353
|
+
* @function decode
|
7354
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7355
|
+
* @static
|
7356
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7357
|
+
* @param {number} [length] Message length if known beforehand
|
7358
|
+
* @returns {TW.BabylonStaking.Proto.PublicKeySignature} PublicKeySignature
|
7359
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
7360
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7361
|
+
*/
|
7362
|
+
PublicKeySignature.decode = function decode(reader, length) {
|
7363
|
+
if (!(reader instanceof $Reader))
|
7364
|
+
reader = $Reader.create(reader);
|
7365
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.PublicKeySignature();
|
7366
|
+
while (reader.pos < end) {
|
7367
|
+
var tag = reader.uint32();
|
7368
|
+
switch (tag >>> 3) {
|
7369
|
+
case 1:
|
7370
|
+
message.publicKey = reader.bytes();
|
7371
|
+
break;
|
7372
|
+
case 2:
|
7373
|
+
message.signature = reader.bytes();
|
7374
|
+
break;
|
7375
|
+
default:
|
7376
|
+
reader.skipType(tag & 7);
|
7377
|
+
break;
|
7378
|
+
}
|
7379
|
+
}
|
7380
|
+
return message;
|
7381
|
+
};
|
7382
|
+
|
7383
|
+
/**
|
7384
|
+
* Verifies a PublicKeySignature message.
|
7385
|
+
* @function verify
|
7386
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7387
|
+
* @static
|
7388
|
+
* @param {Object.<string,*>} message Plain object to verify
|
7389
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7390
|
+
*/
|
7391
|
+
PublicKeySignature.verify = function verify(message) {
|
7392
|
+
if (typeof message !== "object" || message === null)
|
7393
|
+
return "object expected";
|
7394
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
7395
|
+
if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
|
7396
|
+
return "publicKey: buffer expected";
|
7397
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
7398
|
+
if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
|
7399
|
+
return "signature: buffer expected";
|
7400
|
+
return null;
|
7401
|
+
};
|
7402
|
+
|
7403
|
+
/**
|
7404
|
+
* Creates a PublicKeySignature message from a plain object. Also converts values to their respective internal types.
|
7405
|
+
* @function fromObject
|
7406
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7407
|
+
* @static
|
7408
|
+
* @param {Object.<string,*>} object Plain object
|
7409
|
+
* @returns {TW.BabylonStaking.Proto.PublicKeySignature} PublicKeySignature
|
7410
|
+
*/
|
7411
|
+
PublicKeySignature.fromObject = function fromObject(object) {
|
7412
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.PublicKeySignature)
|
7413
|
+
return object;
|
7414
|
+
var message = new $root.TW.BabylonStaking.Proto.PublicKeySignature();
|
7415
|
+
if (object.publicKey != null)
|
7416
|
+
if (typeof object.publicKey === "string")
|
7417
|
+
$util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
|
7418
|
+
else if (object.publicKey.length)
|
7419
|
+
message.publicKey = object.publicKey;
|
7420
|
+
if (object.signature != null)
|
7421
|
+
if (typeof object.signature === "string")
|
7422
|
+
$util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
|
7423
|
+
else if (object.signature.length)
|
7424
|
+
message.signature = object.signature;
|
7425
|
+
return message;
|
7426
|
+
};
|
7427
|
+
|
7428
|
+
/**
|
7429
|
+
* Creates a plain object from a PublicKeySignature message. Also converts values to other types if specified.
|
7430
|
+
* @function toObject
|
7431
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7432
|
+
* @static
|
7433
|
+
* @param {TW.BabylonStaking.Proto.PublicKeySignature} message PublicKeySignature
|
7434
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
7435
|
+
* @returns {Object.<string,*>} Plain object
|
7436
|
+
*/
|
7437
|
+
PublicKeySignature.toObject = function toObject(message, options) {
|
7438
|
+
if (!options)
|
7439
|
+
options = {};
|
7440
|
+
var object = {};
|
7441
|
+
if (options.defaults) {
|
7442
|
+
if (options.bytes === String)
|
7443
|
+
object.publicKey = "";
|
7444
|
+
else {
|
7445
|
+
object.publicKey = [];
|
7446
|
+
if (options.bytes !== Array)
|
7447
|
+
object.publicKey = $util.newBuffer(object.publicKey);
|
7448
|
+
}
|
7449
|
+
if (options.bytes === String)
|
7450
|
+
object.signature = "";
|
7451
|
+
else {
|
7452
|
+
object.signature = [];
|
7453
|
+
if (options.bytes !== Array)
|
7454
|
+
object.signature = $util.newBuffer(object.signature);
|
7455
|
+
}
|
7456
|
+
}
|
7457
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
7458
|
+
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;
|
7459
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
7460
|
+
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;
|
7461
|
+
return object;
|
7462
|
+
};
|
7463
|
+
|
7464
|
+
/**
|
7465
|
+
* Converts this PublicKeySignature to JSON.
|
7466
|
+
* @function toJSON
|
7467
|
+
* @memberof TW.BabylonStaking.Proto.PublicKeySignature
|
7468
|
+
* @instance
|
7469
|
+
* @returns {Object.<string,*>} JSON object
|
7470
|
+
*/
|
7471
|
+
PublicKeySignature.prototype.toJSON = function toJSON() {
|
7472
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7473
|
+
};
|
7474
|
+
|
7475
|
+
return PublicKeySignature;
|
7476
|
+
})();
|
7477
|
+
|
7478
|
+
Proto.StakingInfo = (function() {
|
7479
|
+
|
7480
|
+
/**
|
7481
|
+
* Properties of a StakingInfo.
|
7482
|
+
* @memberof TW.BabylonStaking.Proto
|
7483
|
+
* @interface IStakingInfo
|
7484
|
+
* @property {Uint8Array|null} [stakerPublicKey] StakingInfo stakerPublicKey
|
7485
|
+
* @property {Uint8Array|null} [finalityProviderPublicKey] StakingInfo finalityProviderPublicKey
|
7486
|
+
* @property {number|null} [stakingTime] StakingInfo stakingTime
|
7487
|
+
* @property {Array.<Uint8Array>|null} [covenantCommitteePublicKeys] StakingInfo covenantCommitteePublicKeys
|
7488
|
+
* @property {number|null} [covenantQuorum] StakingInfo covenantQuorum
|
7489
|
+
*/
|
7490
|
+
|
7491
|
+
/**
|
7492
|
+
* Constructs a new StakingInfo.
|
7493
|
+
* @memberof TW.BabylonStaking.Proto
|
7494
|
+
* @classdesc Represents a StakingInfo.
|
7495
|
+
* @implements IStakingInfo
|
7496
|
+
* @constructor
|
7497
|
+
* @param {TW.BabylonStaking.Proto.IStakingInfo=} [properties] Properties to set
|
7498
|
+
*/
|
7499
|
+
function StakingInfo(properties) {
|
7500
|
+
this.covenantCommitteePublicKeys = [];
|
7501
|
+
if (properties)
|
7502
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7503
|
+
if (properties[keys[i]] != null)
|
7504
|
+
this[keys[i]] = properties[keys[i]];
|
7505
|
+
}
|
7506
|
+
|
7507
|
+
/**
|
7508
|
+
* StakingInfo stakerPublicKey.
|
7509
|
+
* @member {Uint8Array} stakerPublicKey
|
7510
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7511
|
+
* @instance
|
7512
|
+
*/
|
7513
|
+
StakingInfo.prototype.stakerPublicKey = $util.newBuffer([]);
|
7514
|
+
|
7515
|
+
/**
|
7516
|
+
* StakingInfo finalityProviderPublicKey.
|
7517
|
+
* @member {Uint8Array} finalityProviderPublicKey
|
7518
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7519
|
+
* @instance
|
7520
|
+
*/
|
7521
|
+
StakingInfo.prototype.finalityProviderPublicKey = $util.newBuffer([]);
|
7522
|
+
|
7523
|
+
/**
|
7524
|
+
* StakingInfo stakingTime.
|
7525
|
+
* @member {number} stakingTime
|
7526
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7527
|
+
* @instance
|
7528
|
+
*/
|
7529
|
+
StakingInfo.prototype.stakingTime = 0;
|
7530
|
+
|
7531
|
+
/**
|
7532
|
+
* StakingInfo covenantCommitteePublicKeys.
|
7533
|
+
* @member {Array.<Uint8Array>} covenantCommitteePublicKeys
|
7534
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7535
|
+
* @instance
|
7536
|
+
*/
|
7537
|
+
StakingInfo.prototype.covenantCommitteePublicKeys = $util.emptyArray;
|
7538
|
+
|
7539
|
+
/**
|
7540
|
+
* StakingInfo covenantQuorum.
|
7541
|
+
* @member {number} covenantQuorum
|
7542
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7543
|
+
* @instance
|
7544
|
+
*/
|
7545
|
+
StakingInfo.prototype.covenantQuorum = 0;
|
7546
|
+
|
7547
|
+
/**
|
7548
|
+
* Creates a new StakingInfo instance using the specified properties.
|
7549
|
+
* @function create
|
7550
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7551
|
+
* @static
|
7552
|
+
* @param {TW.BabylonStaking.Proto.IStakingInfo=} [properties] Properties to set
|
7553
|
+
* @returns {TW.BabylonStaking.Proto.StakingInfo} StakingInfo instance
|
7554
|
+
*/
|
7555
|
+
StakingInfo.create = function create(properties) {
|
7556
|
+
return new StakingInfo(properties);
|
7557
|
+
};
|
7558
|
+
|
7559
|
+
/**
|
7560
|
+
* Encodes the specified StakingInfo message. Does not implicitly {@link TW.BabylonStaking.Proto.StakingInfo.verify|verify} messages.
|
7561
|
+
* @function encode
|
7562
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7563
|
+
* @static
|
7564
|
+
* @param {TW.BabylonStaking.Proto.IStakingInfo} message StakingInfo message or plain object to encode
|
7565
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
7566
|
+
* @returns {$protobuf.Writer} Writer
|
7567
|
+
*/
|
7568
|
+
StakingInfo.encode = function encode(message, writer) {
|
7569
|
+
if (!writer)
|
7570
|
+
writer = $Writer.create();
|
7571
|
+
if (message.stakerPublicKey != null && Object.hasOwnProperty.call(message, "stakerPublicKey"))
|
7572
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.stakerPublicKey);
|
7573
|
+
if (message.finalityProviderPublicKey != null && Object.hasOwnProperty.call(message, "finalityProviderPublicKey"))
|
7574
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.finalityProviderPublicKey);
|
7575
|
+
if (message.stakingTime != null && Object.hasOwnProperty.call(message, "stakingTime"))
|
7576
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stakingTime);
|
7577
|
+
if (message.covenantCommitteePublicKeys != null && message.covenantCommitteePublicKeys.length)
|
7578
|
+
for (var i = 0; i < message.covenantCommitteePublicKeys.length; ++i)
|
7579
|
+
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.covenantCommitteePublicKeys[i]);
|
7580
|
+
if (message.covenantQuorum != null && Object.hasOwnProperty.call(message, "covenantQuorum"))
|
7581
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.covenantQuorum);
|
7582
|
+
return writer;
|
7583
|
+
};
|
7584
|
+
|
7585
|
+
/**
|
7586
|
+
* Decodes a StakingInfo message from the specified reader or buffer.
|
7587
|
+
* @function decode
|
7588
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7589
|
+
* @static
|
7590
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7591
|
+
* @param {number} [length] Message length if known beforehand
|
7592
|
+
* @returns {TW.BabylonStaking.Proto.StakingInfo} StakingInfo
|
7593
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
7594
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7595
|
+
*/
|
7596
|
+
StakingInfo.decode = function decode(reader, length) {
|
7597
|
+
if (!(reader instanceof $Reader))
|
7598
|
+
reader = $Reader.create(reader);
|
7599
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.StakingInfo();
|
7600
|
+
while (reader.pos < end) {
|
7601
|
+
var tag = reader.uint32();
|
7602
|
+
switch (tag >>> 3) {
|
7603
|
+
case 1:
|
7604
|
+
message.stakerPublicKey = reader.bytes();
|
7605
|
+
break;
|
7606
|
+
case 2:
|
7607
|
+
message.finalityProviderPublicKey = reader.bytes();
|
7608
|
+
break;
|
7609
|
+
case 3:
|
7610
|
+
message.stakingTime = reader.uint32();
|
7611
|
+
break;
|
7612
|
+
case 4:
|
7613
|
+
if (!(message.covenantCommitteePublicKeys && message.covenantCommitteePublicKeys.length))
|
7614
|
+
message.covenantCommitteePublicKeys = [];
|
7615
|
+
message.covenantCommitteePublicKeys.push(reader.bytes());
|
7616
|
+
break;
|
7617
|
+
case 5:
|
7618
|
+
message.covenantQuorum = reader.uint32();
|
7619
|
+
break;
|
7620
|
+
default:
|
7621
|
+
reader.skipType(tag & 7);
|
7622
|
+
break;
|
7623
|
+
}
|
7624
|
+
}
|
7625
|
+
return message;
|
7626
|
+
};
|
7627
|
+
|
7628
|
+
/**
|
7629
|
+
* Verifies a StakingInfo message.
|
7630
|
+
* @function verify
|
7631
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7632
|
+
* @static
|
7633
|
+
* @param {Object.<string,*>} message Plain object to verify
|
7634
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7635
|
+
*/
|
7636
|
+
StakingInfo.verify = function verify(message) {
|
7637
|
+
if (typeof message !== "object" || message === null)
|
7638
|
+
return "object expected";
|
7639
|
+
if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
|
7640
|
+
if (!(message.stakerPublicKey && typeof message.stakerPublicKey.length === "number" || $util.isString(message.stakerPublicKey)))
|
7641
|
+
return "stakerPublicKey: buffer expected";
|
7642
|
+
if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
|
7643
|
+
if (!(message.finalityProviderPublicKey && typeof message.finalityProviderPublicKey.length === "number" || $util.isString(message.finalityProviderPublicKey)))
|
7644
|
+
return "finalityProviderPublicKey: buffer expected";
|
7645
|
+
if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
|
7646
|
+
if (!$util.isInteger(message.stakingTime))
|
7647
|
+
return "stakingTime: integer expected";
|
7648
|
+
if (message.covenantCommitteePublicKeys != null && message.hasOwnProperty("covenantCommitteePublicKeys")) {
|
7649
|
+
if (!Array.isArray(message.covenantCommitteePublicKeys))
|
7650
|
+
return "covenantCommitteePublicKeys: array expected";
|
7651
|
+
for (var i = 0; i < message.covenantCommitteePublicKeys.length; ++i)
|
7652
|
+
if (!(message.covenantCommitteePublicKeys[i] && typeof message.covenantCommitteePublicKeys[i].length === "number" || $util.isString(message.covenantCommitteePublicKeys[i])))
|
7653
|
+
return "covenantCommitteePublicKeys: buffer[] expected";
|
7654
|
+
}
|
7655
|
+
if (message.covenantQuorum != null && message.hasOwnProperty("covenantQuorum"))
|
7656
|
+
if (!$util.isInteger(message.covenantQuorum))
|
7657
|
+
return "covenantQuorum: integer expected";
|
7658
|
+
return null;
|
7659
|
+
};
|
7660
|
+
|
7661
|
+
/**
|
7662
|
+
* Creates a StakingInfo message from a plain object. Also converts values to their respective internal types.
|
7663
|
+
* @function fromObject
|
7664
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7665
|
+
* @static
|
7666
|
+
* @param {Object.<string,*>} object Plain object
|
7667
|
+
* @returns {TW.BabylonStaking.Proto.StakingInfo} StakingInfo
|
7668
|
+
*/
|
7669
|
+
StakingInfo.fromObject = function fromObject(object) {
|
7670
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.StakingInfo)
|
7671
|
+
return object;
|
7672
|
+
var message = new $root.TW.BabylonStaking.Proto.StakingInfo();
|
7673
|
+
if (object.stakerPublicKey != null)
|
7674
|
+
if (typeof object.stakerPublicKey === "string")
|
7675
|
+
$util.base64.decode(object.stakerPublicKey, message.stakerPublicKey = $util.newBuffer($util.base64.length(object.stakerPublicKey)), 0);
|
7676
|
+
else if (object.stakerPublicKey.length)
|
7677
|
+
message.stakerPublicKey = object.stakerPublicKey;
|
7678
|
+
if (object.finalityProviderPublicKey != null)
|
7679
|
+
if (typeof object.finalityProviderPublicKey === "string")
|
7680
|
+
$util.base64.decode(object.finalityProviderPublicKey, message.finalityProviderPublicKey = $util.newBuffer($util.base64.length(object.finalityProviderPublicKey)), 0);
|
7681
|
+
else if (object.finalityProviderPublicKey.length)
|
7682
|
+
message.finalityProviderPublicKey = object.finalityProviderPublicKey;
|
7683
|
+
if (object.stakingTime != null)
|
7684
|
+
message.stakingTime = object.stakingTime >>> 0;
|
7685
|
+
if (object.covenantCommitteePublicKeys) {
|
7686
|
+
if (!Array.isArray(object.covenantCommitteePublicKeys))
|
7687
|
+
throw TypeError(".TW.BabylonStaking.Proto.StakingInfo.covenantCommitteePublicKeys: array expected");
|
7688
|
+
message.covenantCommitteePublicKeys = [];
|
7689
|
+
for (var i = 0; i < object.covenantCommitteePublicKeys.length; ++i)
|
7690
|
+
if (typeof object.covenantCommitteePublicKeys[i] === "string")
|
7691
|
+
$util.base64.decode(object.covenantCommitteePublicKeys[i], message.covenantCommitteePublicKeys[i] = $util.newBuffer($util.base64.length(object.covenantCommitteePublicKeys[i])), 0);
|
7692
|
+
else if (object.covenantCommitteePublicKeys[i].length)
|
7693
|
+
message.covenantCommitteePublicKeys[i] = object.covenantCommitteePublicKeys[i];
|
7694
|
+
}
|
7695
|
+
if (object.covenantQuorum != null)
|
7696
|
+
message.covenantQuorum = object.covenantQuorum >>> 0;
|
7697
|
+
return message;
|
7698
|
+
};
|
7699
|
+
|
7700
|
+
/**
|
7701
|
+
* Creates a plain object from a StakingInfo message. Also converts values to other types if specified.
|
7702
|
+
* @function toObject
|
7703
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7704
|
+
* @static
|
7705
|
+
* @param {TW.BabylonStaking.Proto.StakingInfo} message StakingInfo
|
7706
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
7707
|
+
* @returns {Object.<string,*>} Plain object
|
7708
|
+
*/
|
7709
|
+
StakingInfo.toObject = function toObject(message, options) {
|
7710
|
+
if (!options)
|
7711
|
+
options = {};
|
7712
|
+
var object = {};
|
7713
|
+
if (options.arrays || options.defaults)
|
7714
|
+
object.covenantCommitteePublicKeys = [];
|
7715
|
+
if (options.defaults) {
|
7716
|
+
if (options.bytes === String)
|
7717
|
+
object.stakerPublicKey = "";
|
7718
|
+
else {
|
7719
|
+
object.stakerPublicKey = [];
|
7720
|
+
if (options.bytes !== Array)
|
7721
|
+
object.stakerPublicKey = $util.newBuffer(object.stakerPublicKey);
|
7722
|
+
}
|
7723
|
+
if (options.bytes === String)
|
7724
|
+
object.finalityProviderPublicKey = "";
|
7725
|
+
else {
|
7726
|
+
object.finalityProviderPublicKey = [];
|
7727
|
+
if (options.bytes !== Array)
|
7728
|
+
object.finalityProviderPublicKey = $util.newBuffer(object.finalityProviderPublicKey);
|
7729
|
+
}
|
7730
|
+
object.stakingTime = 0;
|
7731
|
+
object.covenantQuorum = 0;
|
7732
|
+
}
|
7733
|
+
if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
|
7734
|
+
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;
|
7735
|
+
if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
|
7736
|
+
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;
|
7737
|
+
if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
|
7738
|
+
object.stakingTime = message.stakingTime;
|
7739
|
+
if (message.covenantCommitteePublicKeys && message.covenantCommitteePublicKeys.length) {
|
7740
|
+
object.covenantCommitteePublicKeys = [];
|
7741
|
+
for (var j = 0; j < message.covenantCommitteePublicKeys.length; ++j)
|
7742
|
+
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];
|
7743
|
+
}
|
7744
|
+
if (message.covenantQuorum != null && message.hasOwnProperty("covenantQuorum"))
|
7745
|
+
object.covenantQuorum = message.covenantQuorum;
|
7746
|
+
return object;
|
7747
|
+
};
|
7748
|
+
|
7749
|
+
/**
|
7750
|
+
* Converts this StakingInfo to JSON.
|
7751
|
+
* @function toJSON
|
7752
|
+
* @memberof TW.BabylonStaking.Proto.StakingInfo
|
7753
|
+
* @instance
|
7754
|
+
* @returns {Object.<string,*>} JSON object
|
7755
|
+
*/
|
7756
|
+
StakingInfo.prototype.toJSON = function toJSON() {
|
7757
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7758
|
+
};
|
7759
|
+
|
7760
|
+
return StakingInfo;
|
7761
|
+
})();
|
7762
|
+
|
7763
|
+
Proto.InputBuilder = (function() {
|
7764
|
+
|
7765
|
+
/**
|
7766
|
+
* Properties of an InputBuilder.
|
7767
|
+
* @memberof TW.BabylonStaking.Proto
|
7768
|
+
* @interface IInputBuilder
|
7769
|
+
*/
|
7770
|
+
|
7771
|
+
/**
|
7772
|
+
* Constructs a new InputBuilder.
|
7773
|
+
* @memberof TW.BabylonStaking.Proto
|
7774
|
+
* @classdesc Represents an InputBuilder.
|
7775
|
+
* @implements IInputBuilder
|
7776
|
+
* @constructor
|
7777
|
+
* @param {TW.BabylonStaking.Proto.IInputBuilder=} [properties] Properties to set
|
7778
|
+
*/
|
7779
|
+
function InputBuilder(properties) {
|
7780
|
+
if (properties)
|
7781
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7782
|
+
if (properties[keys[i]] != null)
|
7783
|
+
this[keys[i]] = properties[keys[i]];
|
7784
|
+
}
|
7785
|
+
|
7786
|
+
/**
|
7787
|
+
* Creates a new InputBuilder instance using the specified properties.
|
7788
|
+
* @function create
|
7789
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7790
|
+
* @static
|
7791
|
+
* @param {TW.BabylonStaking.Proto.IInputBuilder=} [properties] Properties to set
|
7792
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder} InputBuilder instance
|
7793
|
+
*/
|
7794
|
+
InputBuilder.create = function create(properties) {
|
7795
|
+
return new InputBuilder(properties);
|
7796
|
+
};
|
7797
|
+
|
7798
|
+
/**
|
7799
|
+
* Encodes the specified InputBuilder message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.verify|verify} messages.
|
7800
|
+
* @function encode
|
7801
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7802
|
+
* @static
|
7803
|
+
* @param {TW.BabylonStaking.Proto.IInputBuilder} message InputBuilder message or plain object to encode
|
7804
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
7805
|
+
* @returns {$protobuf.Writer} Writer
|
7806
|
+
*/
|
7807
|
+
InputBuilder.encode = function encode(message, writer) {
|
7808
|
+
if (!writer)
|
7809
|
+
writer = $Writer.create();
|
7810
|
+
return writer;
|
7811
|
+
};
|
7812
|
+
|
7813
|
+
/**
|
7814
|
+
* Decodes an InputBuilder message from the specified reader or buffer.
|
7815
|
+
* @function decode
|
7816
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7817
|
+
* @static
|
7818
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7819
|
+
* @param {number} [length] Message length if known beforehand
|
7820
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder} InputBuilder
|
7821
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
7822
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7823
|
+
*/
|
7824
|
+
InputBuilder.decode = function decode(reader, length) {
|
7825
|
+
if (!(reader instanceof $Reader))
|
7826
|
+
reader = $Reader.create(reader);
|
7827
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder();
|
7828
|
+
while (reader.pos < end) {
|
7829
|
+
var tag = reader.uint32();
|
7830
|
+
switch (tag >>> 3) {
|
7831
|
+
default:
|
7832
|
+
reader.skipType(tag & 7);
|
7833
|
+
break;
|
7834
|
+
}
|
7835
|
+
}
|
7836
|
+
return message;
|
7837
|
+
};
|
7838
|
+
|
7839
|
+
/**
|
7840
|
+
* Verifies an InputBuilder message.
|
7841
|
+
* @function verify
|
7842
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7843
|
+
* @static
|
7844
|
+
* @param {Object.<string,*>} message Plain object to verify
|
7845
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7846
|
+
*/
|
7847
|
+
InputBuilder.verify = function verify(message) {
|
7848
|
+
if (typeof message !== "object" || message === null)
|
7849
|
+
return "object expected";
|
7850
|
+
return null;
|
7851
|
+
};
|
7852
|
+
|
7853
|
+
/**
|
7854
|
+
* Creates an InputBuilder message from a plain object. Also converts values to their respective internal types.
|
7855
|
+
* @function fromObject
|
7856
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7857
|
+
* @static
|
7858
|
+
* @param {Object.<string,*>} object Plain object
|
7859
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder} InputBuilder
|
7860
|
+
*/
|
7861
|
+
InputBuilder.fromObject = function fromObject(object) {
|
7862
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder)
|
7863
|
+
return object;
|
7864
|
+
return new $root.TW.BabylonStaking.Proto.InputBuilder();
|
7865
|
+
};
|
7866
|
+
|
7867
|
+
/**
|
7868
|
+
* Creates a plain object from an InputBuilder message. Also converts values to other types if specified.
|
7869
|
+
* @function toObject
|
7870
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7871
|
+
* @static
|
7872
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder} message InputBuilder
|
7873
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
7874
|
+
* @returns {Object.<string,*>} Plain object
|
7875
|
+
*/
|
7876
|
+
InputBuilder.toObject = function toObject() {
|
7877
|
+
return {};
|
7878
|
+
};
|
7879
|
+
|
7880
|
+
/**
|
7881
|
+
* Converts this InputBuilder to JSON.
|
7882
|
+
* @function toJSON
|
7883
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7884
|
+
* @instance
|
7885
|
+
* @returns {Object.<string,*>} JSON object
|
7886
|
+
*/
|
7887
|
+
InputBuilder.prototype.toJSON = function toJSON() {
|
7888
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7889
|
+
};
|
7890
|
+
|
7891
|
+
InputBuilder.StakingTimelockPath = (function() {
|
7892
|
+
|
7893
|
+
/**
|
7894
|
+
* Properties of a StakingTimelockPath.
|
7895
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7896
|
+
* @interface IStakingTimelockPath
|
7897
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingTimelockPath params
|
7898
|
+
*/
|
7899
|
+
|
7900
|
+
/**
|
7901
|
+
* Constructs a new StakingTimelockPath.
|
7902
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
7903
|
+
* @classdesc Represents a StakingTimelockPath.
|
7904
|
+
* @implements IStakingTimelockPath
|
7905
|
+
* @constructor
|
7906
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath=} [properties] Properties to set
|
7907
|
+
*/
|
7908
|
+
function StakingTimelockPath(properties) {
|
7909
|
+
if (properties)
|
7910
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7911
|
+
if (properties[keys[i]] != null)
|
7912
|
+
this[keys[i]] = properties[keys[i]];
|
7913
|
+
}
|
7914
|
+
|
7915
|
+
/**
|
7916
|
+
* StakingTimelockPath params.
|
7917
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
7918
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
7919
|
+
* @instance
|
7920
|
+
*/
|
7921
|
+
StakingTimelockPath.prototype.params = null;
|
7922
|
+
|
7923
|
+
/**
|
7924
|
+
* Creates a new StakingTimelockPath instance using the specified properties.
|
7925
|
+
* @function create
|
7926
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
7927
|
+
* @static
|
7928
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath=} [properties] Properties to set
|
7929
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} StakingTimelockPath instance
|
7930
|
+
*/
|
7931
|
+
StakingTimelockPath.create = function create(properties) {
|
7932
|
+
return new StakingTimelockPath(properties);
|
7933
|
+
};
|
7934
|
+
|
7935
|
+
/**
|
7936
|
+
* Encodes the specified StakingTimelockPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.verify|verify} messages.
|
7937
|
+
* @function encode
|
7938
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
7939
|
+
* @static
|
7940
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath} message StakingTimelockPath message or plain object to encode
|
7941
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
7942
|
+
* @returns {$protobuf.Writer} Writer
|
7943
|
+
*/
|
7944
|
+
StakingTimelockPath.encode = function encode(message, writer) {
|
7945
|
+
if (!writer)
|
7946
|
+
writer = $Writer.create();
|
7947
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
7948
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
7949
|
+
return writer;
|
7950
|
+
};
|
7951
|
+
|
7952
|
+
/**
|
7953
|
+
* Decodes a StakingTimelockPath message from the specified reader or buffer.
|
7954
|
+
* @function decode
|
7955
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
7956
|
+
* @static
|
7957
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7958
|
+
* @param {number} [length] Message length if known beforehand
|
7959
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} StakingTimelockPath
|
7960
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
7961
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7962
|
+
*/
|
7963
|
+
StakingTimelockPath.decode = function decode(reader, length) {
|
7964
|
+
if (!(reader instanceof $Reader))
|
7965
|
+
reader = $Reader.create(reader);
|
7966
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath();
|
7967
|
+
while (reader.pos < end) {
|
7968
|
+
var tag = reader.uint32();
|
7969
|
+
switch (tag >>> 3) {
|
7970
|
+
case 1:
|
7971
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
7972
|
+
break;
|
7973
|
+
default:
|
7974
|
+
reader.skipType(tag & 7);
|
7975
|
+
break;
|
7976
|
+
}
|
7977
|
+
}
|
7978
|
+
return message;
|
7979
|
+
};
|
7980
|
+
|
7981
|
+
/**
|
7982
|
+
* Verifies a StakingTimelockPath message.
|
7983
|
+
* @function verify
|
7984
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
7985
|
+
* @static
|
7986
|
+
* @param {Object.<string,*>} message Plain object to verify
|
7987
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7988
|
+
*/
|
7989
|
+
StakingTimelockPath.verify = function verify(message) {
|
7990
|
+
if (typeof message !== "object" || message === null)
|
7991
|
+
return "object expected";
|
7992
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
7993
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
7994
|
+
if (error)
|
7995
|
+
return "params." + error;
|
7996
|
+
}
|
7997
|
+
return null;
|
7998
|
+
};
|
7999
|
+
|
8000
|
+
/**
|
8001
|
+
* Creates a StakingTimelockPath message from a plain object. Also converts values to their respective internal types.
|
8002
|
+
* @function fromObject
|
8003
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
8004
|
+
* @static
|
8005
|
+
* @param {Object.<string,*>} object Plain object
|
8006
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} StakingTimelockPath
|
8007
|
+
*/
|
8008
|
+
StakingTimelockPath.fromObject = function fromObject(object) {
|
8009
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath)
|
8010
|
+
return object;
|
8011
|
+
var message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath();
|
8012
|
+
if (object.params != null) {
|
8013
|
+
if (typeof object.params !== "object")
|
8014
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.params: object expected");
|
8015
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
8016
|
+
}
|
8017
|
+
return message;
|
8018
|
+
};
|
8019
|
+
|
8020
|
+
/**
|
8021
|
+
* Creates a plain object from a StakingTimelockPath message. Also converts values to other types if specified.
|
8022
|
+
* @function toObject
|
8023
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
8024
|
+
* @static
|
8025
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath} message StakingTimelockPath
|
8026
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
8027
|
+
* @returns {Object.<string,*>} Plain object
|
8028
|
+
*/
|
8029
|
+
StakingTimelockPath.toObject = function toObject(message, options) {
|
8030
|
+
if (!options)
|
8031
|
+
options = {};
|
8032
|
+
var object = {};
|
8033
|
+
if (options.defaults)
|
8034
|
+
object.params = null;
|
8035
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
8036
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
8037
|
+
return object;
|
8038
|
+
};
|
8039
|
+
|
8040
|
+
/**
|
8041
|
+
* Converts this StakingTimelockPath to JSON.
|
8042
|
+
* @function toJSON
|
8043
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath
|
8044
|
+
* @instance
|
8045
|
+
* @returns {Object.<string,*>} JSON object
|
8046
|
+
*/
|
8047
|
+
StakingTimelockPath.prototype.toJSON = function toJSON() {
|
8048
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8049
|
+
};
|
8050
|
+
|
8051
|
+
return StakingTimelockPath;
|
8052
|
+
})();
|
8053
|
+
|
8054
|
+
InputBuilder.StakingUnbondingPath = (function() {
|
8055
|
+
|
8056
|
+
/**
|
8057
|
+
* Properties of a StakingUnbondingPath.
|
8058
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8059
|
+
* @interface IStakingUnbondingPath
|
8060
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingUnbondingPath params
|
8061
|
+
* @property {Array.<TW.BabylonStaking.Proto.IPublicKeySignature>|null} [covenantCommitteeSignatures] StakingUnbondingPath covenantCommitteeSignatures
|
8062
|
+
*/
|
8063
|
+
|
8064
|
+
/**
|
8065
|
+
* Constructs a new StakingUnbondingPath.
|
8066
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8067
|
+
* @classdesc Represents a StakingUnbondingPath.
|
8068
|
+
* @implements IStakingUnbondingPath
|
8069
|
+
* @constructor
|
8070
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath=} [properties] Properties to set
|
8071
|
+
*/
|
8072
|
+
function StakingUnbondingPath(properties) {
|
8073
|
+
this.covenantCommitteeSignatures = [];
|
8074
|
+
if (properties)
|
8075
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8076
|
+
if (properties[keys[i]] != null)
|
8077
|
+
this[keys[i]] = properties[keys[i]];
|
8078
|
+
}
|
8079
|
+
|
8080
|
+
/**
|
8081
|
+
* StakingUnbondingPath params.
|
8082
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
8083
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8084
|
+
* @instance
|
8085
|
+
*/
|
8086
|
+
StakingUnbondingPath.prototype.params = null;
|
8087
|
+
|
8088
|
+
/**
|
8089
|
+
* StakingUnbondingPath covenantCommitteeSignatures.
|
8090
|
+
* @member {Array.<TW.BabylonStaking.Proto.IPublicKeySignature>} covenantCommitteeSignatures
|
8091
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8092
|
+
* @instance
|
8093
|
+
*/
|
8094
|
+
StakingUnbondingPath.prototype.covenantCommitteeSignatures = $util.emptyArray;
|
8095
|
+
|
8096
|
+
/**
|
8097
|
+
* Creates a new StakingUnbondingPath instance using the specified properties.
|
8098
|
+
* @function create
|
8099
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8100
|
+
* @static
|
8101
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath=} [properties] Properties to set
|
8102
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} StakingUnbondingPath instance
|
8103
|
+
*/
|
8104
|
+
StakingUnbondingPath.create = function create(properties) {
|
8105
|
+
return new StakingUnbondingPath(properties);
|
8106
|
+
};
|
8107
|
+
|
8108
|
+
/**
|
8109
|
+
* Encodes the specified StakingUnbondingPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.verify|verify} messages.
|
8110
|
+
* @function encode
|
8111
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8112
|
+
* @static
|
8113
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath} message StakingUnbondingPath message or plain object to encode
|
8114
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
8115
|
+
* @returns {$protobuf.Writer} Writer
|
8116
|
+
*/
|
8117
|
+
StakingUnbondingPath.encode = function encode(message, writer) {
|
8118
|
+
if (!writer)
|
8119
|
+
writer = $Writer.create();
|
8120
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
8121
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8122
|
+
if (message.covenantCommitteeSignatures != null && message.covenantCommitteeSignatures.length)
|
8123
|
+
for (var i = 0; i < message.covenantCommitteeSignatures.length; ++i)
|
8124
|
+
$root.TW.BabylonStaking.Proto.PublicKeySignature.encode(message.covenantCommitteeSignatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
8125
|
+
return writer;
|
8126
|
+
};
|
8127
|
+
|
8128
|
+
/**
|
8129
|
+
* Decodes a StakingUnbondingPath message from the specified reader or buffer.
|
8130
|
+
* @function decode
|
8131
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8132
|
+
* @static
|
8133
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8134
|
+
* @param {number} [length] Message length if known beforehand
|
8135
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} StakingUnbondingPath
|
8136
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
8137
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8138
|
+
*/
|
8139
|
+
StakingUnbondingPath.decode = function decode(reader, length) {
|
8140
|
+
if (!(reader instanceof $Reader))
|
8141
|
+
reader = $Reader.create(reader);
|
8142
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath();
|
8143
|
+
while (reader.pos < end) {
|
8144
|
+
var tag = reader.uint32();
|
8145
|
+
switch (tag >>> 3) {
|
8146
|
+
case 1:
|
8147
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
8148
|
+
break;
|
8149
|
+
case 2:
|
8150
|
+
if (!(message.covenantCommitteeSignatures && message.covenantCommitteeSignatures.length))
|
8151
|
+
message.covenantCommitteeSignatures = [];
|
8152
|
+
message.covenantCommitteeSignatures.push($root.TW.BabylonStaking.Proto.PublicKeySignature.decode(reader, reader.uint32()));
|
8153
|
+
break;
|
8154
|
+
default:
|
8155
|
+
reader.skipType(tag & 7);
|
8156
|
+
break;
|
8157
|
+
}
|
8158
|
+
}
|
8159
|
+
return message;
|
8160
|
+
};
|
8161
|
+
|
8162
|
+
/**
|
8163
|
+
* Verifies a StakingUnbondingPath message.
|
8164
|
+
* @function verify
|
8165
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8166
|
+
* @static
|
8167
|
+
* @param {Object.<string,*>} message Plain object to verify
|
8168
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8169
|
+
*/
|
8170
|
+
StakingUnbondingPath.verify = function verify(message) {
|
8171
|
+
if (typeof message !== "object" || message === null)
|
8172
|
+
return "object expected";
|
8173
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
8174
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
8175
|
+
if (error)
|
8176
|
+
return "params." + error;
|
8177
|
+
}
|
8178
|
+
if (message.covenantCommitteeSignatures != null && message.hasOwnProperty("covenantCommitteeSignatures")) {
|
8179
|
+
if (!Array.isArray(message.covenantCommitteeSignatures))
|
8180
|
+
return "covenantCommitteeSignatures: array expected";
|
8181
|
+
for (var i = 0; i < message.covenantCommitteeSignatures.length; ++i) {
|
8182
|
+
var error = $root.TW.BabylonStaking.Proto.PublicKeySignature.verify(message.covenantCommitteeSignatures[i]);
|
8183
|
+
if (error)
|
8184
|
+
return "covenantCommitteeSignatures." + error;
|
8185
|
+
}
|
8186
|
+
}
|
8187
|
+
return null;
|
8188
|
+
};
|
8189
|
+
|
8190
|
+
/**
|
8191
|
+
* Creates a StakingUnbondingPath message from a plain object. Also converts values to their respective internal types.
|
8192
|
+
* @function fromObject
|
8193
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8194
|
+
* @static
|
8195
|
+
* @param {Object.<string,*>} object Plain object
|
8196
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} StakingUnbondingPath
|
8197
|
+
*/
|
8198
|
+
StakingUnbondingPath.fromObject = function fromObject(object) {
|
8199
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath)
|
8200
|
+
return object;
|
8201
|
+
var message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath();
|
8202
|
+
if (object.params != null) {
|
8203
|
+
if (typeof object.params !== "object")
|
8204
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.params: object expected");
|
8205
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
8206
|
+
}
|
8207
|
+
if (object.covenantCommitteeSignatures) {
|
8208
|
+
if (!Array.isArray(object.covenantCommitteeSignatures))
|
8209
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.covenantCommitteeSignatures: array expected");
|
8210
|
+
message.covenantCommitteeSignatures = [];
|
8211
|
+
for (var i = 0; i < object.covenantCommitteeSignatures.length; ++i) {
|
8212
|
+
if (typeof object.covenantCommitteeSignatures[i] !== "object")
|
8213
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.covenantCommitteeSignatures: object expected");
|
8214
|
+
message.covenantCommitteeSignatures[i] = $root.TW.BabylonStaking.Proto.PublicKeySignature.fromObject(object.covenantCommitteeSignatures[i]);
|
8215
|
+
}
|
8216
|
+
}
|
8217
|
+
return message;
|
8218
|
+
};
|
8219
|
+
|
8220
|
+
/**
|
8221
|
+
* Creates a plain object from a StakingUnbondingPath message. Also converts values to other types if specified.
|
8222
|
+
* @function toObject
|
8223
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8224
|
+
* @static
|
8225
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath} message StakingUnbondingPath
|
8226
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
8227
|
+
* @returns {Object.<string,*>} Plain object
|
8228
|
+
*/
|
8229
|
+
StakingUnbondingPath.toObject = function toObject(message, options) {
|
8230
|
+
if (!options)
|
8231
|
+
options = {};
|
8232
|
+
var object = {};
|
8233
|
+
if (options.arrays || options.defaults)
|
8234
|
+
object.covenantCommitteeSignatures = [];
|
8235
|
+
if (options.defaults)
|
8236
|
+
object.params = null;
|
8237
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
8238
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
8239
|
+
if (message.covenantCommitteeSignatures && message.covenantCommitteeSignatures.length) {
|
8240
|
+
object.covenantCommitteeSignatures = [];
|
8241
|
+
for (var j = 0; j < message.covenantCommitteeSignatures.length; ++j)
|
8242
|
+
object.covenantCommitteeSignatures[j] = $root.TW.BabylonStaking.Proto.PublicKeySignature.toObject(message.covenantCommitteeSignatures[j], options);
|
8243
|
+
}
|
8244
|
+
return object;
|
8245
|
+
};
|
8246
|
+
|
8247
|
+
/**
|
8248
|
+
* Converts this StakingUnbondingPath to JSON.
|
8249
|
+
* @function toJSON
|
8250
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath
|
8251
|
+
* @instance
|
8252
|
+
* @returns {Object.<string,*>} JSON object
|
8253
|
+
*/
|
8254
|
+
StakingUnbondingPath.prototype.toJSON = function toJSON() {
|
8255
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8256
|
+
};
|
8257
|
+
|
8258
|
+
return StakingUnbondingPath;
|
8259
|
+
})();
|
8260
|
+
|
8261
|
+
InputBuilder.StakingSlashingPath = (function() {
|
8262
|
+
|
8263
|
+
/**
|
8264
|
+
* Properties of a StakingSlashingPath.
|
8265
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8266
|
+
* @interface IStakingSlashingPath
|
8267
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingSlashingPath params
|
8268
|
+
* @property {TW.BabylonStaking.Proto.IPublicKeySignature|null} [finalityProviderSignature] StakingSlashingPath finalityProviderSignature
|
8269
|
+
*/
|
8270
|
+
|
8271
|
+
/**
|
8272
|
+
* Constructs a new StakingSlashingPath.
|
8273
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8274
|
+
* @classdesc Represents a StakingSlashingPath.
|
8275
|
+
* @implements IStakingSlashingPath
|
8276
|
+
* @constructor
|
8277
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath=} [properties] Properties to set
|
8278
|
+
*/
|
8279
|
+
function StakingSlashingPath(properties) {
|
8280
|
+
if (properties)
|
8281
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8282
|
+
if (properties[keys[i]] != null)
|
8283
|
+
this[keys[i]] = properties[keys[i]];
|
8284
|
+
}
|
8285
|
+
|
8286
|
+
/**
|
8287
|
+
* StakingSlashingPath params.
|
8288
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
8289
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8290
|
+
* @instance
|
8291
|
+
*/
|
8292
|
+
StakingSlashingPath.prototype.params = null;
|
8293
|
+
|
8294
|
+
/**
|
8295
|
+
* StakingSlashingPath finalityProviderSignature.
|
8296
|
+
* @member {TW.BabylonStaking.Proto.IPublicKeySignature|null|undefined} finalityProviderSignature
|
8297
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8298
|
+
* @instance
|
8299
|
+
*/
|
8300
|
+
StakingSlashingPath.prototype.finalityProviderSignature = null;
|
8301
|
+
|
8302
|
+
/**
|
8303
|
+
* Creates a new StakingSlashingPath instance using the specified properties.
|
8304
|
+
* @function create
|
8305
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8306
|
+
* @static
|
8307
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath=} [properties] Properties to set
|
8308
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} StakingSlashingPath instance
|
8309
|
+
*/
|
8310
|
+
StakingSlashingPath.create = function create(properties) {
|
8311
|
+
return new StakingSlashingPath(properties);
|
8312
|
+
};
|
8313
|
+
|
8314
|
+
/**
|
8315
|
+
* Encodes the specified StakingSlashingPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.verify|verify} messages.
|
8316
|
+
* @function encode
|
8317
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8318
|
+
* @static
|
8319
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath} message StakingSlashingPath message or plain object to encode
|
8320
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
8321
|
+
* @returns {$protobuf.Writer} Writer
|
8322
|
+
*/
|
8323
|
+
StakingSlashingPath.encode = function encode(message, writer) {
|
8324
|
+
if (!writer)
|
8325
|
+
writer = $Writer.create();
|
8326
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
8327
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8328
|
+
if (message.finalityProviderSignature != null && Object.hasOwnProperty.call(message, "finalityProviderSignature"))
|
8329
|
+
$root.TW.BabylonStaking.Proto.PublicKeySignature.encode(message.finalityProviderSignature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
8330
|
+
return writer;
|
8331
|
+
};
|
8332
|
+
|
8333
|
+
/**
|
8334
|
+
* Decodes a StakingSlashingPath message from the specified reader or buffer.
|
8335
|
+
* @function decode
|
8336
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8337
|
+
* @static
|
8338
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8339
|
+
* @param {number} [length] Message length if known beforehand
|
8340
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} StakingSlashingPath
|
8341
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
8342
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8343
|
+
*/
|
8344
|
+
StakingSlashingPath.decode = function decode(reader, length) {
|
8345
|
+
if (!(reader instanceof $Reader))
|
8346
|
+
reader = $Reader.create(reader);
|
8347
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath();
|
8348
|
+
while (reader.pos < end) {
|
8349
|
+
var tag = reader.uint32();
|
8350
|
+
switch (tag >>> 3) {
|
8351
|
+
case 1:
|
8352
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
8353
|
+
break;
|
8354
|
+
case 2:
|
8355
|
+
message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.decode(reader, reader.uint32());
|
8356
|
+
break;
|
8357
|
+
default:
|
8358
|
+
reader.skipType(tag & 7);
|
8359
|
+
break;
|
8360
|
+
}
|
8361
|
+
}
|
8362
|
+
return message;
|
8363
|
+
};
|
8364
|
+
|
8365
|
+
/**
|
8366
|
+
* Verifies a StakingSlashingPath message.
|
8367
|
+
* @function verify
|
8368
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8369
|
+
* @static
|
8370
|
+
* @param {Object.<string,*>} message Plain object to verify
|
8371
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8372
|
+
*/
|
8373
|
+
StakingSlashingPath.verify = function verify(message) {
|
8374
|
+
if (typeof message !== "object" || message === null)
|
8375
|
+
return "object expected";
|
8376
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
8377
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
8378
|
+
if (error)
|
8379
|
+
return "params." + error;
|
8380
|
+
}
|
8381
|
+
if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature")) {
|
8382
|
+
var error = $root.TW.BabylonStaking.Proto.PublicKeySignature.verify(message.finalityProviderSignature);
|
8383
|
+
if (error)
|
8384
|
+
return "finalityProviderSignature." + error;
|
8385
|
+
}
|
8386
|
+
return null;
|
8387
|
+
};
|
8388
|
+
|
8389
|
+
/**
|
8390
|
+
* Creates a StakingSlashingPath message from a plain object. Also converts values to their respective internal types.
|
8391
|
+
* @function fromObject
|
8392
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8393
|
+
* @static
|
8394
|
+
* @param {Object.<string,*>} object Plain object
|
8395
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} StakingSlashingPath
|
8396
|
+
*/
|
8397
|
+
StakingSlashingPath.fromObject = function fromObject(object) {
|
8398
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath)
|
8399
|
+
return object;
|
8400
|
+
var message = new $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath();
|
8401
|
+
if (object.params != null) {
|
8402
|
+
if (typeof object.params !== "object")
|
8403
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.params: object expected");
|
8404
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
8405
|
+
}
|
8406
|
+
if (object.finalityProviderSignature != null) {
|
8407
|
+
if (typeof object.finalityProviderSignature !== "object")
|
8408
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.finalityProviderSignature: object expected");
|
8409
|
+
message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.fromObject(object.finalityProviderSignature);
|
8410
|
+
}
|
8411
|
+
return message;
|
8412
|
+
};
|
8413
|
+
|
8414
|
+
/**
|
8415
|
+
* Creates a plain object from a StakingSlashingPath message. Also converts values to other types if specified.
|
8416
|
+
* @function toObject
|
8417
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8418
|
+
* @static
|
8419
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath} message StakingSlashingPath
|
8420
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
8421
|
+
* @returns {Object.<string,*>} Plain object
|
8422
|
+
*/
|
8423
|
+
StakingSlashingPath.toObject = function toObject(message, options) {
|
8424
|
+
if (!options)
|
8425
|
+
options = {};
|
8426
|
+
var object = {};
|
8427
|
+
if (options.defaults) {
|
8428
|
+
object.params = null;
|
8429
|
+
object.finalityProviderSignature = null;
|
8430
|
+
}
|
8431
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
8432
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
8433
|
+
if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature"))
|
8434
|
+
object.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.toObject(message.finalityProviderSignature, options);
|
8435
|
+
return object;
|
8436
|
+
};
|
8437
|
+
|
8438
|
+
/**
|
8439
|
+
* Converts this StakingSlashingPath to JSON.
|
8440
|
+
* @function toJSON
|
8441
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath
|
8442
|
+
* @instance
|
8443
|
+
* @returns {Object.<string,*>} JSON object
|
8444
|
+
*/
|
8445
|
+
StakingSlashingPath.prototype.toJSON = function toJSON() {
|
8446
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8447
|
+
};
|
8448
|
+
|
8449
|
+
return StakingSlashingPath;
|
8450
|
+
})();
|
8451
|
+
|
8452
|
+
InputBuilder.UnbondingTimelockPath = (function() {
|
8453
|
+
|
8454
|
+
/**
|
8455
|
+
* Properties of an UnbondingTimelockPath.
|
8456
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8457
|
+
* @interface IUnbondingTimelockPath
|
8458
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] UnbondingTimelockPath params
|
8459
|
+
*/
|
8460
|
+
|
8461
|
+
/**
|
8462
|
+
* Constructs a new UnbondingTimelockPath.
|
8463
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8464
|
+
* @classdesc Represents an UnbondingTimelockPath.
|
8465
|
+
* @implements IUnbondingTimelockPath
|
8466
|
+
* @constructor
|
8467
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath=} [properties] Properties to set
|
8468
|
+
*/
|
8469
|
+
function UnbondingTimelockPath(properties) {
|
8470
|
+
if (properties)
|
8471
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8472
|
+
if (properties[keys[i]] != null)
|
8473
|
+
this[keys[i]] = properties[keys[i]];
|
8474
|
+
}
|
8475
|
+
|
8476
|
+
/**
|
8477
|
+
* UnbondingTimelockPath params.
|
8478
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
8479
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8480
|
+
* @instance
|
8481
|
+
*/
|
8482
|
+
UnbondingTimelockPath.prototype.params = null;
|
8483
|
+
|
8484
|
+
/**
|
8485
|
+
* Creates a new UnbondingTimelockPath instance using the specified properties.
|
8486
|
+
* @function create
|
8487
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8488
|
+
* @static
|
8489
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath=} [properties] Properties to set
|
8490
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} UnbondingTimelockPath instance
|
8491
|
+
*/
|
8492
|
+
UnbondingTimelockPath.create = function create(properties) {
|
8493
|
+
return new UnbondingTimelockPath(properties);
|
8494
|
+
};
|
8495
|
+
|
8496
|
+
/**
|
8497
|
+
* Encodes the specified UnbondingTimelockPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.verify|verify} messages.
|
8498
|
+
* @function encode
|
8499
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8500
|
+
* @static
|
8501
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath} message UnbondingTimelockPath message or plain object to encode
|
8502
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
8503
|
+
* @returns {$protobuf.Writer} Writer
|
8504
|
+
*/
|
8505
|
+
UnbondingTimelockPath.encode = function encode(message, writer) {
|
8506
|
+
if (!writer)
|
8507
|
+
writer = $Writer.create();
|
8508
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
8509
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8510
|
+
return writer;
|
8511
|
+
};
|
8512
|
+
|
8513
|
+
/**
|
8514
|
+
* Decodes an UnbondingTimelockPath message from the specified reader or buffer.
|
8515
|
+
* @function decode
|
8516
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8517
|
+
* @static
|
8518
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8519
|
+
* @param {number} [length] Message length if known beforehand
|
8520
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} UnbondingTimelockPath
|
8521
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
8522
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8523
|
+
*/
|
8524
|
+
UnbondingTimelockPath.decode = function decode(reader, length) {
|
8525
|
+
if (!(reader instanceof $Reader))
|
8526
|
+
reader = $Reader.create(reader);
|
8527
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath();
|
8528
|
+
while (reader.pos < end) {
|
8529
|
+
var tag = reader.uint32();
|
8530
|
+
switch (tag >>> 3) {
|
8531
|
+
case 1:
|
8532
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
8533
|
+
break;
|
8534
|
+
default:
|
8535
|
+
reader.skipType(tag & 7);
|
8536
|
+
break;
|
8537
|
+
}
|
8538
|
+
}
|
8539
|
+
return message;
|
8540
|
+
};
|
8541
|
+
|
8542
|
+
/**
|
8543
|
+
* Verifies an UnbondingTimelockPath message.
|
8544
|
+
* @function verify
|
8545
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8546
|
+
* @static
|
8547
|
+
* @param {Object.<string,*>} message Plain object to verify
|
8548
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8549
|
+
*/
|
8550
|
+
UnbondingTimelockPath.verify = function verify(message) {
|
8551
|
+
if (typeof message !== "object" || message === null)
|
8552
|
+
return "object expected";
|
8553
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
8554
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
8555
|
+
if (error)
|
8556
|
+
return "params." + error;
|
8557
|
+
}
|
8558
|
+
return null;
|
8559
|
+
};
|
8560
|
+
|
8561
|
+
/**
|
8562
|
+
* Creates an UnbondingTimelockPath message from a plain object. Also converts values to their respective internal types.
|
8563
|
+
* @function fromObject
|
8564
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8565
|
+
* @static
|
8566
|
+
* @param {Object.<string,*>} object Plain object
|
8567
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} UnbondingTimelockPath
|
8568
|
+
*/
|
8569
|
+
UnbondingTimelockPath.fromObject = function fromObject(object) {
|
8570
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath)
|
8571
|
+
return object;
|
8572
|
+
var message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath();
|
8573
|
+
if (object.params != null) {
|
8574
|
+
if (typeof object.params !== "object")
|
8575
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.params: object expected");
|
8576
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
8577
|
+
}
|
8578
|
+
return message;
|
8579
|
+
};
|
8580
|
+
|
8581
|
+
/**
|
8582
|
+
* Creates a plain object from an UnbondingTimelockPath message. Also converts values to other types if specified.
|
8583
|
+
* @function toObject
|
8584
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8585
|
+
* @static
|
8586
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath} message UnbondingTimelockPath
|
8587
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
8588
|
+
* @returns {Object.<string,*>} Plain object
|
8589
|
+
*/
|
8590
|
+
UnbondingTimelockPath.toObject = function toObject(message, options) {
|
8591
|
+
if (!options)
|
8592
|
+
options = {};
|
8593
|
+
var object = {};
|
8594
|
+
if (options.defaults)
|
8595
|
+
object.params = null;
|
8596
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
8597
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
8598
|
+
return object;
|
8599
|
+
};
|
8600
|
+
|
8601
|
+
/**
|
8602
|
+
* Converts this UnbondingTimelockPath to JSON.
|
8603
|
+
* @function toJSON
|
8604
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath
|
8605
|
+
* @instance
|
8606
|
+
* @returns {Object.<string,*>} JSON object
|
8607
|
+
*/
|
8608
|
+
UnbondingTimelockPath.prototype.toJSON = function toJSON() {
|
8609
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8610
|
+
};
|
8611
|
+
|
8612
|
+
return UnbondingTimelockPath;
|
8613
|
+
})();
|
8614
|
+
|
8615
|
+
InputBuilder.UnbondingSlashingPath = (function() {
|
8616
|
+
|
8617
|
+
/**
|
8618
|
+
* Properties of an UnbondingSlashingPath.
|
8619
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8620
|
+
* @interface IUnbondingSlashingPath
|
8621
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] UnbondingSlashingPath params
|
8622
|
+
* @property {TW.BabylonStaking.Proto.IPublicKeySignature|null} [finalityProviderSignature] UnbondingSlashingPath finalityProviderSignature
|
8623
|
+
*/
|
8624
|
+
|
8625
|
+
/**
|
8626
|
+
* Constructs a new UnbondingSlashingPath.
|
8627
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder
|
8628
|
+
* @classdesc Represents an UnbondingSlashingPath.
|
8629
|
+
* @implements IUnbondingSlashingPath
|
8630
|
+
* @constructor
|
8631
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath=} [properties] Properties to set
|
8632
|
+
*/
|
8633
|
+
function UnbondingSlashingPath(properties) {
|
8634
|
+
if (properties)
|
8635
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8636
|
+
if (properties[keys[i]] != null)
|
8637
|
+
this[keys[i]] = properties[keys[i]];
|
8638
|
+
}
|
8639
|
+
|
8640
|
+
/**
|
8641
|
+
* UnbondingSlashingPath params.
|
8642
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
8643
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8644
|
+
* @instance
|
8645
|
+
*/
|
8646
|
+
UnbondingSlashingPath.prototype.params = null;
|
8647
|
+
|
8648
|
+
/**
|
8649
|
+
* UnbondingSlashingPath finalityProviderSignature.
|
8650
|
+
* @member {TW.BabylonStaking.Proto.IPublicKeySignature|null|undefined} finalityProviderSignature
|
8651
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8652
|
+
* @instance
|
8653
|
+
*/
|
8654
|
+
UnbondingSlashingPath.prototype.finalityProviderSignature = null;
|
8655
|
+
|
8656
|
+
/**
|
8657
|
+
* Creates a new UnbondingSlashingPath instance using the specified properties.
|
8658
|
+
* @function create
|
8659
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8660
|
+
* @static
|
8661
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath=} [properties] Properties to set
|
8662
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} UnbondingSlashingPath instance
|
8663
|
+
*/
|
8664
|
+
UnbondingSlashingPath.create = function create(properties) {
|
8665
|
+
return new UnbondingSlashingPath(properties);
|
8666
|
+
};
|
8667
|
+
|
8668
|
+
/**
|
8669
|
+
* Encodes the specified UnbondingSlashingPath message. Does not implicitly {@link TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.verify|verify} messages.
|
8670
|
+
* @function encode
|
8671
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8672
|
+
* @static
|
8673
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath} message UnbondingSlashingPath message or plain object to encode
|
8674
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
8675
|
+
* @returns {$protobuf.Writer} Writer
|
8676
|
+
*/
|
8677
|
+
UnbondingSlashingPath.encode = function encode(message, writer) {
|
8678
|
+
if (!writer)
|
8679
|
+
writer = $Writer.create();
|
8680
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
8681
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8682
|
+
if (message.finalityProviderSignature != null && Object.hasOwnProperty.call(message, "finalityProviderSignature"))
|
8683
|
+
$root.TW.BabylonStaking.Proto.PublicKeySignature.encode(message.finalityProviderSignature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
8684
|
+
return writer;
|
8685
|
+
};
|
8686
|
+
|
8687
|
+
/**
|
8688
|
+
* Decodes an UnbondingSlashingPath message from the specified reader or buffer.
|
8689
|
+
* @function decode
|
8690
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8691
|
+
* @static
|
8692
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8693
|
+
* @param {number} [length] Message length if known beforehand
|
8694
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} UnbondingSlashingPath
|
8695
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
8696
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8697
|
+
*/
|
8698
|
+
UnbondingSlashingPath.decode = function decode(reader, length) {
|
8699
|
+
if (!(reader instanceof $Reader))
|
8700
|
+
reader = $Reader.create(reader);
|
8701
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath();
|
8702
|
+
while (reader.pos < end) {
|
8703
|
+
var tag = reader.uint32();
|
8704
|
+
switch (tag >>> 3) {
|
8705
|
+
case 1:
|
8706
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
8707
|
+
break;
|
8708
|
+
case 2:
|
8709
|
+
message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.decode(reader, reader.uint32());
|
8710
|
+
break;
|
8711
|
+
default:
|
8712
|
+
reader.skipType(tag & 7);
|
8713
|
+
break;
|
8714
|
+
}
|
8715
|
+
}
|
8716
|
+
return message;
|
8717
|
+
};
|
8718
|
+
|
8719
|
+
/**
|
8720
|
+
* Verifies an UnbondingSlashingPath message.
|
8721
|
+
* @function verify
|
8722
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8723
|
+
* @static
|
8724
|
+
* @param {Object.<string,*>} message Plain object to verify
|
8725
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8726
|
+
*/
|
8727
|
+
UnbondingSlashingPath.verify = function verify(message) {
|
8728
|
+
if (typeof message !== "object" || message === null)
|
8729
|
+
return "object expected";
|
8730
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
8731
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
8732
|
+
if (error)
|
8733
|
+
return "params." + error;
|
8734
|
+
}
|
8735
|
+
if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature")) {
|
8736
|
+
var error = $root.TW.BabylonStaking.Proto.PublicKeySignature.verify(message.finalityProviderSignature);
|
8737
|
+
if (error)
|
8738
|
+
return "finalityProviderSignature." + error;
|
8739
|
+
}
|
8740
|
+
return null;
|
8741
|
+
};
|
8742
|
+
|
8743
|
+
/**
|
8744
|
+
* Creates an UnbondingSlashingPath message from a plain object. Also converts values to their respective internal types.
|
8745
|
+
* @function fromObject
|
8746
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8747
|
+
* @static
|
8748
|
+
* @param {Object.<string,*>} object Plain object
|
8749
|
+
* @returns {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} UnbondingSlashingPath
|
8750
|
+
*/
|
8751
|
+
UnbondingSlashingPath.fromObject = function fromObject(object) {
|
8752
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath)
|
8753
|
+
return object;
|
8754
|
+
var message = new $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath();
|
8755
|
+
if (object.params != null) {
|
8756
|
+
if (typeof object.params !== "object")
|
8757
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.params: object expected");
|
8758
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
8759
|
+
}
|
8760
|
+
if (object.finalityProviderSignature != null) {
|
8761
|
+
if (typeof object.finalityProviderSignature !== "object")
|
8762
|
+
throw TypeError(".TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.finalityProviderSignature: object expected");
|
8763
|
+
message.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.fromObject(object.finalityProviderSignature);
|
8764
|
+
}
|
8765
|
+
return message;
|
8766
|
+
};
|
8767
|
+
|
8768
|
+
/**
|
8769
|
+
* Creates a plain object from an UnbondingSlashingPath message. Also converts values to other types if specified.
|
8770
|
+
* @function toObject
|
8771
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8772
|
+
* @static
|
8773
|
+
* @param {TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath} message UnbondingSlashingPath
|
8774
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
8775
|
+
* @returns {Object.<string,*>} Plain object
|
8776
|
+
*/
|
8777
|
+
UnbondingSlashingPath.toObject = function toObject(message, options) {
|
8778
|
+
if (!options)
|
8779
|
+
options = {};
|
8780
|
+
var object = {};
|
8781
|
+
if (options.defaults) {
|
8782
|
+
object.params = null;
|
8783
|
+
object.finalityProviderSignature = null;
|
8784
|
+
}
|
8785
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
8786
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
8787
|
+
if (message.finalityProviderSignature != null && message.hasOwnProperty("finalityProviderSignature"))
|
8788
|
+
object.finalityProviderSignature = $root.TW.BabylonStaking.Proto.PublicKeySignature.toObject(message.finalityProviderSignature, options);
|
8789
|
+
return object;
|
8790
|
+
};
|
8791
|
+
|
8792
|
+
/**
|
8793
|
+
* Converts this UnbondingSlashingPath to JSON.
|
8794
|
+
* @function toJSON
|
8795
|
+
* @memberof TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath
|
8796
|
+
* @instance
|
8797
|
+
* @returns {Object.<string,*>} JSON object
|
8798
|
+
*/
|
8799
|
+
UnbondingSlashingPath.prototype.toJSON = function toJSON() {
|
8800
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8801
|
+
};
|
8802
|
+
|
8803
|
+
return UnbondingSlashingPath;
|
8804
|
+
})();
|
8805
|
+
|
8806
|
+
return InputBuilder;
|
8807
|
+
})();
|
8808
|
+
|
8809
|
+
Proto.OutputBuilder = (function() {
|
8810
|
+
|
8811
|
+
/**
|
8812
|
+
* Properties of an OutputBuilder.
|
8813
|
+
* @memberof TW.BabylonStaking.Proto
|
8814
|
+
* @interface IOutputBuilder
|
8815
|
+
*/
|
8816
|
+
|
8817
|
+
/**
|
8818
|
+
* Constructs a new OutputBuilder.
|
8819
|
+
* @memberof TW.BabylonStaking.Proto
|
8820
|
+
* @classdesc Represents an OutputBuilder.
|
8821
|
+
* @implements IOutputBuilder
|
8822
|
+
* @constructor
|
8823
|
+
* @param {TW.BabylonStaking.Proto.IOutputBuilder=} [properties] Properties to set
|
8824
|
+
*/
|
8825
|
+
function OutputBuilder(properties) {
|
8826
|
+
if (properties)
|
8827
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8828
|
+
if (properties[keys[i]] != null)
|
8829
|
+
this[keys[i]] = properties[keys[i]];
|
8830
|
+
}
|
8831
|
+
|
8832
|
+
/**
|
8833
|
+
* Creates a new OutputBuilder instance using the specified properties.
|
8834
|
+
* @function create
|
8835
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8836
|
+
* @static
|
8837
|
+
* @param {TW.BabylonStaking.Proto.IOutputBuilder=} [properties] Properties to set
|
8838
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder} OutputBuilder instance
|
8839
|
+
*/
|
8840
|
+
OutputBuilder.create = function create(properties) {
|
8841
|
+
return new OutputBuilder(properties);
|
8842
|
+
};
|
8843
|
+
|
8844
|
+
/**
|
8845
|
+
* Encodes the specified OutputBuilder message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.verify|verify} messages.
|
8846
|
+
* @function encode
|
8847
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8848
|
+
* @static
|
8849
|
+
* @param {TW.BabylonStaking.Proto.IOutputBuilder} message OutputBuilder message or plain object to encode
|
8850
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
8851
|
+
* @returns {$protobuf.Writer} Writer
|
8852
|
+
*/
|
8853
|
+
OutputBuilder.encode = function encode(message, writer) {
|
8854
|
+
if (!writer)
|
8855
|
+
writer = $Writer.create();
|
8856
|
+
return writer;
|
8857
|
+
};
|
8858
|
+
|
8859
|
+
/**
|
8860
|
+
* Decodes an OutputBuilder message from the specified reader or buffer.
|
8861
|
+
* @function decode
|
8862
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8863
|
+
* @static
|
8864
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8865
|
+
* @param {number} [length] Message length if known beforehand
|
8866
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder} OutputBuilder
|
8867
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
8868
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8869
|
+
*/
|
8870
|
+
OutputBuilder.decode = function decode(reader, length) {
|
8871
|
+
if (!(reader instanceof $Reader))
|
8872
|
+
reader = $Reader.create(reader);
|
8873
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder();
|
8874
|
+
while (reader.pos < end) {
|
8875
|
+
var tag = reader.uint32();
|
8876
|
+
switch (tag >>> 3) {
|
8877
|
+
default:
|
8878
|
+
reader.skipType(tag & 7);
|
8879
|
+
break;
|
8880
|
+
}
|
8881
|
+
}
|
8882
|
+
return message;
|
8883
|
+
};
|
8884
|
+
|
8885
|
+
/**
|
8886
|
+
* Verifies an OutputBuilder message.
|
8887
|
+
* @function verify
|
8888
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8889
|
+
* @static
|
8890
|
+
* @param {Object.<string,*>} message Plain object to verify
|
8891
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8892
|
+
*/
|
8893
|
+
OutputBuilder.verify = function verify(message) {
|
8894
|
+
if (typeof message !== "object" || message === null)
|
8895
|
+
return "object expected";
|
8896
|
+
return null;
|
8897
|
+
};
|
8898
|
+
|
8899
|
+
/**
|
8900
|
+
* Creates an OutputBuilder message from a plain object. Also converts values to their respective internal types.
|
8901
|
+
* @function fromObject
|
8902
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8903
|
+
* @static
|
8904
|
+
* @param {Object.<string,*>} object Plain object
|
8905
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder} OutputBuilder
|
8906
|
+
*/
|
8907
|
+
OutputBuilder.fromObject = function fromObject(object) {
|
8908
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder)
|
8909
|
+
return object;
|
8910
|
+
return new $root.TW.BabylonStaking.Proto.OutputBuilder();
|
8911
|
+
};
|
8912
|
+
|
8913
|
+
/**
|
8914
|
+
* Creates a plain object from an OutputBuilder message. Also converts values to other types if specified.
|
8915
|
+
* @function toObject
|
8916
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8917
|
+
* @static
|
8918
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder} message OutputBuilder
|
8919
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
8920
|
+
* @returns {Object.<string,*>} Plain object
|
8921
|
+
*/
|
8922
|
+
OutputBuilder.toObject = function toObject() {
|
8923
|
+
return {};
|
8924
|
+
};
|
8925
|
+
|
8926
|
+
/**
|
8927
|
+
* Converts this OutputBuilder to JSON.
|
8928
|
+
* @function toJSON
|
8929
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8930
|
+
* @instance
|
8931
|
+
* @returns {Object.<string,*>} JSON object
|
8932
|
+
*/
|
8933
|
+
OutputBuilder.prototype.toJSON = function toJSON() {
|
8934
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8935
|
+
};
|
8936
|
+
|
8937
|
+
OutputBuilder.StakingOutput = (function() {
|
8938
|
+
|
8939
|
+
/**
|
8940
|
+
* Properties of a StakingOutput.
|
8941
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8942
|
+
* @interface IStakingOutput
|
8943
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] StakingOutput params
|
8944
|
+
*/
|
8945
|
+
|
8946
|
+
/**
|
8947
|
+
* Constructs a new StakingOutput.
|
8948
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
8949
|
+
* @classdesc Represents a StakingOutput.
|
8950
|
+
* @implements IStakingOutput
|
8951
|
+
* @constructor
|
8952
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput=} [properties] Properties to set
|
8953
|
+
*/
|
8954
|
+
function StakingOutput(properties) {
|
8955
|
+
if (properties)
|
8956
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8957
|
+
if (properties[keys[i]] != null)
|
8958
|
+
this[keys[i]] = properties[keys[i]];
|
8959
|
+
}
|
8960
|
+
|
8961
|
+
/**
|
8962
|
+
* StakingOutput params.
|
8963
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
8964
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
8965
|
+
* @instance
|
8966
|
+
*/
|
8967
|
+
StakingOutput.prototype.params = null;
|
8968
|
+
|
8969
|
+
/**
|
8970
|
+
* Creates a new StakingOutput instance using the specified properties.
|
8971
|
+
* @function create
|
8972
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
8973
|
+
* @static
|
8974
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput=} [properties] Properties to set
|
8975
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} StakingOutput instance
|
8976
|
+
*/
|
8977
|
+
StakingOutput.create = function create(properties) {
|
8978
|
+
return new StakingOutput(properties);
|
8979
|
+
};
|
8980
|
+
|
8981
|
+
/**
|
8982
|
+
* Encodes the specified StakingOutput message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.verify|verify} messages.
|
8983
|
+
* @function encode
|
8984
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
8985
|
+
* @static
|
8986
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput} message StakingOutput message or plain object to encode
|
8987
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
8988
|
+
* @returns {$protobuf.Writer} Writer
|
8989
|
+
*/
|
8990
|
+
StakingOutput.encode = function encode(message, writer) {
|
8991
|
+
if (!writer)
|
8992
|
+
writer = $Writer.create();
|
8993
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
8994
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8995
|
+
return writer;
|
8996
|
+
};
|
8997
|
+
|
8998
|
+
/**
|
8999
|
+
* Decodes a StakingOutput message from the specified reader or buffer.
|
9000
|
+
* @function decode
|
9001
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
9002
|
+
* @static
|
9003
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9004
|
+
* @param {number} [length] Message length if known beforehand
|
9005
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} StakingOutput
|
9006
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
9007
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9008
|
+
*/
|
9009
|
+
StakingOutput.decode = function decode(reader, length) {
|
9010
|
+
if (!(reader instanceof $Reader))
|
9011
|
+
reader = $Reader.create(reader);
|
9012
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput();
|
9013
|
+
while (reader.pos < end) {
|
9014
|
+
var tag = reader.uint32();
|
9015
|
+
switch (tag >>> 3) {
|
9016
|
+
case 1:
|
9017
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
9018
|
+
break;
|
9019
|
+
default:
|
9020
|
+
reader.skipType(tag & 7);
|
9021
|
+
break;
|
9022
|
+
}
|
9023
|
+
}
|
9024
|
+
return message;
|
9025
|
+
};
|
9026
|
+
|
9027
|
+
/**
|
9028
|
+
* Verifies a StakingOutput message.
|
9029
|
+
* @function verify
|
9030
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
9031
|
+
* @static
|
9032
|
+
* @param {Object.<string,*>} message Plain object to verify
|
9033
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9034
|
+
*/
|
9035
|
+
StakingOutput.verify = function verify(message) {
|
9036
|
+
if (typeof message !== "object" || message === null)
|
9037
|
+
return "object expected";
|
9038
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
9039
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
9040
|
+
if (error)
|
9041
|
+
return "params." + error;
|
9042
|
+
}
|
9043
|
+
return null;
|
9044
|
+
};
|
9045
|
+
|
9046
|
+
/**
|
9047
|
+
* Creates a StakingOutput message from a plain object. Also converts values to their respective internal types.
|
9048
|
+
* @function fromObject
|
9049
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
9050
|
+
* @static
|
9051
|
+
* @param {Object.<string,*>} object Plain object
|
9052
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} StakingOutput
|
9053
|
+
*/
|
9054
|
+
StakingOutput.fromObject = function fromObject(object) {
|
9055
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput)
|
9056
|
+
return object;
|
9057
|
+
var message = new $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput();
|
9058
|
+
if (object.params != null) {
|
9059
|
+
if (typeof object.params !== "object")
|
9060
|
+
throw TypeError(".TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.params: object expected");
|
9061
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
9062
|
+
}
|
9063
|
+
return message;
|
9064
|
+
};
|
9065
|
+
|
9066
|
+
/**
|
9067
|
+
* Creates a plain object from a StakingOutput message. Also converts values to other types if specified.
|
9068
|
+
* @function toObject
|
9069
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
9070
|
+
* @static
|
9071
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.StakingOutput} message StakingOutput
|
9072
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
9073
|
+
* @returns {Object.<string,*>} Plain object
|
9074
|
+
*/
|
9075
|
+
StakingOutput.toObject = function toObject(message, options) {
|
9076
|
+
if (!options)
|
9077
|
+
options = {};
|
9078
|
+
var object = {};
|
9079
|
+
if (options.defaults)
|
9080
|
+
object.params = null;
|
9081
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
9082
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
9083
|
+
return object;
|
9084
|
+
};
|
9085
|
+
|
9086
|
+
/**
|
9087
|
+
* Converts this StakingOutput to JSON.
|
9088
|
+
* @function toJSON
|
9089
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.StakingOutput
|
9090
|
+
* @instance
|
9091
|
+
* @returns {Object.<string,*>} JSON object
|
9092
|
+
*/
|
9093
|
+
StakingOutput.prototype.toJSON = function toJSON() {
|
9094
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9095
|
+
};
|
9096
|
+
|
9097
|
+
return StakingOutput;
|
9098
|
+
})();
|
9099
|
+
|
9100
|
+
OutputBuilder.UnbondingOutput = (function() {
|
9101
|
+
|
9102
|
+
/**
|
9103
|
+
* Properties of an UnbondingOutput.
|
9104
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
9105
|
+
* @interface IUnbondingOutput
|
9106
|
+
* @property {TW.BabylonStaking.Proto.IStakingInfo|null} [params] UnbondingOutput params
|
9107
|
+
*/
|
9108
|
+
|
9109
|
+
/**
|
9110
|
+
* Constructs a new UnbondingOutput.
|
9111
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
9112
|
+
* @classdesc Represents an UnbondingOutput.
|
9113
|
+
* @implements IUnbondingOutput
|
9114
|
+
* @constructor
|
9115
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput=} [properties] Properties to set
|
9116
|
+
*/
|
9117
|
+
function UnbondingOutput(properties) {
|
9118
|
+
if (properties)
|
9119
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9120
|
+
if (properties[keys[i]] != null)
|
9121
|
+
this[keys[i]] = properties[keys[i]];
|
9122
|
+
}
|
9123
|
+
|
9124
|
+
/**
|
9125
|
+
* UnbondingOutput params.
|
9126
|
+
* @member {TW.BabylonStaking.Proto.IStakingInfo|null|undefined} params
|
9127
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9128
|
+
* @instance
|
9129
|
+
*/
|
9130
|
+
UnbondingOutput.prototype.params = null;
|
9131
|
+
|
9132
|
+
/**
|
9133
|
+
* Creates a new UnbondingOutput instance using the specified properties.
|
9134
|
+
* @function create
|
9135
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9136
|
+
* @static
|
9137
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput=} [properties] Properties to set
|
9138
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} UnbondingOutput instance
|
9139
|
+
*/
|
9140
|
+
UnbondingOutput.create = function create(properties) {
|
9141
|
+
return new UnbondingOutput(properties);
|
9142
|
+
};
|
9143
|
+
|
9144
|
+
/**
|
9145
|
+
* Encodes the specified UnbondingOutput message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.verify|verify} messages.
|
9146
|
+
* @function encode
|
9147
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9148
|
+
* @static
|
9149
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput} message UnbondingOutput message or plain object to encode
|
9150
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
9151
|
+
* @returns {$protobuf.Writer} Writer
|
9152
|
+
*/
|
9153
|
+
UnbondingOutput.encode = function encode(message, writer) {
|
9154
|
+
if (!writer)
|
9155
|
+
writer = $Writer.create();
|
9156
|
+
if (message.params != null && Object.hasOwnProperty.call(message, "params"))
|
9157
|
+
$root.TW.BabylonStaking.Proto.StakingInfo.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
9158
|
+
return writer;
|
9159
|
+
};
|
9160
|
+
|
9161
|
+
/**
|
9162
|
+
* Decodes an UnbondingOutput message from the specified reader or buffer.
|
9163
|
+
* @function decode
|
9164
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9165
|
+
* @static
|
9166
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9167
|
+
* @param {number} [length] Message length if known beforehand
|
9168
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} UnbondingOutput
|
9169
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
9170
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9171
|
+
*/
|
9172
|
+
UnbondingOutput.decode = function decode(reader, length) {
|
9173
|
+
if (!(reader instanceof $Reader))
|
9174
|
+
reader = $Reader.create(reader);
|
9175
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput();
|
9176
|
+
while (reader.pos < end) {
|
9177
|
+
var tag = reader.uint32();
|
9178
|
+
switch (tag >>> 3) {
|
9179
|
+
case 1:
|
9180
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.decode(reader, reader.uint32());
|
9181
|
+
break;
|
9182
|
+
default:
|
9183
|
+
reader.skipType(tag & 7);
|
9184
|
+
break;
|
9185
|
+
}
|
9186
|
+
}
|
9187
|
+
return message;
|
9188
|
+
};
|
9189
|
+
|
9190
|
+
/**
|
9191
|
+
* Verifies an UnbondingOutput message.
|
9192
|
+
* @function verify
|
9193
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9194
|
+
* @static
|
9195
|
+
* @param {Object.<string,*>} message Plain object to verify
|
9196
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9197
|
+
*/
|
9198
|
+
UnbondingOutput.verify = function verify(message) {
|
9199
|
+
if (typeof message !== "object" || message === null)
|
9200
|
+
return "object expected";
|
9201
|
+
if (message.params != null && message.hasOwnProperty("params")) {
|
9202
|
+
var error = $root.TW.BabylonStaking.Proto.StakingInfo.verify(message.params);
|
9203
|
+
if (error)
|
9204
|
+
return "params." + error;
|
9205
|
+
}
|
9206
|
+
return null;
|
9207
|
+
};
|
9208
|
+
|
9209
|
+
/**
|
9210
|
+
* Creates an UnbondingOutput message from a plain object. Also converts values to their respective internal types.
|
9211
|
+
* @function fromObject
|
9212
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9213
|
+
* @static
|
9214
|
+
* @param {Object.<string,*>} object Plain object
|
9215
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} UnbondingOutput
|
9216
|
+
*/
|
9217
|
+
UnbondingOutput.fromObject = function fromObject(object) {
|
9218
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput)
|
9219
|
+
return object;
|
9220
|
+
var message = new $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput();
|
9221
|
+
if (object.params != null) {
|
9222
|
+
if (typeof object.params !== "object")
|
9223
|
+
throw TypeError(".TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.params: object expected");
|
9224
|
+
message.params = $root.TW.BabylonStaking.Proto.StakingInfo.fromObject(object.params);
|
9225
|
+
}
|
9226
|
+
return message;
|
9227
|
+
};
|
9228
|
+
|
9229
|
+
/**
|
9230
|
+
* Creates a plain object from an UnbondingOutput message. Also converts values to other types if specified.
|
9231
|
+
* @function toObject
|
9232
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9233
|
+
* @static
|
9234
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput} message UnbondingOutput
|
9235
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
9236
|
+
* @returns {Object.<string,*>} Plain object
|
9237
|
+
*/
|
9238
|
+
UnbondingOutput.toObject = function toObject(message, options) {
|
9239
|
+
if (!options)
|
9240
|
+
options = {};
|
9241
|
+
var object = {};
|
9242
|
+
if (options.defaults)
|
9243
|
+
object.params = null;
|
9244
|
+
if (message.params != null && message.hasOwnProperty("params"))
|
9245
|
+
object.params = $root.TW.BabylonStaking.Proto.StakingInfo.toObject(message.params, options);
|
9246
|
+
return object;
|
9247
|
+
};
|
9248
|
+
|
9249
|
+
/**
|
9250
|
+
* Converts this UnbondingOutput to JSON.
|
9251
|
+
* @function toJSON
|
9252
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput
|
9253
|
+
* @instance
|
9254
|
+
* @returns {Object.<string,*>} JSON object
|
9255
|
+
*/
|
9256
|
+
UnbondingOutput.prototype.toJSON = function toJSON() {
|
9257
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9258
|
+
};
|
9259
|
+
|
9260
|
+
return UnbondingOutput;
|
9261
|
+
})();
|
9262
|
+
|
9263
|
+
OutputBuilder.OpReturn = (function() {
|
9264
|
+
|
9265
|
+
/**
|
9266
|
+
* Properties of an OpReturn.
|
9267
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
9268
|
+
* @interface IOpReturn
|
9269
|
+
* @property {Uint8Array|null} [tag] OpReturn tag
|
9270
|
+
* @property {Uint8Array|null} [stakerPublicKey] OpReturn stakerPublicKey
|
9271
|
+
* @property {Uint8Array|null} [finalityProviderPublicKey] OpReturn finalityProviderPublicKey
|
9272
|
+
* @property {number|null} [stakingTime] OpReturn stakingTime
|
9273
|
+
*/
|
9274
|
+
|
9275
|
+
/**
|
9276
|
+
* Constructs a new OpReturn.
|
9277
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder
|
9278
|
+
* @classdesc Represents an OpReturn.
|
9279
|
+
* @implements IOpReturn
|
9280
|
+
* @constructor
|
9281
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn=} [properties] Properties to set
|
9282
|
+
*/
|
9283
|
+
function OpReturn(properties) {
|
9284
|
+
if (properties)
|
9285
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9286
|
+
if (properties[keys[i]] != null)
|
9287
|
+
this[keys[i]] = properties[keys[i]];
|
9288
|
+
}
|
9289
|
+
|
9290
|
+
/**
|
9291
|
+
* OpReturn tag.
|
9292
|
+
* @member {Uint8Array} tag
|
9293
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9294
|
+
* @instance
|
9295
|
+
*/
|
9296
|
+
OpReturn.prototype.tag = $util.newBuffer([]);
|
9297
|
+
|
9298
|
+
/**
|
9299
|
+
* OpReturn stakerPublicKey.
|
9300
|
+
* @member {Uint8Array} stakerPublicKey
|
9301
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9302
|
+
* @instance
|
9303
|
+
*/
|
9304
|
+
OpReturn.prototype.stakerPublicKey = $util.newBuffer([]);
|
9305
|
+
|
9306
|
+
/**
|
9307
|
+
* OpReturn finalityProviderPublicKey.
|
9308
|
+
* @member {Uint8Array} finalityProviderPublicKey
|
9309
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9310
|
+
* @instance
|
9311
|
+
*/
|
9312
|
+
OpReturn.prototype.finalityProviderPublicKey = $util.newBuffer([]);
|
9313
|
+
|
9314
|
+
/**
|
9315
|
+
* OpReturn stakingTime.
|
9316
|
+
* @member {number} stakingTime
|
9317
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9318
|
+
* @instance
|
9319
|
+
*/
|
9320
|
+
OpReturn.prototype.stakingTime = 0;
|
9321
|
+
|
9322
|
+
/**
|
9323
|
+
* Creates a new OpReturn instance using the specified properties.
|
9324
|
+
* @function create
|
9325
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9326
|
+
* @static
|
9327
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn=} [properties] Properties to set
|
9328
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} OpReturn instance
|
9329
|
+
*/
|
9330
|
+
OpReturn.create = function create(properties) {
|
9331
|
+
return new OpReturn(properties);
|
9332
|
+
};
|
9333
|
+
|
9334
|
+
/**
|
9335
|
+
* Encodes the specified OpReturn message. Does not implicitly {@link TW.BabylonStaking.Proto.OutputBuilder.OpReturn.verify|verify} messages.
|
9336
|
+
* @function encode
|
9337
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9338
|
+
* @static
|
9339
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn} message OpReturn message or plain object to encode
|
9340
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
9341
|
+
* @returns {$protobuf.Writer} Writer
|
9342
|
+
*/
|
9343
|
+
OpReturn.encode = function encode(message, writer) {
|
9344
|
+
if (!writer)
|
9345
|
+
writer = $Writer.create();
|
9346
|
+
if (message.tag != null && Object.hasOwnProperty.call(message, "tag"))
|
9347
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tag);
|
9348
|
+
if (message.stakerPublicKey != null && Object.hasOwnProperty.call(message, "stakerPublicKey"))
|
9349
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stakerPublicKey);
|
9350
|
+
if (message.finalityProviderPublicKey != null && Object.hasOwnProperty.call(message, "finalityProviderPublicKey"))
|
9351
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.finalityProviderPublicKey);
|
9352
|
+
if (message.stakingTime != null && Object.hasOwnProperty.call(message, "stakingTime"))
|
9353
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stakingTime);
|
9354
|
+
return writer;
|
9355
|
+
};
|
9356
|
+
|
9357
|
+
/**
|
9358
|
+
* Decodes an OpReturn message from the specified reader or buffer.
|
9359
|
+
* @function decode
|
9360
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9361
|
+
* @static
|
9362
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9363
|
+
* @param {number} [length] Message length if known beforehand
|
9364
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} OpReturn
|
9365
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
9366
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9367
|
+
*/
|
9368
|
+
OpReturn.decode = function decode(reader, length) {
|
9369
|
+
if (!(reader instanceof $Reader))
|
9370
|
+
reader = $Reader.create(reader);
|
9371
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn();
|
9372
|
+
while (reader.pos < end) {
|
9373
|
+
var tag = reader.uint32();
|
9374
|
+
switch (tag >>> 3) {
|
9375
|
+
case 1:
|
9376
|
+
message.tag = reader.bytes();
|
9377
|
+
break;
|
9378
|
+
case 2:
|
9379
|
+
message.stakerPublicKey = reader.bytes();
|
9380
|
+
break;
|
9381
|
+
case 3:
|
9382
|
+
message.finalityProviderPublicKey = reader.bytes();
|
9383
|
+
break;
|
9384
|
+
case 4:
|
9385
|
+
message.stakingTime = reader.uint32();
|
9386
|
+
break;
|
9387
|
+
default:
|
9388
|
+
reader.skipType(tag & 7);
|
9389
|
+
break;
|
9390
|
+
}
|
9391
|
+
}
|
9392
|
+
return message;
|
9393
|
+
};
|
9394
|
+
|
9395
|
+
/**
|
9396
|
+
* Verifies an OpReturn message.
|
9397
|
+
* @function verify
|
9398
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9399
|
+
* @static
|
9400
|
+
* @param {Object.<string,*>} message Plain object to verify
|
9401
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9402
|
+
*/
|
9403
|
+
OpReturn.verify = function verify(message) {
|
9404
|
+
if (typeof message !== "object" || message === null)
|
9405
|
+
return "object expected";
|
9406
|
+
if (message.tag != null && message.hasOwnProperty("tag"))
|
9407
|
+
if (!(message.tag && typeof message.tag.length === "number" || $util.isString(message.tag)))
|
9408
|
+
return "tag: buffer expected";
|
9409
|
+
if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
|
9410
|
+
if (!(message.stakerPublicKey && typeof message.stakerPublicKey.length === "number" || $util.isString(message.stakerPublicKey)))
|
9411
|
+
return "stakerPublicKey: buffer expected";
|
9412
|
+
if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
|
9413
|
+
if (!(message.finalityProviderPublicKey && typeof message.finalityProviderPublicKey.length === "number" || $util.isString(message.finalityProviderPublicKey)))
|
9414
|
+
return "finalityProviderPublicKey: buffer expected";
|
9415
|
+
if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
|
9416
|
+
if (!$util.isInteger(message.stakingTime))
|
9417
|
+
return "stakingTime: integer expected";
|
9418
|
+
return null;
|
9419
|
+
};
|
9420
|
+
|
9421
|
+
/**
|
9422
|
+
* Creates an OpReturn message from a plain object. Also converts values to their respective internal types.
|
9423
|
+
* @function fromObject
|
9424
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9425
|
+
* @static
|
9426
|
+
* @param {Object.<string,*>} object Plain object
|
9427
|
+
* @returns {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} OpReturn
|
9428
|
+
*/
|
9429
|
+
OpReturn.fromObject = function fromObject(object) {
|
9430
|
+
if (object instanceof $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn)
|
9431
|
+
return object;
|
9432
|
+
var message = new $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn();
|
9433
|
+
if (object.tag != null)
|
9434
|
+
if (typeof object.tag === "string")
|
9435
|
+
$util.base64.decode(object.tag, message.tag = $util.newBuffer($util.base64.length(object.tag)), 0);
|
9436
|
+
else if (object.tag.length)
|
9437
|
+
message.tag = object.tag;
|
9438
|
+
if (object.stakerPublicKey != null)
|
9439
|
+
if (typeof object.stakerPublicKey === "string")
|
9440
|
+
$util.base64.decode(object.stakerPublicKey, message.stakerPublicKey = $util.newBuffer($util.base64.length(object.stakerPublicKey)), 0);
|
9441
|
+
else if (object.stakerPublicKey.length)
|
9442
|
+
message.stakerPublicKey = object.stakerPublicKey;
|
9443
|
+
if (object.finalityProviderPublicKey != null)
|
9444
|
+
if (typeof object.finalityProviderPublicKey === "string")
|
9445
|
+
$util.base64.decode(object.finalityProviderPublicKey, message.finalityProviderPublicKey = $util.newBuffer($util.base64.length(object.finalityProviderPublicKey)), 0);
|
9446
|
+
else if (object.finalityProviderPublicKey.length)
|
9447
|
+
message.finalityProviderPublicKey = object.finalityProviderPublicKey;
|
9448
|
+
if (object.stakingTime != null)
|
9449
|
+
message.stakingTime = object.stakingTime >>> 0;
|
9450
|
+
return message;
|
9451
|
+
};
|
9452
|
+
|
9453
|
+
/**
|
9454
|
+
* Creates a plain object from an OpReturn message. Also converts values to other types if specified.
|
9455
|
+
* @function toObject
|
9456
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9457
|
+
* @static
|
9458
|
+
* @param {TW.BabylonStaking.Proto.OutputBuilder.OpReturn} message OpReturn
|
9459
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
9460
|
+
* @returns {Object.<string,*>} Plain object
|
9461
|
+
*/
|
9462
|
+
OpReturn.toObject = function toObject(message, options) {
|
9463
|
+
if (!options)
|
9464
|
+
options = {};
|
9465
|
+
var object = {};
|
9466
|
+
if (options.defaults) {
|
9467
|
+
if (options.bytes === String)
|
9468
|
+
object.tag = "";
|
9469
|
+
else {
|
9470
|
+
object.tag = [];
|
9471
|
+
if (options.bytes !== Array)
|
9472
|
+
object.tag = $util.newBuffer(object.tag);
|
9473
|
+
}
|
9474
|
+
if (options.bytes === String)
|
9475
|
+
object.stakerPublicKey = "";
|
9476
|
+
else {
|
9477
|
+
object.stakerPublicKey = [];
|
9478
|
+
if (options.bytes !== Array)
|
9479
|
+
object.stakerPublicKey = $util.newBuffer(object.stakerPublicKey);
|
9480
|
+
}
|
9481
|
+
if (options.bytes === String)
|
9482
|
+
object.finalityProviderPublicKey = "";
|
9483
|
+
else {
|
9484
|
+
object.finalityProviderPublicKey = [];
|
9485
|
+
if (options.bytes !== Array)
|
9486
|
+
object.finalityProviderPublicKey = $util.newBuffer(object.finalityProviderPublicKey);
|
9487
|
+
}
|
9488
|
+
object.stakingTime = 0;
|
9489
|
+
}
|
9490
|
+
if (message.tag != null && message.hasOwnProperty("tag"))
|
9491
|
+
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;
|
9492
|
+
if (message.stakerPublicKey != null && message.hasOwnProperty("stakerPublicKey"))
|
9493
|
+
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;
|
9494
|
+
if (message.finalityProviderPublicKey != null && message.hasOwnProperty("finalityProviderPublicKey"))
|
9495
|
+
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;
|
9496
|
+
if (message.stakingTime != null && message.hasOwnProperty("stakingTime"))
|
9497
|
+
object.stakingTime = message.stakingTime;
|
9498
|
+
return object;
|
9499
|
+
};
|
9500
|
+
|
9501
|
+
/**
|
9502
|
+
* Converts this OpReturn to JSON.
|
9503
|
+
* @function toJSON
|
9504
|
+
* @memberof TW.BabylonStaking.Proto.OutputBuilder.OpReturn
|
9505
|
+
* @instance
|
9506
|
+
* @returns {Object.<string,*>} JSON object
|
9507
|
+
*/
|
9508
|
+
OpReturn.prototype.toJSON = function toJSON() {
|
9509
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9510
|
+
};
|
9511
|
+
|
9512
|
+
return OpReturn;
|
9513
|
+
})();
|
9514
|
+
|
9515
|
+
return OutputBuilder;
|
9516
|
+
})();
|
9517
|
+
|
9518
|
+
return Proto;
|
9519
|
+
})();
|
9520
|
+
|
9521
|
+
return BabylonStaking;
|
9522
|
+
})();
|
9523
|
+
|
7261
9524
|
TW.Barz = (function() {
|
7262
9525
|
|
7263
9526
|
/**
|
@@ -17635,6 +19898,7 @@
|
|
17635
19898
|
* @property {boolean|null} [useMaxUtxo] SigningInput useMaxUtxo
|
17636
19899
|
* @property {boolean|null} [disableDustFilter] SigningInput disableDustFilter
|
17637
19900
|
* @property {number|null} [time] SigningInput time
|
19901
|
+
* @property {boolean|null} [zip_0317] SigningInput zip_0317
|
17638
19902
|
* @property {TW.BitcoinV2.Proto.ISigningInput|null} [signingV2] SigningInput signingV2
|
17639
19903
|
* @property {Long|null} [fixedDustThreshold] SigningInput fixedDustThreshold
|
17640
19904
|
*/
|
@@ -17802,6 +20066,14 @@
|
|
17802
20066
|
*/
|
17803
20067
|
SigningInput.prototype.time = 0;
|
17804
20068
|
|
20069
|
+
/**
|
20070
|
+
* SigningInput zip_0317.
|
20071
|
+
* @member {boolean} zip_0317
|
20072
|
+
* @memberof TW.Bitcoin.Proto.SigningInput
|
20073
|
+
* @instance
|
20074
|
+
*/
|
20075
|
+
SigningInput.prototype.zip_0317 = false;
|
20076
|
+
|
17805
20077
|
/**
|
17806
20078
|
* SigningInput signingV2.
|
17807
20079
|
* @member {TW.BitcoinV2.Proto.ISigningInput|null|undefined} signingV2
|
@@ -17894,6 +20166,8 @@
|
|
17894
20166
|
writer.uint32(/* id 16, wireType 0 =*/128).bool(message.disableDustFilter);
|
17895
20167
|
if (message.time != null && Object.hasOwnProperty.call(message, "time"))
|
17896
20168
|
writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.time);
|
20169
|
+
if (message.zip_0317 != null && Object.hasOwnProperty.call(message, "zip_0317"))
|
20170
|
+
writer.uint32(/* id 18, wireType 0 =*/144).bool(message.zip_0317);
|
17897
20171
|
if (message.signingV2 != null && Object.hasOwnProperty.call(message, "signingV2"))
|
17898
20172
|
$root.TW.BitcoinV2.Proto.SigningInput.encode(message.signingV2, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
|
17899
20173
|
if (message.fixedDustThreshold != null && Object.hasOwnProperty.call(message, "fixedDustThreshold"))
|
@@ -18000,6 +20274,9 @@
|
|
18000
20274
|
case 17:
|
18001
20275
|
message.time = reader.uint32();
|
18002
20276
|
break;
|
20277
|
+
case 18:
|
20278
|
+
message.zip_0317 = reader.bool();
|
20279
|
+
break;
|
18003
20280
|
case 21:
|
18004
20281
|
message.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.decode(reader, reader.uint32());
|
18005
20282
|
break;
|
@@ -18105,6 +20382,9 @@
|
|
18105
20382
|
if (message.time != null && message.hasOwnProperty("time"))
|
18106
20383
|
if (!$util.isInteger(message.time))
|
18107
20384
|
return "time: integer expected";
|
20385
|
+
if (message.zip_0317 != null && message.hasOwnProperty("zip_0317"))
|
20386
|
+
if (typeof message.zip_0317 !== "boolean")
|
20387
|
+
return "zip_0317: boolean expected";
|
18108
20388
|
if (message.signingV2 != null && message.hasOwnProperty("signingV2")) {
|
18109
20389
|
var error = $root.TW.BitcoinV2.Proto.SigningInput.verify(message.signingV2);
|
18110
20390
|
if (error)
|
@@ -18221,6 +20501,8 @@
|
|
18221
20501
|
message.disableDustFilter = Boolean(object.disableDustFilter);
|
18222
20502
|
if (object.time != null)
|
18223
20503
|
message.time = object.time >>> 0;
|
20504
|
+
if (object.zip_0317 != null)
|
20505
|
+
message.zip_0317 = Boolean(object.zip_0317);
|
18224
20506
|
if (object.signingV2 != null) {
|
18225
20507
|
if (typeof object.signingV2 !== "object")
|
18226
20508
|
throw TypeError(".TW.Bitcoin.Proto.SigningInput.signingV2: object expected");
|
@@ -18286,6 +20568,7 @@
|
|
18286
20568
|
object.useMaxUtxo = false;
|
18287
20569
|
object.disableDustFilter = false;
|
18288
20570
|
object.time = 0;
|
20571
|
+
object.zip_0317 = false;
|
18289
20572
|
object.signingV2 = null;
|
18290
20573
|
object.outputOpReturnIndex = null;
|
18291
20574
|
}
|
@@ -18342,6 +20625,8 @@
|
|
18342
20625
|
object.disableDustFilter = message.disableDustFilter;
|
18343
20626
|
if (message.time != null && message.hasOwnProperty("time"))
|
18344
20627
|
object.time = message.time;
|
20628
|
+
if (message.zip_0317 != null && message.hasOwnProperty("zip_0317"))
|
20629
|
+
object.zip_0317 = message.zip_0317;
|
18345
20630
|
if (message.signingV2 != null && message.hasOwnProperty("signingV2"))
|
18346
20631
|
object.signingV2 = $root.TW.BitcoinV2.Proto.SigningInput.toObject(message.signingV2, options);
|
18347
20632
|
if (message.fixedDustThreshold != null && message.hasOwnProperty("fixedDustThreshold")) {
|
@@ -20115,81 +22400,277 @@
|
|
20115
22400
|
PublicKeyOrHash.prototype.pubkey = null;
|
20116
22401
|
|
20117
22402
|
/**
|
20118
|
-
* PublicKeyOrHash hash.
|
20119
|
-
* @member {Uint8Array|null|undefined} hash
|
20120
|
-
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22403
|
+
* PublicKeyOrHash hash.
|
22404
|
+
* @member {Uint8Array|null|undefined} hash
|
22405
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22406
|
+
* @instance
|
22407
|
+
*/
|
22408
|
+
PublicKeyOrHash.prototype.hash = null;
|
22409
|
+
|
22410
|
+
// OneOf field names bound to virtual getters and setters
|
22411
|
+
var $oneOfFields;
|
22412
|
+
|
22413
|
+
/**
|
22414
|
+
* PublicKeyOrHash variant.
|
22415
|
+
* @member {"pubkey"|"hash"|undefined} variant
|
22416
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22417
|
+
* @instance
|
22418
|
+
*/
|
22419
|
+
Object.defineProperty(PublicKeyOrHash.prototype, "variant", {
|
22420
|
+
get: $util.oneOfGetter($oneOfFields = ["pubkey", "hash"]),
|
22421
|
+
set: $util.oneOfSetter($oneOfFields)
|
22422
|
+
});
|
22423
|
+
|
22424
|
+
/**
|
22425
|
+
* Creates a new PublicKeyOrHash instance using the specified properties.
|
22426
|
+
* @function create
|
22427
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22428
|
+
* @static
|
22429
|
+
* @param {TW.BitcoinV2.Proto.IPublicKeyOrHash=} [properties] Properties to set
|
22430
|
+
* @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash instance
|
22431
|
+
*/
|
22432
|
+
PublicKeyOrHash.create = function create(properties) {
|
22433
|
+
return new PublicKeyOrHash(properties);
|
22434
|
+
};
|
22435
|
+
|
22436
|
+
/**
|
22437
|
+
* Encodes the specified PublicKeyOrHash message. Does not implicitly {@link TW.BitcoinV2.Proto.PublicKeyOrHash.verify|verify} messages.
|
22438
|
+
* @function encode
|
22439
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22440
|
+
* @static
|
22441
|
+
* @param {TW.BitcoinV2.Proto.IPublicKeyOrHash} message PublicKeyOrHash message or plain object to encode
|
22442
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
22443
|
+
* @returns {$protobuf.Writer} Writer
|
22444
|
+
*/
|
22445
|
+
PublicKeyOrHash.encode = function encode(message, writer) {
|
22446
|
+
if (!writer)
|
22447
|
+
writer = $Writer.create();
|
22448
|
+
if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey"))
|
22449
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.pubkey);
|
22450
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
22451
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
|
22452
|
+
return writer;
|
22453
|
+
};
|
22454
|
+
|
22455
|
+
/**
|
22456
|
+
* Decodes a PublicKeyOrHash message from the specified reader or buffer.
|
22457
|
+
* @function decode
|
22458
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22459
|
+
* @static
|
22460
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
22461
|
+
* @param {number} [length] Message length if known beforehand
|
22462
|
+
* @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash
|
22463
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
22464
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
22465
|
+
*/
|
22466
|
+
PublicKeyOrHash.decode = function decode(reader, length) {
|
22467
|
+
if (!(reader instanceof $Reader))
|
22468
|
+
reader = $Reader.create(reader);
|
22469
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BitcoinV2.Proto.PublicKeyOrHash();
|
22470
|
+
while (reader.pos < end) {
|
22471
|
+
var tag = reader.uint32();
|
22472
|
+
switch (tag >>> 3) {
|
22473
|
+
case 1:
|
22474
|
+
message.pubkey = reader.bytes();
|
22475
|
+
break;
|
22476
|
+
case 2:
|
22477
|
+
message.hash = reader.bytes();
|
22478
|
+
break;
|
22479
|
+
default:
|
22480
|
+
reader.skipType(tag & 7);
|
22481
|
+
break;
|
22482
|
+
}
|
22483
|
+
}
|
22484
|
+
return message;
|
22485
|
+
};
|
22486
|
+
|
22487
|
+
/**
|
22488
|
+
* Verifies a PublicKeyOrHash message.
|
22489
|
+
* @function verify
|
22490
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22491
|
+
* @static
|
22492
|
+
* @param {Object.<string,*>} message Plain object to verify
|
22493
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
22494
|
+
*/
|
22495
|
+
PublicKeyOrHash.verify = function verify(message) {
|
22496
|
+
if (typeof message !== "object" || message === null)
|
22497
|
+
return "object expected";
|
22498
|
+
var properties = {};
|
22499
|
+
if (message.pubkey != null && message.hasOwnProperty("pubkey")) {
|
22500
|
+
properties.variant = 1;
|
22501
|
+
if (!(message.pubkey && typeof message.pubkey.length === "number" || $util.isString(message.pubkey)))
|
22502
|
+
return "pubkey: buffer expected";
|
22503
|
+
}
|
22504
|
+
if (message.hash != null && message.hasOwnProperty("hash")) {
|
22505
|
+
if (properties.variant === 1)
|
22506
|
+
return "variant: multiple values";
|
22507
|
+
properties.variant = 1;
|
22508
|
+
if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
|
22509
|
+
return "hash: buffer expected";
|
22510
|
+
}
|
22511
|
+
return null;
|
22512
|
+
};
|
22513
|
+
|
22514
|
+
/**
|
22515
|
+
* Creates a PublicKeyOrHash message from a plain object. Also converts values to their respective internal types.
|
22516
|
+
* @function fromObject
|
22517
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22518
|
+
* @static
|
22519
|
+
* @param {Object.<string,*>} object Plain object
|
22520
|
+
* @returns {TW.BitcoinV2.Proto.PublicKeyOrHash} PublicKeyOrHash
|
22521
|
+
*/
|
22522
|
+
PublicKeyOrHash.fromObject = function fromObject(object) {
|
22523
|
+
if (object instanceof $root.TW.BitcoinV2.Proto.PublicKeyOrHash)
|
22524
|
+
return object;
|
22525
|
+
var message = new $root.TW.BitcoinV2.Proto.PublicKeyOrHash();
|
22526
|
+
if (object.pubkey != null)
|
22527
|
+
if (typeof object.pubkey === "string")
|
22528
|
+
$util.base64.decode(object.pubkey, message.pubkey = $util.newBuffer($util.base64.length(object.pubkey)), 0);
|
22529
|
+
else if (object.pubkey.length)
|
22530
|
+
message.pubkey = object.pubkey;
|
22531
|
+
if (object.hash != null)
|
22532
|
+
if (typeof object.hash === "string")
|
22533
|
+
$util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
|
22534
|
+
else if (object.hash.length)
|
22535
|
+
message.hash = object.hash;
|
22536
|
+
return message;
|
22537
|
+
};
|
22538
|
+
|
22539
|
+
/**
|
22540
|
+
* Creates a plain object from a PublicKeyOrHash message. Also converts values to other types if specified.
|
22541
|
+
* @function toObject
|
22542
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22543
|
+
* @static
|
22544
|
+
* @param {TW.BitcoinV2.Proto.PublicKeyOrHash} message PublicKeyOrHash
|
22545
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
22546
|
+
* @returns {Object.<string,*>} Plain object
|
22547
|
+
*/
|
22548
|
+
PublicKeyOrHash.toObject = function toObject(message, options) {
|
22549
|
+
if (!options)
|
22550
|
+
options = {};
|
22551
|
+
var object = {};
|
22552
|
+
if (message.pubkey != null && message.hasOwnProperty("pubkey")) {
|
22553
|
+
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;
|
22554
|
+
if (options.oneofs)
|
22555
|
+
object.variant = "pubkey";
|
22556
|
+
}
|
22557
|
+
if (message.hash != null && message.hasOwnProperty("hash")) {
|
22558
|
+
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;
|
22559
|
+
if (options.oneofs)
|
22560
|
+
object.variant = "hash";
|
22561
|
+
}
|
22562
|
+
return object;
|
22563
|
+
};
|
22564
|
+
|
22565
|
+
/**
|
22566
|
+
* Converts this PublicKeyOrHash to JSON.
|
22567
|
+
* @function toJSON
|
22568
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeyOrHash
|
22569
|
+
* @instance
|
22570
|
+
* @returns {Object.<string,*>} JSON object
|
22571
|
+
*/
|
22572
|
+
PublicKeyOrHash.prototype.toJSON = function toJSON() {
|
22573
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
22574
|
+
};
|
22575
|
+
|
22576
|
+
return PublicKeyOrHash;
|
22577
|
+
})();
|
22578
|
+
|
22579
|
+
Proto.PublicKeySignature = (function() {
|
22580
|
+
|
22581
|
+
/**
|
22582
|
+
* Properties of a PublicKeySignature.
|
22583
|
+
* @memberof TW.BitcoinV2.Proto
|
22584
|
+
* @interface IPublicKeySignature
|
22585
|
+
* @property {Uint8Array|null} [publicKey] PublicKeySignature publicKey
|
22586
|
+
* @property {Uint8Array|null} [signature] PublicKeySignature signature
|
22587
|
+
*/
|
22588
|
+
|
22589
|
+
/**
|
22590
|
+
* Constructs a new PublicKeySignature.
|
22591
|
+
* @memberof TW.BitcoinV2.Proto
|
22592
|
+
* @classdesc Represents a PublicKeySignature.
|
22593
|
+
* @implements IPublicKeySignature
|
22594
|
+
* @constructor
|
22595
|
+
* @param {TW.BitcoinV2.Proto.IPublicKeySignature=} [properties] Properties to set
|
22596
|
+
*/
|
22597
|
+
function PublicKeySignature(properties) {
|
22598
|
+
if (properties)
|
22599
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
22600
|
+
if (properties[keys[i]] != null)
|
22601
|
+
this[keys[i]] = properties[keys[i]];
|
22602
|
+
}
|
22603
|
+
|
22604
|
+
/**
|
22605
|
+
* PublicKeySignature publicKey.
|
22606
|
+
* @member {Uint8Array} publicKey
|
22607
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20121
22608
|
* @instance
|
20122
22609
|
*/
|
20123
|
-
|
20124
|
-
|
20125
|
-
// OneOf field names bound to virtual getters and setters
|
20126
|
-
var $oneOfFields;
|
22610
|
+
PublicKeySignature.prototype.publicKey = $util.newBuffer([]);
|
20127
22611
|
|
20128
22612
|
/**
|
20129
|
-
*
|
20130
|
-
* @member {
|
20131
|
-
* @memberof TW.BitcoinV2.Proto.
|
22613
|
+
* PublicKeySignature signature.
|
22614
|
+
* @member {Uint8Array} signature
|
22615
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20132
22616
|
* @instance
|
20133
22617
|
*/
|
20134
|
-
|
20135
|
-
get: $util.oneOfGetter($oneOfFields = ["pubkey", "hash"]),
|
20136
|
-
set: $util.oneOfSetter($oneOfFields)
|
20137
|
-
});
|
22618
|
+
PublicKeySignature.prototype.signature = $util.newBuffer([]);
|
20138
22619
|
|
20139
22620
|
/**
|
20140
|
-
* Creates a new
|
22621
|
+
* Creates a new PublicKeySignature instance using the specified properties.
|
20141
22622
|
* @function create
|
20142
|
-
* @memberof TW.BitcoinV2.Proto.
|
22623
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20143
22624
|
* @static
|
20144
|
-
* @param {TW.BitcoinV2.Proto.
|
20145
|
-
* @returns {TW.BitcoinV2.Proto.
|
22625
|
+
* @param {TW.BitcoinV2.Proto.IPublicKeySignature=} [properties] Properties to set
|
22626
|
+
* @returns {TW.BitcoinV2.Proto.PublicKeySignature} PublicKeySignature instance
|
20146
22627
|
*/
|
20147
|
-
|
20148
|
-
return new
|
22628
|
+
PublicKeySignature.create = function create(properties) {
|
22629
|
+
return new PublicKeySignature(properties);
|
20149
22630
|
};
|
20150
22631
|
|
20151
22632
|
/**
|
20152
|
-
* Encodes the specified
|
22633
|
+
* Encodes the specified PublicKeySignature message. Does not implicitly {@link TW.BitcoinV2.Proto.PublicKeySignature.verify|verify} messages.
|
20153
22634
|
* @function encode
|
20154
|
-
* @memberof TW.BitcoinV2.Proto.
|
22635
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20155
22636
|
* @static
|
20156
|
-
* @param {TW.BitcoinV2.Proto.
|
22637
|
+
* @param {TW.BitcoinV2.Proto.IPublicKeySignature} message PublicKeySignature message or plain object to encode
|
20157
22638
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
20158
22639
|
* @returns {$protobuf.Writer} Writer
|
20159
22640
|
*/
|
20160
|
-
|
22641
|
+
PublicKeySignature.encode = function encode(message, writer) {
|
20161
22642
|
if (!writer)
|
20162
22643
|
writer = $Writer.create();
|
20163
|
-
if (message.
|
20164
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.
|
20165
|
-
if (message.
|
20166
|
-
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.
|
22644
|
+
if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
|
22645
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey);
|
22646
|
+
if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
|
22647
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature);
|
20167
22648
|
return writer;
|
20168
22649
|
};
|
20169
22650
|
|
20170
22651
|
/**
|
20171
|
-
* Decodes a
|
22652
|
+
* Decodes a PublicKeySignature message from the specified reader or buffer.
|
20172
22653
|
* @function decode
|
20173
|
-
* @memberof TW.BitcoinV2.Proto.
|
22654
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20174
22655
|
* @static
|
20175
22656
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20176
22657
|
* @param {number} [length] Message length if known beforehand
|
20177
|
-
* @returns {TW.BitcoinV2.Proto.
|
22658
|
+
* @returns {TW.BitcoinV2.Proto.PublicKeySignature} PublicKeySignature
|
20178
22659
|
* @throws {Error} If the payload is not a reader or valid buffer
|
20179
22660
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20180
22661
|
*/
|
20181
|
-
|
22662
|
+
PublicKeySignature.decode = function decode(reader, length) {
|
20182
22663
|
if (!(reader instanceof $Reader))
|
20183
22664
|
reader = $Reader.create(reader);
|
20184
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BitcoinV2.Proto.
|
22665
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.BitcoinV2.Proto.PublicKeySignature();
|
20185
22666
|
while (reader.pos < end) {
|
20186
22667
|
var tag = reader.uint32();
|
20187
22668
|
switch (tag >>> 3) {
|
20188
22669
|
case 1:
|
20189
|
-
message.
|
22670
|
+
message.publicKey = reader.bytes();
|
20190
22671
|
break;
|
20191
22672
|
case 2:
|
20192
|
-
message.
|
22673
|
+
message.signature = reader.bytes();
|
20193
22674
|
break;
|
20194
22675
|
default:
|
20195
22676
|
reader.skipType(tag & 7);
|
@@ -20200,95 +22681,98 @@
|
|
20200
22681
|
};
|
20201
22682
|
|
20202
22683
|
/**
|
20203
|
-
* Verifies a
|
22684
|
+
* Verifies a PublicKeySignature message.
|
20204
22685
|
* @function verify
|
20205
|
-
* @memberof TW.BitcoinV2.Proto.
|
22686
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20206
22687
|
* @static
|
20207
22688
|
* @param {Object.<string,*>} message Plain object to verify
|
20208
22689
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
20209
22690
|
*/
|
20210
|
-
|
22691
|
+
PublicKeySignature.verify = function verify(message) {
|
20211
22692
|
if (typeof message !== "object" || message === null)
|
20212
22693
|
return "object expected";
|
20213
|
-
|
20214
|
-
|
20215
|
-
|
20216
|
-
|
20217
|
-
|
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
|
-
}
|
22694
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
22695
|
+
if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
|
22696
|
+
return "publicKey: buffer expected";
|
22697
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
22698
|
+
if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
|
22699
|
+
return "signature: buffer expected";
|
20226
22700
|
return null;
|
20227
22701
|
};
|
20228
22702
|
|
20229
22703
|
/**
|
20230
|
-
* Creates a
|
22704
|
+
* Creates a PublicKeySignature message from a plain object. Also converts values to their respective internal types.
|
20231
22705
|
* @function fromObject
|
20232
|
-
* @memberof TW.BitcoinV2.Proto.
|
22706
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20233
22707
|
* @static
|
20234
22708
|
* @param {Object.<string,*>} object Plain object
|
20235
|
-
* @returns {TW.BitcoinV2.Proto.
|
22709
|
+
* @returns {TW.BitcoinV2.Proto.PublicKeySignature} PublicKeySignature
|
20236
22710
|
*/
|
20237
|
-
|
20238
|
-
if (object instanceof $root.TW.BitcoinV2.Proto.
|
22711
|
+
PublicKeySignature.fromObject = function fromObject(object) {
|
22712
|
+
if (object instanceof $root.TW.BitcoinV2.Proto.PublicKeySignature)
|
20239
22713
|
return object;
|
20240
|
-
var message = new $root.TW.BitcoinV2.Proto.
|
20241
|
-
if (object.
|
20242
|
-
if (typeof object.
|
20243
|
-
$util.base64.decode(object.
|
20244
|
-
else if (object.
|
20245
|
-
message.
|
20246
|
-
if (object.
|
20247
|
-
if (typeof object.
|
20248
|
-
$util.base64.decode(object.
|
20249
|
-
else if (object.
|
20250
|
-
message.
|
22714
|
+
var message = new $root.TW.BitcoinV2.Proto.PublicKeySignature();
|
22715
|
+
if (object.publicKey != null)
|
22716
|
+
if (typeof object.publicKey === "string")
|
22717
|
+
$util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
|
22718
|
+
else if (object.publicKey.length)
|
22719
|
+
message.publicKey = object.publicKey;
|
22720
|
+
if (object.signature != null)
|
22721
|
+
if (typeof object.signature === "string")
|
22722
|
+
$util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
|
22723
|
+
else if (object.signature.length)
|
22724
|
+
message.signature = object.signature;
|
20251
22725
|
return message;
|
20252
22726
|
};
|
20253
22727
|
|
20254
22728
|
/**
|
20255
|
-
* Creates a plain object from a
|
22729
|
+
* Creates a plain object from a PublicKeySignature message. Also converts values to other types if specified.
|
20256
22730
|
* @function toObject
|
20257
|
-
* @memberof TW.BitcoinV2.Proto.
|
22731
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20258
22732
|
* @static
|
20259
|
-
* @param {TW.BitcoinV2.Proto.
|
22733
|
+
* @param {TW.BitcoinV2.Proto.PublicKeySignature} message PublicKeySignature
|
20260
22734
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
20261
22735
|
* @returns {Object.<string,*>} Plain object
|
20262
22736
|
*/
|
20263
|
-
|
22737
|
+
PublicKeySignature.toObject = function toObject(message, options) {
|
20264
22738
|
if (!options)
|
20265
22739
|
options = {};
|
20266
22740
|
var object = {};
|
20267
|
-
if (
|
20268
|
-
|
20269
|
-
|
20270
|
-
|
20271
|
-
|
20272
|
-
|
20273
|
-
|
20274
|
-
|
20275
|
-
|
22741
|
+
if (options.defaults) {
|
22742
|
+
if (options.bytes === String)
|
22743
|
+
object.publicKey = "";
|
22744
|
+
else {
|
22745
|
+
object.publicKey = [];
|
22746
|
+
if (options.bytes !== Array)
|
22747
|
+
object.publicKey = $util.newBuffer(object.publicKey);
|
22748
|
+
}
|
22749
|
+
if (options.bytes === String)
|
22750
|
+
object.signature = "";
|
22751
|
+
else {
|
22752
|
+
object.signature = [];
|
22753
|
+
if (options.bytes !== Array)
|
22754
|
+
object.signature = $util.newBuffer(object.signature);
|
22755
|
+
}
|
20276
22756
|
}
|
22757
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey"))
|
22758
|
+
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;
|
22759
|
+
if (message.signature != null && message.hasOwnProperty("signature"))
|
22760
|
+
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
22761
|
return object;
|
20278
22762
|
};
|
20279
22763
|
|
20280
22764
|
/**
|
20281
|
-
* Converts this
|
22765
|
+
* Converts this PublicKeySignature to JSON.
|
20282
22766
|
* @function toJSON
|
20283
|
-
* @memberof TW.BitcoinV2.Proto.
|
22767
|
+
* @memberof TW.BitcoinV2.Proto.PublicKeySignature
|
20284
22768
|
* @instance
|
20285
22769
|
* @returns {Object.<string,*>} JSON object
|
20286
22770
|
*/
|
20287
|
-
|
22771
|
+
PublicKeySignature.prototype.toJSON = function toJSON() {
|
20288
22772
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
20289
22773
|
};
|
20290
22774
|
|
20291
|
-
return
|
22775
|
+
return PublicKeySignature;
|
20292
22776
|
})();
|
20293
22777
|
|
20294
22778
|
Proto.OutPoint = (function() {
|
@@ -21002,6 +23486,11 @@
|
|
21002
23486
|
* @property {TW.BitcoinV2.Proto.IPublicKeyOrHash|null} [p2wpkh] InputBuilder p2wpkh
|
21003
23487
|
* @property {Uint8Array|null} [p2trKeyPath] InputBuilder p2trKeyPath
|
21004
23488
|
* @property {TW.BitcoinV2.Proto.Input.IInputBrc20Inscription|null} [brc20Inscribe] InputBuilder brc20Inscribe
|
23489
|
+
* @property {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath|null} [babylonStakingTimelockPath] InputBuilder babylonStakingTimelockPath
|
23490
|
+
* @property {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath|null} [babylonStakingUnbondingPath] InputBuilder babylonStakingUnbondingPath
|
23491
|
+
* @property {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath|null} [babylonStakingSlashingPath] InputBuilder babylonStakingSlashingPath
|
23492
|
+
* @property {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath|null} [babylonUnbondingTimelockPath] InputBuilder babylonUnbondingTimelockPath
|
23493
|
+
* @property {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath|null} [babylonUnbondingSlashingPath] InputBuilder babylonUnbondingSlashingPath
|
21005
23494
|
*/
|
21006
23495
|
|
21007
23496
|
/**
|
@@ -21059,17 +23548,57 @@
|
|
21059
23548
|
*/
|
21060
23549
|
InputBuilder.prototype.brc20Inscribe = null;
|
21061
23550
|
|
23551
|
+
/**
|
23552
|
+
* InputBuilder babylonStakingTimelockPath.
|
23553
|
+
* @member {TW.BabylonStaking.Proto.InputBuilder.IStakingTimelockPath|null|undefined} babylonStakingTimelockPath
|
23554
|
+
* @memberof TW.BitcoinV2.Proto.Input.InputBuilder
|
23555
|
+
* @instance
|
23556
|
+
*/
|
23557
|
+
InputBuilder.prototype.babylonStakingTimelockPath = null;
|
23558
|
+
|
23559
|
+
/**
|
23560
|
+
* InputBuilder babylonStakingUnbondingPath.
|
23561
|
+
* @member {TW.BabylonStaking.Proto.InputBuilder.IStakingUnbondingPath|null|undefined} babylonStakingUnbondingPath
|
23562
|
+
* @memberof TW.BitcoinV2.Proto.Input.InputBuilder
|
23563
|
+
* @instance
|
23564
|
+
*/
|
23565
|
+
InputBuilder.prototype.babylonStakingUnbondingPath = null;
|
23566
|
+
|
23567
|
+
/**
|
23568
|
+
* InputBuilder babylonStakingSlashingPath.
|
23569
|
+
* @member {TW.BabylonStaking.Proto.InputBuilder.IStakingSlashingPath|null|undefined} babylonStakingSlashingPath
|
23570
|
+
* @memberof TW.BitcoinV2.Proto.Input.InputBuilder
|
23571
|
+
* @instance
|
23572
|
+
*/
|
23573
|
+
InputBuilder.prototype.babylonStakingSlashingPath = null;
|
23574
|
+
|
23575
|
+
/**
|
23576
|
+
* InputBuilder babylonUnbondingTimelockPath.
|
23577
|
+
* @member {TW.BabylonStaking.Proto.InputBuilder.IUnbondingTimelockPath|null|undefined} babylonUnbondingTimelockPath
|
23578
|
+
* @memberof TW.BitcoinV2.Proto.Input.InputBuilder
|
23579
|
+
* @instance
|
23580
|
+
*/
|
23581
|
+
InputBuilder.prototype.babylonUnbondingTimelockPath = null;
|
23582
|
+
|
23583
|
+
/**
|
23584
|
+
* InputBuilder babylonUnbondingSlashingPath.
|
23585
|
+
* @member {TW.BabylonStaking.Proto.InputBuilder.IUnbondingSlashingPath|null|undefined} babylonUnbondingSlashingPath
|
23586
|
+
* @memberof TW.BitcoinV2.Proto.Input.InputBuilder
|
23587
|
+
* @instance
|
23588
|
+
*/
|
23589
|
+
InputBuilder.prototype.babylonUnbondingSlashingPath = null;
|
23590
|
+
|
21062
23591
|
// OneOf field names bound to virtual getters and setters
|
21063
23592
|
var $oneOfFields;
|
21064
23593
|
|
21065
23594
|
/**
|
21066
23595
|
* InputBuilder variant.
|
21067
|
-
* @member {"p2pk"|"p2pkh"|"p2wpkh"|"p2trKeyPath"|"brc20Inscribe"|undefined} variant
|
23596
|
+
* @member {"p2pk"|"p2pkh"|"p2wpkh"|"p2trKeyPath"|"brc20Inscribe"|"babylonStakingTimelockPath"|"babylonStakingUnbondingPath"|"babylonStakingSlashingPath"|"babylonUnbondingTimelockPath"|"babylonUnbondingSlashingPath"|undefined} variant
|
21068
23597
|
* @memberof TW.BitcoinV2.Proto.Input.InputBuilder
|
21069
23598
|
* @instance
|
21070
23599
|
*/
|
21071
23600
|
Object.defineProperty(InputBuilder.prototype, "variant", {
|
21072
|
-
get: $util.oneOfGetter($oneOfFields = ["p2pk", "p2pkh", "p2wpkh", "p2trKeyPath", "brc20Inscribe"]),
|
23601
|
+
get: $util.oneOfGetter($oneOfFields = ["p2pk", "p2pkh", "p2wpkh", "p2trKeyPath", "brc20Inscribe", "babylonStakingTimelockPath", "babylonStakingUnbondingPath", "babylonStakingSlashingPath", "babylonUnbondingTimelockPath", "babylonUnbondingSlashingPath"]),
|
21073
23602
|
set: $util.oneOfSetter($oneOfFields)
|
21074
23603
|
});
|
21075
23604
|
|
@@ -21107,6 +23636,16 @@
|
|
21107
23636
|
writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.p2trKeyPath);
|
21108
23637
|
if (message.brc20Inscribe != null && Object.hasOwnProperty.call(message, "brc20Inscribe"))
|
21109
23638
|
$root.TW.BitcoinV2.Proto.Input.InputBrc20Inscription.encode(message.brc20Inscribe, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
23639
|
+
if (message.babylonStakingTimelockPath != null && Object.hasOwnProperty.call(message, "babylonStakingTimelockPath"))
|
23640
|
+
$root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.encode(message.babylonStakingTimelockPath, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
23641
|
+
if (message.babylonStakingUnbondingPath != null && Object.hasOwnProperty.call(message, "babylonStakingUnbondingPath"))
|
23642
|
+
$root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.encode(message.babylonStakingUnbondingPath, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
|
23643
|
+
if (message.babylonStakingSlashingPath != null && Object.hasOwnProperty.call(message, "babylonStakingSlashingPath"))
|
23644
|
+
$root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.encode(message.babylonStakingSlashingPath, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
|
23645
|
+
if (message.babylonUnbondingTimelockPath != null && Object.hasOwnProperty.call(message, "babylonUnbondingTimelockPath"))
|
23646
|
+
$root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.encode(message.babylonUnbondingTimelockPath, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
|
23647
|
+
if (message.babylonUnbondingSlashingPath != null && Object.hasOwnProperty.call(message, "babylonUnbondingSlashingPath"))
|
23648
|
+
$root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.encode(message.babylonUnbondingSlashingPath, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
|
21110
23649
|
return writer;
|
21111
23650
|
};
|
21112
23651
|
|
@@ -21143,6 +23682,21 @@
|
|
21143
23682
|
case 9:
|
21144
23683
|
message.brc20Inscribe = $root.TW.BitcoinV2.Proto.Input.InputBrc20Inscription.decode(reader, reader.uint32());
|
21145
23684
|
break;
|
23685
|
+
case 15:
|
23686
|
+
message.babylonStakingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.decode(reader, reader.uint32());
|
23687
|
+
break;
|
23688
|
+
case 16:
|
23689
|
+
message.babylonStakingUnbondingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.decode(reader, reader.uint32());
|
23690
|
+
break;
|
23691
|
+
case 17:
|
23692
|
+
message.babylonStakingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.decode(reader, reader.uint32());
|
23693
|
+
break;
|
23694
|
+
case 18:
|
23695
|
+
message.babylonUnbondingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.decode(reader, reader.uint32());
|
23696
|
+
break;
|
23697
|
+
case 19:
|
23698
|
+
message.babylonUnbondingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.decode(reader, reader.uint32());
|
23699
|
+
break;
|
21146
23700
|
default:
|
21147
23701
|
reader.skipType(tag & 7);
|
21148
23702
|
break;
|
@@ -21205,6 +23759,56 @@
|
|
21205
23759
|
return "brc20Inscribe." + error;
|
21206
23760
|
}
|
21207
23761
|
}
|
23762
|
+
if (message.babylonStakingTimelockPath != null && message.hasOwnProperty("babylonStakingTimelockPath")) {
|
23763
|
+
if (properties.variant === 1)
|
23764
|
+
return "variant: multiple values";
|
23765
|
+
properties.variant = 1;
|
23766
|
+
{
|
23767
|
+
var error = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.verify(message.babylonStakingTimelockPath);
|
23768
|
+
if (error)
|
23769
|
+
return "babylonStakingTimelockPath." + error;
|
23770
|
+
}
|
23771
|
+
}
|
23772
|
+
if (message.babylonStakingUnbondingPath != null && message.hasOwnProperty("babylonStakingUnbondingPath")) {
|
23773
|
+
if (properties.variant === 1)
|
23774
|
+
return "variant: multiple values";
|
23775
|
+
properties.variant = 1;
|
23776
|
+
{
|
23777
|
+
var error = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.verify(message.babylonStakingUnbondingPath);
|
23778
|
+
if (error)
|
23779
|
+
return "babylonStakingUnbondingPath." + error;
|
23780
|
+
}
|
23781
|
+
}
|
23782
|
+
if (message.babylonStakingSlashingPath != null && message.hasOwnProperty("babylonStakingSlashingPath")) {
|
23783
|
+
if (properties.variant === 1)
|
23784
|
+
return "variant: multiple values";
|
23785
|
+
properties.variant = 1;
|
23786
|
+
{
|
23787
|
+
var error = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.verify(message.babylonStakingSlashingPath);
|
23788
|
+
if (error)
|
23789
|
+
return "babylonStakingSlashingPath." + error;
|
23790
|
+
}
|
23791
|
+
}
|
23792
|
+
if (message.babylonUnbondingTimelockPath != null && message.hasOwnProperty("babylonUnbondingTimelockPath")) {
|
23793
|
+
if (properties.variant === 1)
|
23794
|
+
return "variant: multiple values";
|
23795
|
+
properties.variant = 1;
|
23796
|
+
{
|
23797
|
+
var error = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.verify(message.babylonUnbondingTimelockPath);
|
23798
|
+
if (error)
|
23799
|
+
return "babylonUnbondingTimelockPath." + error;
|
23800
|
+
}
|
23801
|
+
}
|
23802
|
+
if (message.babylonUnbondingSlashingPath != null && message.hasOwnProperty("babylonUnbondingSlashingPath")) {
|
23803
|
+
if (properties.variant === 1)
|
23804
|
+
return "variant: multiple values";
|
23805
|
+
properties.variant = 1;
|
23806
|
+
{
|
23807
|
+
var error = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.verify(message.babylonUnbondingSlashingPath);
|
23808
|
+
if (error)
|
23809
|
+
return "babylonUnbondingSlashingPath." + error;
|
23810
|
+
}
|
23811
|
+
}
|
21208
23812
|
return null;
|
21209
23813
|
};
|
21210
23814
|
|
@@ -21245,6 +23849,31 @@
|
|
21245
23849
|
throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.brc20Inscribe: object expected");
|
21246
23850
|
message.brc20Inscribe = $root.TW.BitcoinV2.Proto.Input.InputBrc20Inscription.fromObject(object.brc20Inscribe);
|
21247
23851
|
}
|
23852
|
+
if (object.babylonStakingTimelockPath != null) {
|
23853
|
+
if (typeof object.babylonStakingTimelockPath !== "object")
|
23854
|
+
throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonStakingTimelockPath: object expected");
|
23855
|
+
message.babylonStakingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.fromObject(object.babylonStakingTimelockPath);
|
23856
|
+
}
|
23857
|
+
if (object.babylonStakingUnbondingPath != null) {
|
23858
|
+
if (typeof object.babylonStakingUnbondingPath !== "object")
|
23859
|
+
throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonStakingUnbondingPath: object expected");
|
23860
|
+
message.babylonStakingUnbondingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.fromObject(object.babylonStakingUnbondingPath);
|
23861
|
+
}
|
23862
|
+
if (object.babylonStakingSlashingPath != null) {
|
23863
|
+
if (typeof object.babylonStakingSlashingPath !== "object")
|
23864
|
+
throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonStakingSlashingPath: object expected");
|
23865
|
+
message.babylonStakingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.fromObject(object.babylonStakingSlashingPath);
|
23866
|
+
}
|
23867
|
+
if (object.babylonUnbondingTimelockPath != null) {
|
23868
|
+
if (typeof object.babylonUnbondingTimelockPath !== "object")
|
23869
|
+
throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonUnbondingTimelockPath: object expected");
|
23870
|
+
message.babylonUnbondingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.fromObject(object.babylonUnbondingTimelockPath);
|
23871
|
+
}
|
23872
|
+
if (object.babylonUnbondingSlashingPath != null) {
|
23873
|
+
if (typeof object.babylonUnbondingSlashingPath !== "object")
|
23874
|
+
throw TypeError(".TW.BitcoinV2.Proto.Input.InputBuilder.babylonUnbondingSlashingPath: object expected");
|
23875
|
+
message.babylonUnbondingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.fromObject(object.babylonUnbondingSlashingPath);
|
23876
|
+
}
|
21248
23877
|
return message;
|
21249
23878
|
};
|
21250
23879
|
|
@@ -21286,6 +23915,31 @@
|
|
21286
23915
|
if (options.oneofs)
|
21287
23916
|
object.variant = "brc20Inscribe";
|
21288
23917
|
}
|
23918
|
+
if (message.babylonStakingTimelockPath != null && message.hasOwnProperty("babylonStakingTimelockPath")) {
|
23919
|
+
object.babylonStakingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.toObject(message.babylonStakingTimelockPath, options);
|
23920
|
+
if (options.oneofs)
|
23921
|
+
object.variant = "babylonStakingTimelockPath";
|
23922
|
+
}
|
23923
|
+
if (message.babylonStakingUnbondingPath != null && message.hasOwnProperty("babylonStakingUnbondingPath")) {
|
23924
|
+
object.babylonStakingUnbondingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.toObject(message.babylonStakingUnbondingPath, options);
|
23925
|
+
if (options.oneofs)
|
23926
|
+
object.variant = "babylonStakingUnbondingPath";
|
23927
|
+
}
|
23928
|
+
if (message.babylonStakingSlashingPath != null && message.hasOwnProperty("babylonStakingSlashingPath")) {
|
23929
|
+
object.babylonStakingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.toObject(message.babylonStakingSlashingPath, options);
|
23930
|
+
if (options.oneofs)
|
23931
|
+
object.variant = "babylonStakingSlashingPath";
|
23932
|
+
}
|
23933
|
+
if (message.babylonUnbondingTimelockPath != null && message.hasOwnProperty("babylonUnbondingTimelockPath")) {
|
23934
|
+
object.babylonUnbondingTimelockPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.toObject(message.babylonUnbondingTimelockPath, options);
|
23935
|
+
if (options.oneofs)
|
23936
|
+
object.variant = "babylonUnbondingTimelockPath";
|
23937
|
+
}
|
23938
|
+
if (message.babylonUnbondingSlashingPath != null && message.hasOwnProperty("babylonUnbondingSlashingPath")) {
|
23939
|
+
object.babylonUnbondingSlashingPath = $root.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.toObject(message.babylonUnbondingSlashingPath, options);
|
23940
|
+
if (options.oneofs)
|
23941
|
+
object.variant = "babylonUnbondingSlashingPath";
|
23942
|
+
}
|
21289
23943
|
return object;
|
21290
23944
|
};
|
21291
23945
|
|
@@ -22008,6 +24662,9 @@
|
|
22008
24662
|
* @property {Uint8Array|null} [p2trDangerousAssumeTweaked] OutputBuilder p2trDangerousAssumeTweaked
|
22009
24663
|
* @property {TW.BitcoinV2.Proto.Output.IOutputBrc20Inscription|null} [brc20Inscribe] OutputBuilder brc20Inscribe
|
22010
24664
|
* @property {Uint8Array|null} [opReturn] OutputBuilder opReturn
|
24665
|
+
* @property {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput|null} [babylonStaking] OutputBuilder babylonStaking
|
24666
|
+
* @property {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput|null} [babylonUnbonding] OutputBuilder babylonUnbonding
|
24667
|
+
* @property {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn|null} [babylonStakingOpReturn] OutputBuilder babylonStakingOpReturn
|
22011
24668
|
*/
|
22012
24669
|
|
22013
24670
|
/**
|
@@ -22105,17 +24762,41 @@
|
|
22105
24762
|
*/
|
22106
24763
|
OutputBuilder.prototype.opReturn = null;
|
22107
24764
|
|
24765
|
+
/**
|
24766
|
+
* OutputBuilder babylonStaking.
|
24767
|
+
* @member {TW.BabylonStaking.Proto.OutputBuilder.IStakingOutput|null|undefined} babylonStaking
|
24768
|
+
* @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
|
24769
|
+
* @instance
|
24770
|
+
*/
|
24771
|
+
OutputBuilder.prototype.babylonStaking = null;
|
24772
|
+
|
24773
|
+
/**
|
24774
|
+
* OutputBuilder babylonUnbonding.
|
24775
|
+
* @member {TW.BabylonStaking.Proto.OutputBuilder.IUnbondingOutput|null|undefined} babylonUnbonding
|
24776
|
+
* @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
|
24777
|
+
* @instance
|
24778
|
+
*/
|
24779
|
+
OutputBuilder.prototype.babylonUnbonding = null;
|
24780
|
+
|
24781
|
+
/**
|
24782
|
+
* OutputBuilder babylonStakingOpReturn.
|
24783
|
+
* @member {TW.BabylonStaking.Proto.OutputBuilder.IOpReturn|null|undefined} babylonStakingOpReturn
|
24784
|
+
* @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
|
24785
|
+
* @instance
|
24786
|
+
*/
|
24787
|
+
OutputBuilder.prototype.babylonStakingOpReturn = null;
|
24788
|
+
|
22108
24789
|
// OneOf field names bound to virtual getters and setters
|
22109
24790
|
var $oneOfFields;
|
22110
24791
|
|
22111
24792
|
/**
|
22112
24793
|
* OutputBuilder variant.
|
22113
|
-
* @member {"p2sh"|"p2pk"|"p2pkh"|"p2wsh"|"p2wpkh"|"p2trKeyPath"|"p2trScriptPath"|"p2trDangerousAssumeTweaked"|"brc20Inscribe"|"opReturn"|undefined} variant
|
24794
|
+
* @member {"p2sh"|"p2pk"|"p2pkh"|"p2wsh"|"p2wpkh"|"p2trKeyPath"|"p2trScriptPath"|"p2trDangerousAssumeTweaked"|"brc20Inscribe"|"opReturn"|"babylonStaking"|"babylonUnbonding"|"babylonStakingOpReturn"|undefined} variant
|
22114
24795
|
* @memberof TW.BitcoinV2.Proto.Output.OutputBuilder
|
22115
24796
|
* @instance
|
22116
24797
|
*/
|
22117
24798
|
Object.defineProperty(OutputBuilder.prototype, "variant", {
|
22118
|
-
get: $util.oneOfGetter($oneOfFields = ["p2sh", "p2pk", "p2pkh", "p2wsh", "p2wpkh", "p2trKeyPath", "p2trScriptPath", "p2trDangerousAssumeTweaked", "brc20Inscribe", "opReturn"]),
|
24799
|
+
get: $util.oneOfGetter($oneOfFields = ["p2sh", "p2pk", "p2pkh", "p2wsh", "p2wpkh", "p2trKeyPath", "p2trScriptPath", "p2trDangerousAssumeTweaked", "brc20Inscribe", "opReturn", "babylonStaking", "babylonUnbonding", "babylonStakingOpReturn"]),
|
22119
24800
|
set: $util.oneOfSetter($oneOfFields)
|
22120
24801
|
});
|
22121
24802
|
|
@@ -22163,6 +24844,12 @@
|
|
22163
24844
|
$root.TW.BitcoinV2.Proto.Output.OutputBrc20Inscription.encode(message.brc20Inscribe, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
22164
24845
|
if (message.opReturn != null && Object.hasOwnProperty.call(message, "opReturn"))
|
22165
24846
|
writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.opReturn);
|
24847
|
+
if (message.babylonStaking != null && Object.hasOwnProperty.call(message, "babylonStaking"))
|
24848
|
+
$root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.encode(message.babylonStaking, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
24849
|
+
if (message.babylonUnbonding != null && Object.hasOwnProperty.call(message, "babylonUnbonding"))
|
24850
|
+
$root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.encode(message.babylonUnbonding, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
|
24851
|
+
if (message.babylonStakingOpReturn != null && Object.hasOwnProperty.call(message, "babylonStakingOpReturn"))
|
24852
|
+
$root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.encode(message.babylonStakingOpReturn, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
|
22166
24853
|
return writer;
|
22167
24854
|
};
|
22168
24855
|
|
@@ -22214,6 +24901,15 @@
|
|
22214
24901
|
case 12:
|
22215
24902
|
message.opReturn = reader.bytes();
|
22216
24903
|
break;
|
24904
|
+
case 15:
|
24905
|
+
message.babylonStaking = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.decode(reader, reader.uint32());
|
24906
|
+
break;
|
24907
|
+
case 16:
|
24908
|
+
message.babylonUnbonding = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.decode(reader, reader.uint32());
|
24909
|
+
break;
|
24910
|
+
case 17:
|
24911
|
+
message.babylonStakingOpReturn = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.decode(reader, reader.uint32());
|
24912
|
+
break;
|
22217
24913
|
default:
|
22218
24914
|
reader.skipType(tag & 7);
|
22219
24915
|
break;
|
@@ -22320,6 +25016,36 @@
|
|
22320
25016
|
if (!(message.opReturn && typeof message.opReturn.length === "number" || $util.isString(message.opReturn)))
|
22321
25017
|
return "opReturn: buffer expected";
|
22322
25018
|
}
|
25019
|
+
if (message.babylonStaking != null && message.hasOwnProperty("babylonStaking")) {
|
25020
|
+
if (properties.variant === 1)
|
25021
|
+
return "variant: multiple values";
|
25022
|
+
properties.variant = 1;
|
25023
|
+
{
|
25024
|
+
var error = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.verify(message.babylonStaking);
|
25025
|
+
if (error)
|
25026
|
+
return "babylonStaking." + error;
|
25027
|
+
}
|
25028
|
+
}
|
25029
|
+
if (message.babylonUnbonding != null && message.hasOwnProperty("babylonUnbonding")) {
|
25030
|
+
if (properties.variant === 1)
|
25031
|
+
return "variant: multiple values";
|
25032
|
+
properties.variant = 1;
|
25033
|
+
{
|
25034
|
+
var error = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.verify(message.babylonUnbonding);
|
25035
|
+
if (error)
|
25036
|
+
return "babylonUnbonding." + error;
|
25037
|
+
}
|
25038
|
+
}
|
25039
|
+
if (message.babylonStakingOpReturn != null && message.hasOwnProperty("babylonStakingOpReturn")) {
|
25040
|
+
if (properties.variant === 1)
|
25041
|
+
return "variant: multiple values";
|
25042
|
+
properties.variant = 1;
|
25043
|
+
{
|
25044
|
+
var error = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.verify(message.babylonStakingOpReturn);
|
25045
|
+
if (error)
|
25046
|
+
return "babylonStakingOpReturn." + error;
|
25047
|
+
}
|
25048
|
+
}
|
22323
25049
|
return null;
|
22324
25050
|
};
|
22325
25051
|
|
@@ -22385,6 +25111,21 @@
|
|
22385
25111
|
$util.base64.decode(object.opReturn, message.opReturn = $util.newBuffer($util.base64.length(object.opReturn)), 0);
|
22386
25112
|
else if (object.opReturn.length)
|
22387
25113
|
message.opReturn = object.opReturn;
|
25114
|
+
if (object.babylonStaking != null) {
|
25115
|
+
if (typeof object.babylonStaking !== "object")
|
25116
|
+
throw TypeError(".TW.BitcoinV2.Proto.Output.OutputBuilder.babylonStaking: object expected");
|
25117
|
+
message.babylonStaking = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.fromObject(object.babylonStaking);
|
25118
|
+
}
|
25119
|
+
if (object.babylonUnbonding != null) {
|
25120
|
+
if (typeof object.babylonUnbonding !== "object")
|
25121
|
+
throw TypeError(".TW.BitcoinV2.Proto.Output.OutputBuilder.babylonUnbonding: object expected");
|
25122
|
+
message.babylonUnbonding = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.fromObject(object.babylonUnbonding);
|
25123
|
+
}
|
25124
|
+
if (object.babylonStakingOpReturn != null) {
|
25125
|
+
if (typeof object.babylonStakingOpReturn !== "object")
|
25126
|
+
throw TypeError(".TW.BitcoinV2.Proto.Output.OutputBuilder.babylonStakingOpReturn: object expected");
|
25127
|
+
message.babylonStakingOpReturn = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.fromObject(object.babylonStakingOpReturn);
|
25128
|
+
}
|
22388
25129
|
return message;
|
22389
25130
|
};
|
22390
25131
|
|
@@ -22451,6 +25192,21 @@
|
|
22451
25192
|
if (options.oneofs)
|
22452
25193
|
object.variant = "opReturn";
|
22453
25194
|
}
|
25195
|
+
if (message.babylonStaking != null && message.hasOwnProperty("babylonStaking")) {
|
25196
|
+
object.babylonStaking = $root.TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.toObject(message.babylonStaking, options);
|
25197
|
+
if (options.oneofs)
|
25198
|
+
object.variant = "babylonStaking";
|
25199
|
+
}
|
25200
|
+
if (message.babylonUnbonding != null && message.hasOwnProperty("babylonUnbonding")) {
|
25201
|
+
object.babylonUnbonding = $root.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.toObject(message.babylonUnbonding, options);
|
25202
|
+
if (options.oneofs)
|
25203
|
+
object.variant = "babylonUnbonding";
|
25204
|
+
}
|
25205
|
+
if (message.babylonStakingOpReturn != null && message.hasOwnProperty("babylonStakingOpReturn")) {
|
25206
|
+
object.babylonStakingOpReturn = $root.TW.BabylonStaking.Proto.OutputBuilder.OpReturn.toObject(message.babylonStakingOpReturn, options);
|
25207
|
+
if (options.oneofs)
|
25208
|
+
object.variant = "babylonStakingOpReturn";
|
25209
|
+
}
|
22454
25210
|
return object;
|
22455
25211
|
};
|
22456
25212
|
|