@trustwallet/wallet-core 4.0.26 → 4.0.28-rc1

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.
@@ -110228,6 +110228,2405 @@
110228
110228
  return AdvanceNonceAccount;
110229
110229
  })();
110230
110230
 
110231
+ Proto.PubkeySignature = (function() {
110232
+
110233
+ /**
110234
+ * Properties of a PubkeySignature.
110235
+ * @memberof TW.Solana.Proto
110236
+ * @interface IPubkeySignature
110237
+ * @property {string|null} [pubkey] PubkeySignature pubkey
110238
+ * @property {string|null} [signature] PubkeySignature signature
110239
+ */
110240
+
110241
+ /**
110242
+ * Constructs a new PubkeySignature.
110243
+ * @memberof TW.Solana.Proto
110244
+ * @classdesc Represents a PubkeySignature.
110245
+ * @implements IPubkeySignature
110246
+ * @constructor
110247
+ * @param {TW.Solana.Proto.IPubkeySignature=} [properties] Properties to set
110248
+ */
110249
+ function PubkeySignature(properties) {
110250
+ if (properties)
110251
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
110252
+ if (properties[keys[i]] != null)
110253
+ this[keys[i]] = properties[keys[i]];
110254
+ }
110255
+
110256
+ /**
110257
+ * PubkeySignature pubkey.
110258
+ * @member {string} pubkey
110259
+ * @memberof TW.Solana.Proto.PubkeySignature
110260
+ * @instance
110261
+ */
110262
+ PubkeySignature.prototype.pubkey = "";
110263
+
110264
+ /**
110265
+ * PubkeySignature signature.
110266
+ * @member {string} signature
110267
+ * @memberof TW.Solana.Proto.PubkeySignature
110268
+ * @instance
110269
+ */
110270
+ PubkeySignature.prototype.signature = "";
110271
+
110272
+ /**
110273
+ * Creates a new PubkeySignature instance using the specified properties.
110274
+ * @function create
110275
+ * @memberof TW.Solana.Proto.PubkeySignature
110276
+ * @static
110277
+ * @param {TW.Solana.Proto.IPubkeySignature=} [properties] Properties to set
110278
+ * @returns {TW.Solana.Proto.PubkeySignature} PubkeySignature instance
110279
+ */
110280
+ PubkeySignature.create = function create(properties) {
110281
+ return new PubkeySignature(properties);
110282
+ };
110283
+
110284
+ /**
110285
+ * Encodes the specified PubkeySignature message. Does not implicitly {@link TW.Solana.Proto.PubkeySignature.verify|verify} messages.
110286
+ * @function encode
110287
+ * @memberof TW.Solana.Proto.PubkeySignature
110288
+ * @static
110289
+ * @param {TW.Solana.Proto.IPubkeySignature} message PubkeySignature message or plain object to encode
110290
+ * @param {$protobuf.Writer} [writer] Writer to encode to
110291
+ * @returns {$protobuf.Writer} Writer
110292
+ */
110293
+ PubkeySignature.encode = function encode(message, writer) {
110294
+ if (!writer)
110295
+ writer = $Writer.create();
110296
+ if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey"))
110297
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubkey);
110298
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
110299
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.signature);
110300
+ return writer;
110301
+ };
110302
+
110303
+ /**
110304
+ * Decodes a PubkeySignature message from the specified reader or buffer.
110305
+ * @function decode
110306
+ * @memberof TW.Solana.Proto.PubkeySignature
110307
+ * @static
110308
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
110309
+ * @param {number} [length] Message length if known beforehand
110310
+ * @returns {TW.Solana.Proto.PubkeySignature} PubkeySignature
110311
+ * @throws {Error} If the payload is not a reader or valid buffer
110312
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
110313
+ */
110314
+ PubkeySignature.decode = function decode(reader, length) {
110315
+ if (!(reader instanceof $Reader))
110316
+ reader = $Reader.create(reader);
110317
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PubkeySignature();
110318
+ while (reader.pos < end) {
110319
+ var tag = reader.uint32();
110320
+ switch (tag >>> 3) {
110321
+ case 1:
110322
+ message.pubkey = reader.string();
110323
+ break;
110324
+ case 2:
110325
+ message.signature = reader.string();
110326
+ break;
110327
+ default:
110328
+ reader.skipType(tag & 7);
110329
+ break;
110330
+ }
110331
+ }
110332
+ return message;
110333
+ };
110334
+
110335
+ /**
110336
+ * Verifies a PubkeySignature message.
110337
+ * @function verify
110338
+ * @memberof TW.Solana.Proto.PubkeySignature
110339
+ * @static
110340
+ * @param {Object.<string,*>} message Plain object to verify
110341
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
110342
+ */
110343
+ PubkeySignature.verify = function verify(message) {
110344
+ if (typeof message !== "object" || message === null)
110345
+ return "object expected";
110346
+ if (message.pubkey != null && message.hasOwnProperty("pubkey"))
110347
+ if (!$util.isString(message.pubkey))
110348
+ return "pubkey: string expected";
110349
+ if (message.signature != null && message.hasOwnProperty("signature"))
110350
+ if (!$util.isString(message.signature))
110351
+ return "signature: string expected";
110352
+ return null;
110353
+ };
110354
+
110355
+ /**
110356
+ * Creates a PubkeySignature message from a plain object. Also converts values to their respective internal types.
110357
+ * @function fromObject
110358
+ * @memberof TW.Solana.Proto.PubkeySignature
110359
+ * @static
110360
+ * @param {Object.<string,*>} object Plain object
110361
+ * @returns {TW.Solana.Proto.PubkeySignature} PubkeySignature
110362
+ */
110363
+ PubkeySignature.fromObject = function fromObject(object) {
110364
+ if (object instanceof $root.TW.Solana.Proto.PubkeySignature)
110365
+ return object;
110366
+ var message = new $root.TW.Solana.Proto.PubkeySignature();
110367
+ if (object.pubkey != null)
110368
+ message.pubkey = String(object.pubkey);
110369
+ if (object.signature != null)
110370
+ message.signature = String(object.signature);
110371
+ return message;
110372
+ };
110373
+
110374
+ /**
110375
+ * Creates a plain object from a PubkeySignature message. Also converts values to other types if specified.
110376
+ * @function toObject
110377
+ * @memberof TW.Solana.Proto.PubkeySignature
110378
+ * @static
110379
+ * @param {TW.Solana.Proto.PubkeySignature} message PubkeySignature
110380
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
110381
+ * @returns {Object.<string,*>} Plain object
110382
+ */
110383
+ PubkeySignature.toObject = function toObject(message, options) {
110384
+ if (!options)
110385
+ options = {};
110386
+ var object = {};
110387
+ if (options.defaults) {
110388
+ object.pubkey = "";
110389
+ object.signature = "";
110390
+ }
110391
+ if (message.pubkey != null && message.hasOwnProperty("pubkey"))
110392
+ object.pubkey = message.pubkey;
110393
+ if (message.signature != null && message.hasOwnProperty("signature"))
110394
+ object.signature = message.signature;
110395
+ return object;
110396
+ };
110397
+
110398
+ /**
110399
+ * Converts this PubkeySignature to JSON.
110400
+ * @function toJSON
110401
+ * @memberof TW.Solana.Proto.PubkeySignature
110402
+ * @instance
110403
+ * @returns {Object.<string,*>} JSON object
110404
+ */
110405
+ PubkeySignature.prototype.toJSON = function toJSON() {
110406
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
110407
+ };
110408
+
110409
+ return PubkeySignature;
110410
+ })();
110411
+
110412
+ Proto.RawMessage = (function() {
110413
+
110414
+ /**
110415
+ * Properties of a RawMessage.
110416
+ * @memberof TW.Solana.Proto
110417
+ * @interface IRawMessage
110418
+ * @property {Array.<TW.Solana.Proto.IPubkeySignature>|null} [signatures] RawMessage signatures
110419
+ * @property {TW.Solana.Proto.RawMessage.IMessageLegacy|null} [legacy] RawMessage legacy
110420
+ * @property {TW.Solana.Proto.RawMessage.IMessageV0|null} [v0] RawMessage v0
110421
+ */
110422
+
110423
+ /**
110424
+ * Constructs a new RawMessage.
110425
+ * @memberof TW.Solana.Proto
110426
+ * @classdesc Represents a RawMessage.
110427
+ * @implements IRawMessage
110428
+ * @constructor
110429
+ * @param {TW.Solana.Proto.IRawMessage=} [properties] Properties to set
110430
+ */
110431
+ function RawMessage(properties) {
110432
+ this.signatures = [];
110433
+ if (properties)
110434
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
110435
+ if (properties[keys[i]] != null)
110436
+ this[keys[i]] = properties[keys[i]];
110437
+ }
110438
+
110439
+ /**
110440
+ * RawMessage signatures.
110441
+ * @member {Array.<TW.Solana.Proto.IPubkeySignature>} signatures
110442
+ * @memberof TW.Solana.Proto.RawMessage
110443
+ * @instance
110444
+ */
110445
+ RawMessage.prototype.signatures = $util.emptyArray;
110446
+
110447
+ /**
110448
+ * RawMessage legacy.
110449
+ * @member {TW.Solana.Proto.RawMessage.IMessageLegacy|null|undefined} legacy
110450
+ * @memberof TW.Solana.Proto.RawMessage
110451
+ * @instance
110452
+ */
110453
+ RawMessage.prototype.legacy = null;
110454
+
110455
+ /**
110456
+ * RawMessage v0.
110457
+ * @member {TW.Solana.Proto.RawMessage.IMessageV0|null|undefined} v0
110458
+ * @memberof TW.Solana.Proto.RawMessage
110459
+ * @instance
110460
+ */
110461
+ RawMessage.prototype.v0 = null;
110462
+
110463
+ // OneOf field names bound to virtual getters and setters
110464
+ var $oneOfFields;
110465
+
110466
+ /**
110467
+ * RawMessage message.
110468
+ * @member {"legacy"|"v0"|undefined} message
110469
+ * @memberof TW.Solana.Proto.RawMessage
110470
+ * @instance
110471
+ */
110472
+ Object.defineProperty(RawMessage.prototype, "message", {
110473
+ get: $util.oneOfGetter($oneOfFields = ["legacy", "v0"]),
110474
+ set: $util.oneOfSetter($oneOfFields)
110475
+ });
110476
+
110477
+ /**
110478
+ * Creates a new RawMessage instance using the specified properties.
110479
+ * @function create
110480
+ * @memberof TW.Solana.Proto.RawMessage
110481
+ * @static
110482
+ * @param {TW.Solana.Proto.IRawMessage=} [properties] Properties to set
110483
+ * @returns {TW.Solana.Proto.RawMessage} RawMessage instance
110484
+ */
110485
+ RawMessage.create = function create(properties) {
110486
+ return new RawMessage(properties);
110487
+ };
110488
+
110489
+ /**
110490
+ * Encodes the specified RawMessage message. Does not implicitly {@link TW.Solana.Proto.RawMessage.verify|verify} messages.
110491
+ * @function encode
110492
+ * @memberof TW.Solana.Proto.RawMessage
110493
+ * @static
110494
+ * @param {TW.Solana.Proto.IRawMessage} message RawMessage message or plain object to encode
110495
+ * @param {$protobuf.Writer} [writer] Writer to encode to
110496
+ * @returns {$protobuf.Writer} Writer
110497
+ */
110498
+ RawMessage.encode = function encode(message, writer) {
110499
+ if (!writer)
110500
+ writer = $Writer.create();
110501
+ if (message.signatures != null && message.signatures.length)
110502
+ for (var i = 0; i < message.signatures.length; ++i)
110503
+ $root.TW.Solana.Proto.PubkeySignature.encode(message.signatures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
110504
+ if (message.legacy != null && Object.hasOwnProperty.call(message, "legacy"))
110505
+ $root.TW.Solana.Proto.RawMessage.MessageLegacy.encode(message.legacy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
110506
+ if (message.v0 != null && Object.hasOwnProperty.call(message, "v0"))
110507
+ $root.TW.Solana.Proto.RawMessage.MessageV0.encode(message.v0, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
110508
+ return writer;
110509
+ };
110510
+
110511
+ /**
110512
+ * Decodes a RawMessage message from the specified reader or buffer.
110513
+ * @function decode
110514
+ * @memberof TW.Solana.Proto.RawMessage
110515
+ * @static
110516
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
110517
+ * @param {number} [length] Message length if known beforehand
110518
+ * @returns {TW.Solana.Proto.RawMessage} RawMessage
110519
+ * @throws {Error} If the payload is not a reader or valid buffer
110520
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
110521
+ */
110522
+ RawMessage.decode = function decode(reader, length) {
110523
+ if (!(reader instanceof $Reader))
110524
+ reader = $Reader.create(reader);
110525
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage();
110526
+ while (reader.pos < end) {
110527
+ var tag = reader.uint32();
110528
+ switch (tag >>> 3) {
110529
+ case 1:
110530
+ if (!(message.signatures && message.signatures.length))
110531
+ message.signatures = [];
110532
+ message.signatures.push($root.TW.Solana.Proto.PubkeySignature.decode(reader, reader.uint32()));
110533
+ break;
110534
+ case 2:
110535
+ message.legacy = $root.TW.Solana.Proto.RawMessage.MessageLegacy.decode(reader, reader.uint32());
110536
+ break;
110537
+ case 3:
110538
+ message.v0 = $root.TW.Solana.Proto.RawMessage.MessageV0.decode(reader, reader.uint32());
110539
+ break;
110540
+ default:
110541
+ reader.skipType(tag & 7);
110542
+ break;
110543
+ }
110544
+ }
110545
+ return message;
110546
+ };
110547
+
110548
+ /**
110549
+ * Verifies a RawMessage message.
110550
+ * @function verify
110551
+ * @memberof TW.Solana.Proto.RawMessage
110552
+ * @static
110553
+ * @param {Object.<string,*>} message Plain object to verify
110554
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
110555
+ */
110556
+ RawMessage.verify = function verify(message) {
110557
+ if (typeof message !== "object" || message === null)
110558
+ return "object expected";
110559
+ var properties = {};
110560
+ if (message.signatures != null && message.hasOwnProperty("signatures")) {
110561
+ if (!Array.isArray(message.signatures))
110562
+ return "signatures: array expected";
110563
+ for (var i = 0; i < message.signatures.length; ++i) {
110564
+ var error = $root.TW.Solana.Proto.PubkeySignature.verify(message.signatures[i]);
110565
+ if (error)
110566
+ return "signatures." + error;
110567
+ }
110568
+ }
110569
+ if (message.legacy != null && message.hasOwnProperty("legacy")) {
110570
+ properties.message = 1;
110571
+ {
110572
+ var error = $root.TW.Solana.Proto.RawMessage.MessageLegacy.verify(message.legacy);
110573
+ if (error)
110574
+ return "legacy." + error;
110575
+ }
110576
+ }
110577
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
110578
+ if (properties.message === 1)
110579
+ return "message: multiple values";
110580
+ properties.message = 1;
110581
+ {
110582
+ var error = $root.TW.Solana.Proto.RawMessage.MessageV0.verify(message.v0);
110583
+ if (error)
110584
+ return "v0." + error;
110585
+ }
110586
+ }
110587
+ return null;
110588
+ };
110589
+
110590
+ /**
110591
+ * Creates a RawMessage message from a plain object. Also converts values to their respective internal types.
110592
+ * @function fromObject
110593
+ * @memberof TW.Solana.Proto.RawMessage
110594
+ * @static
110595
+ * @param {Object.<string,*>} object Plain object
110596
+ * @returns {TW.Solana.Proto.RawMessage} RawMessage
110597
+ */
110598
+ RawMessage.fromObject = function fromObject(object) {
110599
+ if (object instanceof $root.TW.Solana.Proto.RawMessage)
110600
+ return object;
110601
+ var message = new $root.TW.Solana.Proto.RawMessage();
110602
+ if (object.signatures) {
110603
+ if (!Array.isArray(object.signatures))
110604
+ throw TypeError(".TW.Solana.Proto.RawMessage.signatures: array expected");
110605
+ message.signatures = [];
110606
+ for (var i = 0; i < object.signatures.length; ++i) {
110607
+ if (typeof object.signatures[i] !== "object")
110608
+ throw TypeError(".TW.Solana.Proto.RawMessage.signatures: object expected");
110609
+ message.signatures[i] = $root.TW.Solana.Proto.PubkeySignature.fromObject(object.signatures[i]);
110610
+ }
110611
+ }
110612
+ if (object.legacy != null) {
110613
+ if (typeof object.legacy !== "object")
110614
+ throw TypeError(".TW.Solana.Proto.RawMessage.legacy: object expected");
110615
+ message.legacy = $root.TW.Solana.Proto.RawMessage.MessageLegacy.fromObject(object.legacy);
110616
+ }
110617
+ if (object.v0 != null) {
110618
+ if (typeof object.v0 !== "object")
110619
+ throw TypeError(".TW.Solana.Proto.RawMessage.v0: object expected");
110620
+ message.v0 = $root.TW.Solana.Proto.RawMessage.MessageV0.fromObject(object.v0);
110621
+ }
110622
+ return message;
110623
+ };
110624
+
110625
+ /**
110626
+ * Creates a plain object from a RawMessage message. Also converts values to other types if specified.
110627
+ * @function toObject
110628
+ * @memberof TW.Solana.Proto.RawMessage
110629
+ * @static
110630
+ * @param {TW.Solana.Proto.RawMessage} message RawMessage
110631
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
110632
+ * @returns {Object.<string,*>} Plain object
110633
+ */
110634
+ RawMessage.toObject = function toObject(message, options) {
110635
+ if (!options)
110636
+ options = {};
110637
+ var object = {};
110638
+ if (options.arrays || options.defaults)
110639
+ object.signatures = [];
110640
+ if (message.signatures && message.signatures.length) {
110641
+ object.signatures = [];
110642
+ for (var j = 0; j < message.signatures.length; ++j)
110643
+ object.signatures[j] = $root.TW.Solana.Proto.PubkeySignature.toObject(message.signatures[j], options);
110644
+ }
110645
+ if (message.legacy != null && message.hasOwnProperty("legacy")) {
110646
+ object.legacy = $root.TW.Solana.Proto.RawMessage.MessageLegacy.toObject(message.legacy, options);
110647
+ if (options.oneofs)
110648
+ object.message = "legacy";
110649
+ }
110650
+ if (message.v0 != null && message.hasOwnProperty("v0")) {
110651
+ object.v0 = $root.TW.Solana.Proto.RawMessage.MessageV0.toObject(message.v0, options);
110652
+ if (options.oneofs)
110653
+ object.message = "v0";
110654
+ }
110655
+ return object;
110656
+ };
110657
+
110658
+ /**
110659
+ * Converts this RawMessage to JSON.
110660
+ * @function toJSON
110661
+ * @memberof TW.Solana.Proto.RawMessage
110662
+ * @instance
110663
+ * @returns {Object.<string,*>} JSON object
110664
+ */
110665
+ RawMessage.prototype.toJSON = function toJSON() {
110666
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
110667
+ };
110668
+
110669
+ RawMessage.MessageHeader = (function() {
110670
+
110671
+ /**
110672
+ * Properties of a MessageHeader.
110673
+ * @memberof TW.Solana.Proto.RawMessage
110674
+ * @interface IMessageHeader
110675
+ * @property {number|null} [numRequiredSignatures] MessageHeader numRequiredSignatures
110676
+ * @property {number|null} [numReadonlySignedAccounts] MessageHeader numReadonlySignedAccounts
110677
+ * @property {number|null} [numReadonlyUnsignedAccounts] MessageHeader numReadonlyUnsignedAccounts
110678
+ */
110679
+
110680
+ /**
110681
+ * Constructs a new MessageHeader.
110682
+ * @memberof TW.Solana.Proto.RawMessage
110683
+ * @classdesc Represents a MessageHeader.
110684
+ * @implements IMessageHeader
110685
+ * @constructor
110686
+ * @param {TW.Solana.Proto.RawMessage.IMessageHeader=} [properties] Properties to set
110687
+ */
110688
+ function MessageHeader(properties) {
110689
+ if (properties)
110690
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
110691
+ if (properties[keys[i]] != null)
110692
+ this[keys[i]] = properties[keys[i]];
110693
+ }
110694
+
110695
+ /**
110696
+ * MessageHeader numRequiredSignatures.
110697
+ * @member {number} numRequiredSignatures
110698
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110699
+ * @instance
110700
+ */
110701
+ MessageHeader.prototype.numRequiredSignatures = 0;
110702
+
110703
+ /**
110704
+ * MessageHeader numReadonlySignedAccounts.
110705
+ * @member {number} numReadonlySignedAccounts
110706
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110707
+ * @instance
110708
+ */
110709
+ MessageHeader.prototype.numReadonlySignedAccounts = 0;
110710
+
110711
+ /**
110712
+ * MessageHeader numReadonlyUnsignedAccounts.
110713
+ * @member {number} numReadonlyUnsignedAccounts
110714
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110715
+ * @instance
110716
+ */
110717
+ MessageHeader.prototype.numReadonlyUnsignedAccounts = 0;
110718
+
110719
+ /**
110720
+ * Creates a new MessageHeader instance using the specified properties.
110721
+ * @function create
110722
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110723
+ * @static
110724
+ * @param {TW.Solana.Proto.RawMessage.IMessageHeader=} [properties] Properties to set
110725
+ * @returns {TW.Solana.Proto.RawMessage.MessageHeader} MessageHeader instance
110726
+ */
110727
+ MessageHeader.create = function create(properties) {
110728
+ return new MessageHeader(properties);
110729
+ };
110730
+
110731
+ /**
110732
+ * Encodes the specified MessageHeader message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageHeader.verify|verify} messages.
110733
+ * @function encode
110734
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110735
+ * @static
110736
+ * @param {TW.Solana.Proto.RawMessage.IMessageHeader} message MessageHeader message or plain object to encode
110737
+ * @param {$protobuf.Writer} [writer] Writer to encode to
110738
+ * @returns {$protobuf.Writer} Writer
110739
+ */
110740
+ MessageHeader.encode = function encode(message, writer) {
110741
+ if (!writer)
110742
+ writer = $Writer.create();
110743
+ if (message.numRequiredSignatures != null && Object.hasOwnProperty.call(message, "numRequiredSignatures"))
110744
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.numRequiredSignatures);
110745
+ if (message.numReadonlySignedAccounts != null && Object.hasOwnProperty.call(message, "numReadonlySignedAccounts"))
110746
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.numReadonlySignedAccounts);
110747
+ if (message.numReadonlyUnsignedAccounts != null && Object.hasOwnProperty.call(message, "numReadonlyUnsignedAccounts"))
110748
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.numReadonlyUnsignedAccounts);
110749
+ return writer;
110750
+ };
110751
+
110752
+ /**
110753
+ * Decodes a MessageHeader message from the specified reader or buffer.
110754
+ * @function decode
110755
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110756
+ * @static
110757
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
110758
+ * @param {number} [length] Message length if known beforehand
110759
+ * @returns {TW.Solana.Proto.RawMessage.MessageHeader} MessageHeader
110760
+ * @throws {Error} If the payload is not a reader or valid buffer
110761
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
110762
+ */
110763
+ MessageHeader.decode = function decode(reader, length) {
110764
+ if (!(reader instanceof $Reader))
110765
+ reader = $Reader.create(reader);
110766
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageHeader();
110767
+ while (reader.pos < end) {
110768
+ var tag = reader.uint32();
110769
+ switch (tag >>> 3) {
110770
+ case 1:
110771
+ message.numRequiredSignatures = reader.uint32();
110772
+ break;
110773
+ case 2:
110774
+ message.numReadonlySignedAccounts = reader.uint32();
110775
+ break;
110776
+ case 3:
110777
+ message.numReadonlyUnsignedAccounts = reader.uint32();
110778
+ break;
110779
+ default:
110780
+ reader.skipType(tag & 7);
110781
+ break;
110782
+ }
110783
+ }
110784
+ return message;
110785
+ };
110786
+
110787
+ /**
110788
+ * Verifies a MessageHeader message.
110789
+ * @function verify
110790
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110791
+ * @static
110792
+ * @param {Object.<string,*>} message Plain object to verify
110793
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
110794
+ */
110795
+ MessageHeader.verify = function verify(message) {
110796
+ if (typeof message !== "object" || message === null)
110797
+ return "object expected";
110798
+ if (message.numRequiredSignatures != null && message.hasOwnProperty("numRequiredSignatures"))
110799
+ if (!$util.isInteger(message.numRequiredSignatures))
110800
+ return "numRequiredSignatures: integer expected";
110801
+ if (message.numReadonlySignedAccounts != null && message.hasOwnProperty("numReadonlySignedAccounts"))
110802
+ if (!$util.isInteger(message.numReadonlySignedAccounts))
110803
+ return "numReadonlySignedAccounts: integer expected";
110804
+ if (message.numReadonlyUnsignedAccounts != null && message.hasOwnProperty("numReadonlyUnsignedAccounts"))
110805
+ if (!$util.isInteger(message.numReadonlyUnsignedAccounts))
110806
+ return "numReadonlyUnsignedAccounts: integer expected";
110807
+ return null;
110808
+ };
110809
+
110810
+ /**
110811
+ * Creates a MessageHeader message from a plain object. Also converts values to their respective internal types.
110812
+ * @function fromObject
110813
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110814
+ * @static
110815
+ * @param {Object.<string,*>} object Plain object
110816
+ * @returns {TW.Solana.Proto.RawMessage.MessageHeader} MessageHeader
110817
+ */
110818
+ MessageHeader.fromObject = function fromObject(object) {
110819
+ if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageHeader)
110820
+ return object;
110821
+ var message = new $root.TW.Solana.Proto.RawMessage.MessageHeader();
110822
+ if (object.numRequiredSignatures != null)
110823
+ message.numRequiredSignatures = object.numRequiredSignatures >>> 0;
110824
+ if (object.numReadonlySignedAccounts != null)
110825
+ message.numReadonlySignedAccounts = object.numReadonlySignedAccounts >>> 0;
110826
+ if (object.numReadonlyUnsignedAccounts != null)
110827
+ message.numReadonlyUnsignedAccounts = object.numReadonlyUnsignedAccounts >>> 0;
110828
+ return message;
110829
+ };
110830
+
110831
+ /**
110832
+ * Creates a plain object from a MessageHeader message. Also converts values to other types if specified.
110833
+ * @function toObject
110834
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110835
+ * @static
110836
+ * @param {TW.Solana.Proto.RawMessage.MessageHeader} message MessageHeader
110837
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
110838
+ * @returns {Object.<string,*>} Plain object
110839
+ */
110840
+ MessageHeader.toObject = function toObject(message, options) {
110841
+ if (!options)
110842
+ options = {};
110843
+ var object = {};
110844
+ if (options.defaults) {
110845
+ object.numRequiredSignatures = 0;
110846
+ object.numReadonlySignedAccounts = 0;
110847
+ object.numReadonlyUnsignedAccounts = 0;
110848
+ }
110849
+ if (message.numRequiredSignatures != null && message.hasOwnProperty("numRequiredSignatures"))
110850
+ object.numRequiredSignatures = message.numRequiredSignatures;
110851
+ if (message.numReadonlySignedAccounts != null && message.hasOwnProperty("numReadonlySignedAccounts"))
110852
+ object.numReadonlySignedAccounts = message.numReadonlySignedAccounts;
110853
+ if (message.numReadonlyUnsignedAccounts != null && message.hasOwnProperty("numReadonlyUnsignedAccounts"))
110854
+ object.numReadonlyUnsignedAccounts = message.numReadonlyUnsignedAccounts;
110855
+ return object;
110856
+ };
110857
+
110858
+ /**
110859
+ * Converts this MessageHeader to JSON.
110860
+ * @function toJSON
110861
+ * @memberof TW.Solana.Proto.RawMessage.MessageHeader
110862
+ * @instance
110863
+ * @returns {Object.<string,*>} JSON object
110864
+ */
110865
+ MessageHeader.prototype.toJSON = function toJSON() {
110866
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
110867
+ };
110868
+
110869
+ return MessageHeader;
110870
+ })();
110871
+
110872
+ RawMessage.Instruction = (function() {
110873
+
110874
+ /**
110875
+ * Properties of an Instruction.
110876
+ * @memberof TW.Solana.Proto.RawMessage
110877
+ * @interface IInstruction
110878
+ * @property {number|null} [programId] Instruction programId
110879
+ * @property {Array.<number>|null} [accounts] Instruction accounts
110880
+ * @property {Uint8Array|null} [programData] Instruction programData
110881
+ */
110882
+
110883
+ /**
110884
+ * Constructs a new Instruction.
110885
+ * @memberof TW.Solana.Proto.RawMessage
110886
+ * @classdesc Represents an Instruction.
110887
+ * @implements IInstruction
110888
+ * @constructor
110889
+ * @param {TW.Solana.Proto.RawMessage.IInstruction=} [properties] Properties to set
110890
+ */
110891
+ function Instruction(properties) {
110892
+ this.accounts = [];
110893
+ if (properties)
110894
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
110895
+ if (properties[keys[i]] != null)
110896
+ this[keys[i]] = properties[keys[i]];
110897
+ }
110898
+
110899
+ /**
110900
+ * Instruction programId.
110901
+ * @member {number} programId
110902
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
110903
+ * @instance
110904
+ */
110905
+ Instruction.prototype.programId = 0;
110906
+
110907
+ /**
110908
+ * Instruction accounts.
110909
+ * @member {Array.<number>} accounts
110910
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
110911
+ * @instance
110912
+ */
110913
+ Instruction.prototype.accounts = $util.emptyArray;
110914
+
110915
+ /**
110916
+ * Instruction programData.
110917
+ * @member {Uint8Array} programData
110918
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
110919
+ * @instance
110920
+ */
110921
+ Instruction.prototype.programData = $util.newBuffer([]);
110922
+
110923
+ /**
110924
+ * Creates a new Instruction instance using the specified properties.
110925
+ * @function create
110926
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
110927
+ * @static
110928
+ * @param {TW.Solana.Proto.RawMessage.IInstruction=} [properties] Properties to set
110929
+ * @returns {TW.Solana.Proto.RawMessage.Instruction} Instruction instance
110930
+ */
110931
+ Instruction.create = function create(properties) {
110932
+ return new Instruction(properties);
110933
+ };
110934
+
110935
+ /**
110936
+ * Encodes the specified Instruction message. Does not implicitly {@link TW.Solana.Proto.RawMessage.Instruction.verify|verify} messages.
110937
+ * @function encode
110938
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
110939
+ * @static
110940
+ * @param {TW.Solana.Proto.RawMessage.IInstruction} message Instruction message or plain object to encode
110941
+ * @param {$protobuf.Writer} [writer] Writer to encode to
110942
+ * @returns {$protobuf.Writer} Writer
110943
+ */
110944
+ Instruction.encode = function encode(message, writer) {
110945
+ if (!writer)
110946
+ writer = $Writer.create();
110947
+ if (message.programId != null && Object.hasOwnProperty.call(message, "programId"))
110948
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.programId);
110949
+ if (message.accounts != null && message.accounts.length) {
110950
+ writer.uint32(/* id 2, wireType 2 =*/18).fork();
110951
+ for (var i = 0; i < message.accounts.length; ++i)
110952
+ writer.uint32(message.accounts[i]);
110953
+ writer.ldelim();
110954
+ }
110955
+ if (message.programData != null && Object.hasOwnProperty.call(message, "programData"))
110956
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.programData);
110957
+ return writer;
110958
+ };
110959
+
110960
+ /**
110961
+ * Decodes an Instruction message from the specified reader or buffer.
110962
+ * @function decode
110963
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
110964
+ * @static
110965
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
110966
+ * @param {number} [length] Message length if known beforehand
110967
+ * @returns {TW.Solana.Proto.RawMessage.Instruction} Instruction
110968
+ * @throws {Error} If the payload is not a reader or valid buffer
110969
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
110970
+ */
110971
+ Instruction.decode = function decode(reader, length) {
110972
+ if (!(reader instanceof $Reader))
110973
+ reader = $Reader.create(reader);
110974
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.Instruction();
110975
+ while (reader.pos < end) {
110976
+ var tag = reader.uint32();
110977
+ switch (tag >>> 3) {
110978
+ case 1:
110979
+ message.programId = reader.uint32();
110980
+ break;
110981
+ case 2:
110982
+ if (!(message.accounts && message.accounts.length))
110983
+ message.accounts = [];
110984
+ if ((tag & 7) === 2) {
110985
+ var end2 = reader.uint32() + reader.pos;
110986
+ while (reader.pos < end2)
110987
+ message.accounts.push(reader.uint32());
110988
+ } else
110989
+ message.accounts.push(reader.uint32());
110990
+ break;
110991
+ case 3:
110992
+ message.programData = reader.bytes();
110993
+ break;
110994
+ default:
110995
+ reader.skipType(tag & 7);
110996
+ break;
110997
+ }
110998
+ }
110999
+ return message;
111000
+ };
111001
+
111002
+ /**
111003
+ * Verifies an Instruction message.
111004
+ * @function verify
111005
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
111006
+ * @static
111007
+ * @param {Object.<string,*>} message Plain object to verify
111008
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
111009
+ */
111010
+ Instruction.verify = function verify(message) {
111011
+ if (typeof message !== "object" || message === null)
111012
+ return "object expected";
111013
+ if (message.programId != null && message.hasOwnProperty("programId"))
111014
+ if (!$util.isInteger(message.programId))
111015
+ return "programId: integer expected";
111016
+ if (message.accounts != null && message.hasOwnProperty("accounts")) {
111017
+ if (!Array.isArray(message.accounts))
111018
+ return "accounts: array expected";
111019
+ for (var i = 0; i < message.accounts.length; ++i)
111020
+ if (!$util.isInteger(message.accounts[i]))
111021
+ return "accounts: integer[] expected";
111022
+ }
111023
+ if (message.programData != null && message.hasOwnProperty("programData"))
111024
+ if (!(message.programData && typeof message.programData.length === "number" || $util.isString(message.programData)))
111025
+ return "programData: buffer expected";
111026
+ return null;
111027
+ };
111028
+
111029
+ /**
111030
+ * Creates an Instruction message from a plain object. Also converts values to their respective internal types.
111031
+ * @function fromObject
111032
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
111033
+ * @static
111034
+ * @param {Object.<string,*>} object Plain object
111035
+ * @returns {TW.Solana.Proto.RawMessage.Instruction} Instruction
111036
+ */
111037
+ Instruction.fromObject = function fromObject(object) {
111038
+ if (object instanceof $root.TW.Solana.Proto.RawMessage.Instruction)
111039
+ return object;
111040
+ var message = new $root.TW.Solana.Proto.RawMessage.Instruction();
111041
+ if (object.programId != null)
111042
+ message.programId = object.programId >>> 0;
111043
+ if (object.accounts) {
111044
+ if (!Array.isArray(object.accounts))
111045
+ throw TypeError(".TW.Solana.Proto.RawMessage.Instruction.accounts: array expected");
111046
+ message.accounts = [];
111047
+ for (var i = 0; i < object.accounts.length; ++i)
111048
+ message.accounts[i] = object.accounts[i] >>> 0;
111049
+ }
111050
+ if (object.programData != null)
111051
+ if (typeof object.programData === "string")
111052
+ $util.base64.decode(object.programData, message.programData = $util.newBuffer($util.base64.length(object.programData)), 0);
111053
+ else if (object.programData.length)
111054
+ message.programData = object.programData;
111055
+ return message;
111056
+ };
111057
+
111058
+ /**
111059
+ * Creates a plain object from an Instruction message. Also converts values to other types if specified.
111060
+ * @function toObject
111061
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
111062
+ * @static
111063
+ * @param {TW.Solana.Proto.RawMessage.Instruction} message Instruction
111064
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
111065
+ * @returns {Object.<string,*>} Plain object
111066
+ */
111067
+ Instruction.toObject = function toObject(message, options) {
111068
+ if (!options)
111069
+ options = {};
111070
+ var object = {};
111071
+ if (options.arrays || options.defaults)
111072
+ object.accounts = [];
111073
+ if (options.defaults) {
111074
+ object.programId = 0;
111075
+ if (options.bytes === String)
111076
+ object.programData = "";
111077
+ else {
111078
+ object.programData = [];
111079
+ if (options.bytes !== Array)
111080
+ object.programData = $util.newBuffer(object.programData);
111081
+ }
111082
+ }
111083
+ if (message.programId != null && message.hasOwnProperty("programId"))
111084
+ object.programId = message.programId;
111085
+ if (message.accounts && message.accounts.length) {
111086
+ object.accounts = [];
111087
+ for (var j = 0; j < message.accounts.length; ++j)
111088
+ object.accounts[j] = message.accounts[j];
111089
+ }
111090
+ if (message.programData != null && message.hasOwnProperty("programData"))
111091
+ object.programData = options.bytes === String ? $util.base64.encode(message.programData, 0, message.programData.length) : options.bytes === Array ? Array.prototype.slice.call(message.programData) : message.programData;
111092
+ return object;
111093
+ };
111094
+
111095
+ /**
111096
+ * Converts this Instruction to JSON.
111097
+ * @function toJSON
111098
+ * @memberof TW.Solana.Proto.RawMessage.Instruction
111099
+ * @instance
111100
+ * @returns {Object.<string,*>} JSON object
111101
+ */
111102
+ Instruction.prototype.toJSON = function toJSON() {
111103
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
111104
+ };
111105
+
111106
+ return Instruction;
111107
+ })();
111108
+
111109
+ RawMessage.MessageAddressTableLookup = (function() {
111110
+
111111
+ /**
111112
+ * Properties of a MessageAddressTableLookup.
111113
+ * @memberof TW.Solana.Proto.RawMessage
111114
+ * @interface IMessageAddressTableLookup
111115
+ * @property {string|null} [accountKey] MessageAddressTableLookup accountKey
111116
+ * @property {Array.<number>|null} [writableIndexes] MessageAddressTableLookup writableIndexes
111117
+ * @property {Array.<number>|null} [readonlyIndexes] MessageAddressTableLookup readonlyIndexes
111118
+ */
111119
+
111120
+ /**
111121
+ * Constructs a new MessageAddressTableLookup.
111122
+ * @memberof TW.Solana.Proto.RawMessage
111123
+ * @classdesc Represents a MessageAddressTableLookup.
111124
+ * @implements IMessageAddressTableLookup
111125
+ * @constructor
111126
+ * @param {TW.Solana.Proto.RawMessage.IMessageAddressTableLookup=} [properties] Properties to set
111127
+ */
111128
+ function MessageAddressTableLookup(properties) {
111129
+ this.writableIndexes = [];
111130
+ this.readonlyIndexes = [];
111131
+ if (properties)
111132
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
111133
+ if (properties[keys[i]] != null)
111134
+ this[keys[i]] = properties[keys[i]];
111135
+ }
111136
+
111137
+ /**
111138
+ * MessageAddressTableLookup accountKey.
111139
+ * @member {string} accountKey
111140
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111141
+ * @instance
111142
+ */
111143
+ MessageAddressTableLookup.prototype.accountKey = "";
111144
+
111145
+ /**
111146
+ * MessageAddressTableLookup writableIndexes.
111147
+ * @member {Array.<number>} writableIndexes
111148
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111149
+ * @instance
111150
+ */
111151
+ MessageAddressTableLookup.prototype.writableIndexes = $util.emptyArray;
111152
+
111153
+ /**
111154
+ * MessageAddressTableLookup readonlyIndexes.
111155
+ * @member {Array.<number>} readonlyIndexes
111156
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111157
+ * @instance
111158
+ */
111159
+ MessageAddressTableLookup.prototype.readonlyIndexes = $util.emptyArray;
111160
+
111161
+ /**
111162
+ * Creates a new MessageAddressTableLookup instance using the specified properties.
111163
+ * @function create
111164
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111165
+ * @static
111166
+ * @param {TW.Solana.Proto.RawMessage.IMessageAddressTableLookup=} [properties] Properties to set
111167
+ * @returns {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} MessageAddressTableLookup instance
111168
+ */
111169
+ MessageAddressTableLookup.create = function create(properties) {
111170
+ return new MessageAddressTableLookup(properties);
111171
+ };
111172
+
111173
+ /**
111174
+ * Encodes the specified MessageAddressTableLookup message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageAddressTableLookup.verify|verify} messages.
111175
+ * @function encode
111176
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111177
+ * @static
111178
+ * @param {TW.Solana.Proto.RawMessage.IMessageAddressTableLookup} message MessageAddressTableLookup message or plain object to encode
111179
+ * @param {$protobuf.Writer} [writer] Writer to encode to
111180
+ * @returns {$protobuf.Writer} Writer
111181
+ */
111182
+ MessageAddressTableLookup.encode = function encode(message, writer) {
111183
+ if (!writer)
111184
+ writer = $Writer.create();
111185
+ if (message.accountKey != null && Object.hasOwnProperty.call(message, "accountKey"))
111186
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountKey);
111187
+ if (message.writableIndexes != null && message.writableIndexes.length) {
111188
+ writer.uint32(/* id 2, wireType 2 =*/18).fork();
111189
+ for (var i = 0; i < message.writableIndexes.length; ++i)
111190
+ writer.uint32(message.writableIndexes[i]);
111191
+ writer.ldelim();
111192
+ }
111193
+ if (message.readonlyIndexes != null && message.readonlyIndexes.length) {
111194
+ writer.uint32(/* id 3, wireType 2 =*/26).fork();
111195
+ for (var i = 0; i < message.readonlyIndexes.length; ++i)
111196
+ writer.uint32(message.readonlyIndexes[i]);
111197
+ writer.ldelim();
111198
+ }
111199
+ return writer;
111200
+ };
111201
+
111202
+ /**
111203
+ * Decodes a MessageAddressTableLookup message from the specified reader or buffer.
111204
+ * @function decode
111205
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111206
+ * @static
111207
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
111208
+ * @param {number} [length] Message length if known beforehand
111209
+ * @returns {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} MessageAddressTableLookup
111210
+ * @throws {Error} If the payload is not a reader or valid buffer
111211
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
111212
+ */
111213
+ MessageAddressTableLookup.decode = function decode(reader, length) {
111214
+ if (!(reader instanceof $Reader))
111215
+ reader = $Reader.create(reader);
111216
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup();
111217
+ while (reader.pos < end) {
111218
+ var tag = reader.uint32();
111219
+ switch (tag >>> 3) {
111220
+ case 1:
111221
+ message.accountKey = reader.string();
111222
+ break;
111223
+ case 2:
111224
+ if (!(message.writableIndexes && message.writableIndexes.length))
111225
+ message.writableIndexes = [];
111226
+ if ((tag & 7) === 2) {
111227
+ var end2 = reader.uint32() + reader.pos;
111228
+ while (reader.pos < end2)
111229
+ message.writableIndexes.push(reader.uint32());
111230
+ } else
111231
+ message.writableIndexes.push(reader.uint32());
111232
+ break;
111233
+ case 3:
111234
+ if (!(message.readonlyIndexes && message.readonlyIndexes.length))
111235
+ message.readonlyIndexes = [];
111236
+ if ((tag & 7) === 2) {
111237
+ var end2 = reader.uint32() + reader.pos;
111238
+ while (reader.pos < end2)
111239
+ message.readonlyIndexes.push(reader.uint32());
111240
+ } else
111241
+ message.readonlyIndexes.push(reader.uint32());
111242
+ break;
111243
+ default:
111244
+ reader.skipType(tag & 7);
111245
+ break;
111246
+ }
111247
+ }
111248
+ return message;
111249
+ };
111250
+
111251
+ /**
111252
+ * Verifies a MessageAddressTableLookup message.
111253
+ * @function verify
111254
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111255
+ * @static
111256
+ * @param {Object.<string,*>} message Plain object to verify
111257
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
111258
+ */
111259
+ MessageAddressTableLookup.verify = function verify(message) {
111260
+ if (typeof message !== "object" || message === null)
111261
+ return "object expected";
111262
+ if (message.accountKey != null && message.hasOwnProperty("accountKey"))
111263
+ if (!$util.isString(message.accountKey))
111264
+ return "accountKey: string expected";
111265
+ if (message.writableIndexes != null && message.hasOwnProperty("writableIndexes")) {
111266
+ if (!Array.isArray(message.writableIndexes))
111267
+ return "writableIndexes: array expected";
111268
+ for (var i = 0; i < message.writableIndexes.length; ++i)
111269
+ if (!$util.isInteger(message.writableIndexes[i]))
111270
+ return "writableIndexes: integer[] expected";
111271
+ }
111272
+ if (message.readonlyIndexes != null && message.hasOwnProperty("readonlyIndexes")) {
111273
+ if (!Array.isArray(message.readonlyIndexes))
111274
+ return "readonlyIndexes: array expected";
111275
+ for (var i = 0; i < message.readonlyIndexes.length; ++i)
111276
+ if (!$util.isInteger(message.readonlyIndexes[i]))
111277
+ return "readonlyIndexes: integer[] expected";
111278
+ }
111279
+ return null;
111280
+ };
111281
+
111282
+ /**
111283
+ * Creates a MessageAddressTableLookup message from a plain object. Also converts values to their respective internal types.
111284
+ * @function fromObject
111285
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111286
+ * @static
111287
+ * @param {Object.<string,*>} object Plain object
111288
+ * @returns {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} MessageAddressTableLookup
111289
+ */
111290
+ MessageAddressTableLookup.fromObject = function fromObject(object) {
111291
+ if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup)
111292
+ return object;
111293
+ var message = new $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup();
111294
+ if (object.accountKey != null)
111295
+ message.accountKey = String(object.accountKey);
111296
+ if (object.writableIndexes) {
111297
+ if (!Array.isArray(object.writableIndexes))
111298
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageAddressTableLookup.writableIndexes: array expected");
111299
+ message.writableIndexes = [];
111300
+ for (var i = 0; i < object.writableIndexes.length; ++i)
111301
+ message.writableIndexes[i] = object.writableIndexes[i] >>> 0;
111302
+ }
111303
+ if (object.readonlyIndexes) {
111304
+ if (!Array.isArray(object.readonlyIndexes))
111305
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageAddressTableLookup.readonlyIndexes: array expected");
111306
+ message.readonlyIndexes = [];
111307
+ for (var i = 0; i < object.readonlyIndexes.length; ++i)
111308
+ message.readonlyIndexes[i] = object.readonlyIndexes[i] >>> 0;
111309
+ }
111310
+ return message;
111311
+ };
111312
+
111313
+ /**
111314
+ * Creates a plain object from a MessageAddressTableLookup message. Also converts values to other types if specified.
111315
+ * @function toObject
111316
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111317
+ * @static
111318
+ * @param {TW.Solana.Proto.RawMessage.MessageAddressTableLookup} message MessageAddressTableLookup
111319
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
111320
+ * @returns {Object.<string,*>} Plain object
111321
+ */
111322
+ MessageAddressTableLookup.toObject = function toObject(message, options) {
111323
+ if (!options)
111324
+ options = {};
111325
+ var object = {};
111326
+ if (options.arrays || options.defaults) {
111327
+ object.writableIndexes = [];
111328
+ object.readonlyIndexes = [];
111329
+ }
111330
+ if (options.defaults)
111331
+ object.accountKey = "";
111332
+ if (message.accountKey != null && message.hasOwnProperty("accountKey"))
111333
+ object.accountKey = message.accountKey;
111334
+ if (message.writableIndexes && message.writableIndexes.length) {
111335
+ object.writableIndexes = [];
111336
+ for (var j = 0; j < message.writableIndexes.length; ++j)
111337
+ object.writableIndexes[j] = message.writableIndexes[j];
111338
+ }
111339
+ if (message.readonlyIndexes && message.readonlyIndexes.length) {
111340
+ object.readonlyIndexes = [];
111341
+ for (var j = 0; j < message.readonlyIndexes.length; ++j)
111342
+ object.readonlyIndexes[j] = message.readonlyIndexes[j];
111343
+ }
111344
+ return object;
111345
+ };
111346
+
111347
+ /**
111348
+ * Converts this MessageAddressTableLookup to JSON.
111349
+ * @function toJSON
111350
+ * @memberof TW.Solana.Proto.RawMessage.MessageAddressTableLookup
111351
+ * @instance
111352
+ * @returns {Object.<string,*>} JSON object
111353
+ */
111354
+ MessageAddressTableLookup.prototype.toJSON = function toJSON() {
111355
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
111356
+ };
111357
+
111358
+ return MessageAddressTableLookup;
111359
+ })();
111360
+
111361
+ RawMessage.MessageLegacy = (function() {
111362
+
111363
+ /**
111364
+ * Properties of a MessageLegacy.
111365
+ * @memberof TW.Solana.Proto.RawMessage
111366
+ * @interface IMessageLegacy
111367
+ * @property {TW.Solana.Proto.RawMessage.IMessageHeader|null} [header] MessageLegacy header
111368
+ * @property {Array.<string>|null} [accountKeys] MessageLegacy accountKeys
111369
+ * @property {string|null} [recentBlockhash] MessageLegacy recentBlockhash
111370
+ * @property {Array.<TW.Solana.Proto.RawMessage.IInstruction>|null} [instructions] MessageLegacy instructions
111371
+ */
111372
+
111373
+ /**
111374
+ * Constructs a new MessageLegacy.
111375
+ * @memberof TW.Solana.Proto.RawMessage
111376
+ * @classdesc Represents a MessageLegacy.
111377
+ * @implements IMessageLegacy
111378
+ * @constructor
111379
+ * @param {TW.Solana.Proto.RawMessage.IMessageLegacy=} [properties] Properties to set
111380
+ */
111381
+ function MessageLegacy(properties) {
111382
+ this.accountKeys = [];
111383
+ this.instructions = [];
111384
+ if (properties)
111385
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
111386
+ if (properties[keys[i]] != null)
111387
+ this[keys[i]] = properties[keys[i]];
111388
+ }
111389
+
111390
+ /**
111391
+ * MessageLegacy header.
111392
+ * @member {TW.Solana.Proto.RawMessage.IMessageHeader|null|undefined} header
111393
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111394
+ * @instance
111395
+ */
111396
+ MessageLegacy.prototype.header = null;
111397
+
111398
+ /**
111399
+ * MessageLegacy accountKeys.
111400
+ * @member {Array.<string>} accountKeys
111401
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111402
+ * @instance
111403
+ */
111404
+ MessageLegacy.prototype.accountKeys = $util.emptyArray;
111405
+
111406
+ /**
111407
+ * MessageLegacy recentBlockhash.
111408
+ * @member {string} recentBlockhash
111409
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111410
+ * @instance
111411
+ */
111412
+ MessageLegacy.prototype.recentBlockhash = "";
111413
+
111414
+ /**
111415
+ * MessageLegacy instructions.
111416
+ * @member {Array.<TW.Solana.Proto.RawMessage.IInstruction>} instructions
111417
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111418
+ * @instance
111419
+ */
111420
+ MessageLegacy.prototype.instructions = $util.emptyArray;
111421
+
111422
+ /**
111423
+ * Creates a new MessageLegacy instance using the specified properties.
111424
+ * @function create
111425
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111426
+ * @static
111427
+ * @param {TW.Solana.Proto.RawMessage.IMessageLegacy=} [properties] Properties to set
111428
+ * @returns {TW.Solana.Proto.RawMessage.MessageLegacy} MessageLegacy instance
111429
+ */
111430
+ MessageLegacy.create = function create(properties) {
111431
+ return new MessageLegacy(properties);
111432
+ };
111433
+
111434
+ /**
111435
+ * Encodes the specified MessageLegacy message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageLegacy.verify|verify} messages.
111436
+ * @function encode
111437
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111438
+ * @static
111439
+ * @param {TW.Solana.Proto.RawMessage.IMessageLegacy} message MessageLegacy message or plain object to encode
111440
+ * @param {$protobuf.Writer} [writer] Writer to encode to
111441
+ * @returns {$protobuf.Writer} Writer
111442
+ */
111443
+ MessageLegacy.encode = function encode(message, writer) {
111444
+ if (!writer)
111445
+ writer = $Writer.create();
111446
+ if (message.header != null && Object.hasOwnProperty.call(message, "header"))
111447
+ $root.TW.Solana.Proto.RawMessage.MessageHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
111448
+ if (message.accountKeys != null && message.accountKeys.length)
111449
+ for (var i = 0; i < message.accountKeys.length; ++i)
111450
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountKeys[i]);
111451
+ if (message.recentBlockhash != null && Object.hasOwnProperty.call(message, "recentBlockhash"))
111452
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.recentBlockhash);
111453
+ if (message.instructions != null && message.instructions.length)
111454
+ for (var i = 0; i < message.instructions.length; ++i)
111455
+ $root.TW.Solana.Proto.RawMessage.Instruction.encode(message.instructions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
111456
+ return writer;
111457
+ };
111458
+
111459
+ /**
111460
+ * Decodes a MessageLegacy message from the specified reader or buffer.
111461
+ * @function decode
111462
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111463
+ * @static
111464
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
111465
+ * @param {number} [length] Message length if known beforehand
111466
+ * @returns {TW.Solana.Proto.RawMessage.MessageLegacy} MessageLegacy
111467
+ * @throws {Error} If the payload is not a reader or valid buffer
111468
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
111469
+ */
111470
+ MessageLegacy.decode = function decode(reader, length) {
111471
+ if (!(reader instanceof $Reader))
111472
+ reader = $Reader.create(reader);
111473
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageLegacy();
111474
+ while (reader.pos < end) {
111475
+ var tag = reader.uint32();
111476
+ switch (tag >>> 3) {
111477
+ case 1:
111478
+ message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.decode(reader, reader.uint32());
111479
+ break;
111480
+ case 2:
111481
+ if (!(message.accountKeys && message.accountKeys.length))
111482
+ message.accountKeys = [];
111483
+ message.accountKeys.push(reader.string());
111484
+ break;
111485
+ case 3:
111486
+ message.recentBlockhash = reader.string();
111487
+ break;
111488
+ case 4:
111489
+ if (!(message.instructions && message.instructions.length))
111490
+ message.instructions = [];
111491
+ message.instructions.push($root.TW.Solana.Proto.RawMessage.Instruction.decode(reader, reader.uint32()));
111492
+ break;
111493
+ default:
111494
+ reader.skipType(tag & 7);
111495
+ break;
111496
+ }
111497
+ }
111498
+ return message;
111499
+ };
111500
+
111501
+ /**
111502
+ * Verifies a MessageLegacy message.
111503
+ * @function verify
111504
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111505
+ * @static
111506
+ * @param {Object.<string,*>} message Plain object to verify
111507
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
111508
+ */
111509
+ MessageLegacy.verify = function verify(message) {
111510
+ if (typeof message !== "object" || message === null)
111511
+ return "object expected";
111512
+ if (message.header != null && message.hasOwnProperty("header")) {
111513
+ var error = $root.TW.Solana.Proto.RawMessage.MessageHeader.verify(message.header);
111514
+ if (error)
111515
+ return "header." + error;
111516
+ }
111517
+ if (message.accountKeys != null && message.hasOwnProperty("accountKeys")) {
111518
+ if (!Array.isArray(message.accountKeys))
111519
+ return "accountKeys: array expected";
111520
+ for (var i = 0; i < message.accountKeys.length; ++i)
111521
+ if (!$util.isString(message.accountKeys[i]))
111522
+ return "accountKeys: string[] expected";
111523
+ }
111524
+ if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
111525
+ if (!$util.isString(message.recentBlockhash))
111526
+ return "recentBlockhash: string expected";
111527
+ if (message.instructions != null && message.hasOwnProperty("instructions")) {
111528
+ if (!Array.isArray(message.instructions))
111529
+ return "instructions: array expected";
111530
+ for (var i = 0; i < message.instructions.length; ++i) {
111531
+ var error = $root.TW.Solana.Proto.RawMessage.Instruction.verify(message.instructions[i]);
111532
+ if (error)
111533
+ return "instructions." + error;
111534
+ }
111535
+ }
111536
+ return null;
111537
+ };
111538
+
111539
+ /**
111540
+ * Creates a MessageLegacy message from a plain object. Also converts values to their respective internal types.
111541
+ * @function fromObject
111542
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111543
+ * @static
111544
+ * @param {Object.<string,*>} object Plain object
111545
+ * @returns {TW.Solana.Proto.RawMessage.MessageLegacy} MessageLegacy
111546
+ */
111547
+ MessageLegacy.fromObject = function fromObject(object) {
111548
+ if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageLegacy)
111549
+ return object;
111550
+ var message = new $root.TW.Solana.Proto.RawMessage.MessageLegacy();
111551
+ if (object.header != null) {
111552
+ if (typeof object.header !== "object")
111553
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.header: object expected");
111554
+ message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.fromObject(object.header);
111555
+ }
111556
+ if (object.accountKeys) {
111557
+ if (!Array.isArray(object.accountKeys))
111558
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.accountKeys: array expected");
111559
+ message.accountKeys = [];
111560
+ for (var i = 0; i < object.accountKeys.length; ++i)
111561
+ message.accountKeys[i] = String(object.accountKeys[i]);
111562
+ }
111563
+ if (object.recentBlockhash != null)
111564
+ message.recentBlockhash = String(object.recentBlockhash);
111565
+ if (object.instructions) {
111566
+ if (!Array.isArray(object.instructions))
111567
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.instructions: array expected");
111568
+ message.instructions = [];
111569
+ for (var i = 0; i < object.instructions.length; ++i) {
111570
+ if (typeof object.instructions[i] !== "object")
111571
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageLegacy.instructions: object expected");
111572
+ message.instructions[i] = $root.TW.Solana.Proto.RawMessage.Instruction.fromObject(object.instructions[i]);
111573
+ }
111574
+ }
111575
+ return message;
111576
+ };
111577
+
111578
+ /**
111579
+ * Creates a plain object from a MessageLegacy message. Also converts values to other types if specified.
111580
+ * @function toObject
111581
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111582
+ * @static
111583
+ * @param {TW.Solana.Proto.RawMessage.MessageLegacy} message MessageLegacy
111584
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
111585
+ * @returns {Object.<string,*>} Plain object
111586
+ */
111587
+ MessageLegacy.toObject = function toObject(message, options) {
111588
+ if (!options)
111589
+ options = {};
111590
+ var object = {};
111591
+ if (options.arrays || options.defaults) {
111592
+ object.accountKeys = [];
111593
+ object.instructions = [];
111594
+ }
111595
+ if (options.defaults) {
111596
+ object.header = null;
111597
+ object.recentBlockhash = "";
111598
+ }
111599
+ if (message.header != null && message.hasOwnProperty("header"))
111600
+ object.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.toObject(message.header, options);
111601
+ if (message.accountKeys && message.accountKeys.length) {
111602
+ object.accountKeys = [];
111603
+ for (var j = 0; j < message.accountKeys.length; ++j)
111604
+ object.accountKeys[j] = message.accountKeys[j];
111605
+ }
111606
+ if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
111607
+ object.recentBlockhash = message.recentBlockhash;
111608
+ if (message.instructions && message.instructions.length) {
111609
+ object.instructions = [];
111610
+ for (var j = 0; j < message.instructions.length; ++j)
111611
+ object.instructions[j] = $root.TW.Solana.Proto.RawMessage.Instruction.toObject(message.instructions[j], options);
111612
+ }
111613
+ return object;
111614
+ };
111615
+
111616
+ /**
111617
+ * Converts this MessageLegacy to JSON.
111618
+ * @function toJSON
111619
+ * @memberof TW.Solana.Proto.RawMessage.MessageLegacy
111620
+ * @instance
111621
+ * @returns {Object.<string,*>} JSON object
111622
+ */
111623
+ MessageLegacy.prototype.toJSON = function toJSON() {
111624
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
111625
+ };
111626
+
111627
+ return MessageLegacy;
111628
+ })();
111629
+
111630
+ RawMessage.MessageV0 = (function() {
111631
+
111632
+ /**
111633
+ * Properties of a MessageV0.
111634
+ * @memberof TW.Solana.Proto.RawMessage
111635
+ * @interface IMessageV0
111636
+ * @property {TW.Solana.Proto.RawMessage.IMessageHeader|null} [header] MessageV0 header
111637
+ * @property {Array.<string>|null} [accountKeys] MessageV0 accountKeys
111638
+ * @property {string|null} [recentBlockhash] MessageV0 recentBlockhash
111639
+ * @property {Array.<TW.Solana.Proto.RawMessage.IInstruction>|null} [instructions] MessageV0 instructions
111640
+ * @property {Array.<TW.Solana.Proto.RawMessage.IMessageAddressTableLookup>|null} [addressTableLookups] MessageV0 addressTableLookups
111641
+ */
111642
+
111643
+ /**
111644
+ * Constructs a new MessageV0.
111645
+ * @memberof TW.Solana.Proto.RawMessage
111646
+ * @classdesc Represents a MessageV0.
111647
+ * @implements IMessageV0
111648
+ * @constructor
111649
+ * @param {TW.Solana.Proto.RawMessage.IMessageV0=} [properties] Properties to set
111650
+ */
111651
+ function MessageV0(properties) {
111652
+ this.accountKeys = [];
111653
+ this.instructions = [];
111654
+ this.addressTableLookups = [];
111655
+ if (properties)
111656
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
111657
+ if (properties[keys[i]] != null)
111658
+ this[keys[i]] = properties[keys[i]];
111659
+ }
111660
+
111661
+ /**
111662
+ * MessageV0 header.
111663
+ * @member {TW.Solana.Proto.RawMessage.IMessageHeader|null|undefined} header
111664
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111665
+ * @instance
111666
+ */
111667
+ MessageV0.prototype.header = null;
111668
+
111669
+ /**
111670
+ * MessageV0 accountKeys.
111671
+ * @member {Array.<string>} accountKeys
111672
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111673
+ * @instance
111674
+ */
111675
+ MessageV0.prototype.accountKeys = $util.emptyArray;
111676
+
111677
+ /**
111678
+ * MessageV0 recentBlockhash.
111679
+ * @member {string} recentBlockhash
111680
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111681
+ * @instance
111682
+ */
111683
+ MessageV0.prototype.recentBlockhash = "";
111684
+
111685
+ /**
111686
+ * MessageV0 instructions.
111687
+ * @member {Array.<TW.Solana.Proto.RawMessage.IInstruction>} instructions
111688
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111689
+ * @instance
111690
+ */
111691
+ MessageV0.prototype.instructions = $util.emptyArray;
111692
+
111693
+ /**
111694
+ * MessageV0 addressTableLookups.
111695
+ * @member {Array.<TW.Solana.Proto.RawMessage.IMessageAddressTableLookup>} addressTableLookups
111696
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111697
+ * @instance
111698
+ */
111699
+ MessageV0.prototype.addressTableLookups = $util.emptyArray;
111700
+
111701
+ /**
111702
+ * Creates a new MessageV0 instance using the specified properties.
111703
+ * @function create
111704
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111705
+ * @static
111706
+ * @param {TW.Solana.Proto.RawMessage.IMessageV0=} [properties] Properties to set
111707
+ * @returns {TW.Solana.Proto.RawMessage.MessageV0} MessageV0 instance
111708
+ */
111709
+ MessageV0.create = function create(properties) {
111710
+ return new MessageV0(properties);
111711
+ };
111712
+
111713
+ /**
111714
+ * Encodes the specified MessageV0 message. Does not implicitly {@link TW.Solana.Proto.RawMessage.MessageV0.verify|verify} messages.
111715
+ * @function encode
111716
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111717
+ * @static
111718
+ * @param {TW.Solana.Proto.RawMessage.IMessageV0} message MessageV0 message or plain object to encode
111719
+ * @param {$protobuf.Writer} [writer] Writer to encode to
111720
+ * @returns {$protobuf.Writer} Writer
111721
+ */
111722
+ MessageV0.encode = function encode(message, writer) {
111723
+ if (!writer)
111724
+ writer = $Writer.create();
111725
+ if (message.header != null && Object.hasOwnProperty.call(message, "header"))
111726
+ $root.TW.Solana.Proto.RawMessage.MessageHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
111727
+ if (message.accountKeys != null && message.accountKeys.length)
111728
+ for (var i = 0; i < message.accountKeys.length; ++i)
111729
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountKeys[i]);
111730
+ if (message.recentBlockhash != null && Object.hasOwnProperty.call(message, "recentBlockhash"))
111731
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.recentBlockhash);
111732
+ if (message.instructions != null && message.instructions.length)
111733
+ for (var i = 0; i < message.instructions.length; ++i)
111734
+ $root.TW.Solana.Proto.RawMessage.Instruction.encode(message.instructions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
111735
+ if (message.addressTableLookups != null && message.addressTableLookups.length)
111736
+ for (var i = 0; i < message.addressTableLookups.length; ++i)
111737
+ $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.encode(message.addressTableLookups[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
111738
+ return writer;
111739
+ };
111740
+
111741
+ /**
111742
+ * Decodes a MessageV0 message from the specified reader or buffer.
111743
+ * @function decode
111744
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111745
+ * @static
111746
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
111747
+ * @param {number} [length] Message length if known beforehand
111748
+ * @returns {TW.Solana.Proto.RawMessage.MessageV0} MessageV0
111749
+ * @throws {Error} If the payload is not a reader or valid buffer
111750
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
111751
+ */
111752
+ MessageV0.decode = function decode(reader, length) {
111753
+ if (!(reader instanceof $Reader))
111754
+ reader = $Reader.create(reader);
111755
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.RawMessage.MessageV0();
111756
+ while (reader.pos < end) {
111757
+ var tag = reader.uint32();
111758
+ switch (tag >>> 3) {
111759
+ case 1:
111760
+ message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.decode(reader, reader.uint32());
111761
+ break;
111762
+ case 2:
111763
+ if (!(message.accountKeys && message.accountKeys.length))
111764
+ message.accountKeys = [];
111765
+ message.accountKeys.push(reader.string());
111766
+ break;
111767
+ case 3:
111768
+ message.recentBlockhash = reader.string();
111769
+ break;
111770
+ case 4:
111771
+ if (!(message.instructions && message.instructions.length))
111772
+ message.instructions = [];
111773
+ message.instructions.push($root.TW.Solana.Proto.RawMessage.Instruction.decode(reader, reader.uint32()));
111774
+ break;
111775
+ case 5:
111776
+ if (!(message.addressTableLookups && message.addressTableLookups.length))
111777
+ message.addressTableLookups = [];
111778
+ message.addressTableLookups.push($root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.decode(reader, reader.uint32()));
111779
+ break;
111780
+ default:
111781
+ reader.skipType(tag & 7);
111782
+ break;
111783
+ }
111784
+ }
111785
+ return message;
111786
+ };
111787
+
111788
+ /**
111789
+ * Verifies a MessageV0 message.
111790
+ * @function verify
111791
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111792
+ * @static
111793
+ * @param {Object.<string,*>} message Plain object to verify
111794
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
111795
+ */
111796
+ MessageV0.verify = function verify(message) {
111797
+ if (typeof message !== "object" || message === null)
111798
+ return "object expected";
111799
+ if (message.header != null && message.hasOwnProperty("header")) {
111800
+ var error = $root.TW.Solana.Proto.RawMessage.MessageHeader.verify(message.header);
111801
+ if (error)
111802
+ return "header." + error;
111803
+ }
111804
+ if (message.accountKeys != null && message.hasOwnProperty("accountKeys")) {
111805
+ if (!Array.isArray(message.accountKeys))
111806
+ return "accountKeys: array expected";
111807
+ for (var i = 0; i < message.accountKeys.length; ++i)
111808
+ if (!$util.isString(message.accountKeys[i]))
111809
+ return "accountKeys: string[] expected";
111810
+ }
111811
+ if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
111812
+ if (!$util.isString(message.recentBlockhash))
111813
+ return "recentBlockhash: string expected";
111814
+ if (message.instructions != null && message.hasOwnProperty("instructions")) {
111815
+ if (!Array.isArray(message.instructions))
111816
+ return "instructions: array expected";
111817
+ for (var i = 0; i < message.instructions.length; ++i) {
111818
+ var error = $root.TW.Solana.Proto.RawMessage.Instruction.verify(message.instructions[i]);
111819
+ if (error)
111820
+ return "instructions." + error;
111821
+ }
111822
+ }
111823
+ if (message.addressTableLookups != null && message.hasOwnProperty("addressTableLookups")) {
111824
+ if (!Array.isArray(message.addressTableLookups))
111825
+ return "addressTableLookups: array expected";
111826
+ for (var i = 0; i < message.addressTableLookups.length; ++i) {
111827
+ var error = $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.verify(message.addressTableLookups[i]);
111828
+ if (error)
111829
+ return "addressTableLookups." + error;
111830
+ }
111831
+ }
111832
+ return null;
111833
+ };
111834
+
111835
+ /**
111836
+ * Creates a MessageV0 message from a plain object. Also converts values to their respective internal types.
111837
+ * @function fromObject
111838
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111839
+ * @static
111840
+ * @param {Object.<string,*>} object Plain object
111841
+ * @returns {TW.Solana.Proto.RawMessage.MessageV0} MessageV0
111842
+ */
111843
+ MessageV0.fromObject = function fromObject(object) {
111844
+ if (object instanceof $root.TW.Solana.Proto.RawMessage.MessageV0)
111845
+ return object;
111846
+ var message = new $root.TW.Solana.Proto.RawMessage.MessageV0();
111847
+ if (object.header != null) {
111848
+ if (typeof object.header !== "object")
111849
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.header: object expected");
111850
+ message.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.fromObject(object.header);
111851
+ }
111852
+ if (object.accountKeys) {
111853
+ if (!Array.isArray(object.accountKeys))
111854
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.accountKeys: array expected");
111855
+ message.accountKeys = [];
111856
+ for (var i = 0; i < object.accountKeys.length; ++i)
111857
+ message.accountKeys[i] = String(object.accountKeys[i]);
111858
+ }
111859
+ if (object.recentBlockhash != null)
111860
+ message.recentBlockhash = String(object.recentBlockhash);
111861
+ if (object.instructions) {
111862
+ if (!Array.isArray(object.instructions))
111863
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.instructions: array expected");
111864
+ message.instructions = [];
111865
+ for (var i = 0; i < object.instructions.length; ++i) {
111866
+ if (typeof object.instructions[i] !== "object")
111867
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.instructions: object expected");
111868
+ message.instructions[i] = $root.TW.Solana.Proto.RawMessage.Instruction.fromObject(object.instructions[i]);
111869
+ }
111870
+ }
111871
+ if (object.addressTableLookups) {
111872
+ if (!Array.isArray(object.addressTableLookups))
111873
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.addressTableLookups: array expected");
111874
+ message.addressTableLookups = [];
111875
+ for (var i = 0; i < object.addressTableLookups.length; ++i) {
111876
+ if (typeof object.addressTableLookups[i] !== "object")
111877
+ throw TypeError(".TW.Solana.Proto.RawMessage.MessageV0.addressTableLookups: object expected");
111878
+ message.addressTableLookups[i] = $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.fromObject(object.addressTableLookups[i]);
111879
+ }
111880
+ }
111881
+ return message;
111882
+ };
111883
+
111884
+ /**
111885
+ * Creates a plain object from a MessageV0 message. Also converts values to other types if specified.
111886
+ * @function toObject
111887
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111888
+ * @static
111889
+ * @param {TW.Solana.Proto.RawMessage.MessageV0} message MessageV0
111890
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
111891
+ * @returns {Object.<string,*>} Plain object
111892
+ */
111893
+ MessageV0.toObject = function toObject(message, options) {
111894
+ if (!options)
111895
+ options = {};
111896
+ var object = {};
111897
+ if (options.arrays || options.defaults) {
111898
+ object.accountKeys = [];
111899
+ object.instructions = [];
111900
+ object.addressTableLookups = [];
111901
+ }
111902
+ if (options.defaults) {
111903
+ object.header = null;
111904
+ object.recentBlockhash = "";
111905
+ }
111906
+ if (message.header != null && message.hasOwnProperty("header"))
111907
+ object.header = $root.TW.Solana.Proto.RawMessage.MessageHeader.toObject(message.header, options);
111908
+ if (message.accountKeys && message.accountKeys.length) {
111909
+ object.accountKeys = [];
111910
+ for (var j = 0; j < message.accountKeys.length; ++j)
111911
+ object.accountKeys[j] = message.accountKeys[j];
111912
+ }
111913
+ if (message.recentBlockhash != null && message.hasOwnProperty("recentBlockhash"))
111914
+ object.recentBlockhash = message.recentBlockhash;
111915
+ if (message.instructions && message.instructions.length) {
111916
+ object.instructions = [];
111917
+ for (var j = 0; j < message.instructions.length; ++j)
111918
+ object.instructions[j] = $root.TW.Solana.Proto.RawMessage.Instruction.toObject(message.instructions[j], options);
111919
+ }
111920
+ if (message.addressTableLookups && message.addressTableLookups.length) {
111921
+ object.addressTableLookups = [];
111922
+ for (var j = 0; j < message.addressTableLookups.length; ++j)
111923
+ object.addressTableLookups[j] = $root.TW.Solana.Proto.RawMessage.MessageAddressTableLookup.toObject(message.addressTableLookups[j], options);
111924
+ }
111925
+ return object;
111926
+ };
111927
+
111928
+ /**
111929
+ * Converts this MessageV0 to JSON.
111930
+ * @function toJSON
111931
+ * @memberof TW.Solana.Proto.RawMessage.MessageV0
111932
+ * @instance
111933
+ * @returns {Object.<string,*>} JSON object
111934
+ */
111935
+ MessageV0.prototype.toJSON = function toJSON() {
111936
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
111937
+ };
111938
+
111939
+ return MessageV0;
111940
+ })();
111941
+
111942
+ return RawMessage;
111943
+ })();
111944
+
111945
+ Proto.DecodingTransactionOutput = (function() {
111946
+
111947
+ /**
111948
+ * Properties of a DecodingTransactionOutput.
111949
+ * @memberof TW.Solana.Proto
111950
+ * @interface IDecodingTransactionOutput
111951
+ * @property {TW.Solana.Proto.IRawMessage|null} [transaction] DecodingTransactionOutput transaction
111952
+ * @property {TW.Common.Proto.SigningError|null} [error] DecodingTransactionOutput error
111953
+ * @property {string|null} [errorMessage] DecodingTransactionOutput errorMessage
111954
+ */
111955
+
111956
+ /**
111957
+ * Constructs a new DecodingTransactionOutput.
111958
+ * @memberof TW.Solana.Proto
111959
+ * @classdesc Represents a DecodingTransactionOutput.
111960
+ * @implements IDecodingTransactionOutput
111961
+ * @constructor
111962
+ * @param {TW.Solana.Proto.IDecodingTransactionOutput=} [properties] Properties to set
111963
+ */
111964
+ function DecodingTransactionOutput(properties) {
111965
+ if (properties)
111966
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
111967
+ if (properties[keys[i]] != null)
111968
+ this[keys[i]] = properties[keys[i]];
111969
+ }
111970
+
111971
+ /**
111972
+ * DecodingTransactionOutput transaction.
111973
+ * @member {TW.Solana.Proto.IRawMessage|null|undefined} transaction
111974
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
111975
+ * @instance
111976
+ */
111977
+ DecodingTransactionOutput.prototype.transaction = null;
111978
+
111979
+ /**
111980
+ * DecodingTransactionOutput error.
111981
+ * @member {TW.Common.Proto.SigningError} error
111982
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
111983
+ * @instance
111984
+ */
111985
+ DecodingTransactionOutput.prototype.error = 0;
111986
+
111987
+ /**
111988
+ * DecodingTransactionOutput errorMessage.
111989
+ * @member {string} errorMessage
111990
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
111991
+ * @instance
111992
+ */
111993
+ DecodingTransactionOutput.prototype.errorMessage = "";
111994
+
111995
+ /**
111996
+ * Creates a new DecodingTransactionOutput instance using the specified properties.
111997
+ * @function create
111998
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
111999
+ * @static
112000
+ * @param {TW.Solana.Proto.IDecodingTransactionOutput=} [properties] Properties to set
112001
+ * @returns {TW.Solana.Proto.DecodingTransactionOutput} DecodingTransactionOutput instance
112002
+ */
112003
+ DecodingTransactionOutput.create = function create(properties) {
112004
+ return new DecodingTransactionOutput(properties);
112005
+ };
112006
+
112007
+ /**
112008
+ * Encodes the specified DecodingTransactionOutput message. Does not implicitly {@link TW.Solana.Proto.DecodingTransactionOutput.verify|verify} messages.
112009
+ * @function encode
112010
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
112011
+ * @static
112012
+ * @param {TW.Solana.Proto.IDecodingTransactionOutput} message DecodingTransactionOutput message or plain object to encode
112013
+ * @param {$protobuf.Writer} [writer] Writer to encode to
112014
+ * @returns {$protobuf.Writer} Writer
112015
+ */
112016
+ DecodingTransactionOutput.encode = function encode(message, writer) {
112017
+ if (!writer)
112018
+ writer = $Writer.create();
112019
+ if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
112020
+ $root.TW.Solana.Proto.RawMessage.encode(message.transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
112021
+ if (message.error != null && Object.hasOwnProperty.call(message, "error"))
112022
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
112023
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
112024
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
112025
+ return writer;
112026
+ };
112027
+
112028
+ /**
112029
+ * Decodes a DecodingTransactionOutput message from the specified reader or buffer.
112030
+ * @function decode
112031
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
112032
+ * @static
112033
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
112034
+ * @param {number} [length] Message length if known beforehand
112035
+ * @returns {TW.Solana.Proto.DecodingTransactionOutput} DecodingTransactionOutput
112036
+ * @throws {Error} If the payload is not a reader or valid buffer
112037
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
112038
+ */
112039
+ DecodingTransactionOutput.decode = function decode(reader, length) {
112040
+ if (!(reader instanceof $Reader))
112041
+ reader = $Reader.create(reader);
112042
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.DecodingTransactionOutput();
112043
+ while (reader.pos < end) {
112044
+ var tag = reader.uint32();
112045
+ switch (tag >>> 3) {
112046
+ case 1:
112047
+ message.transaction = $root.TW.Solana.Proto.RawMessage.decode(reader, reader.uint32());
112048
+ break;
112049
+ case 2:
112050
+ message.error = reader.int32();
112051
+ break;
112052
+ case 3:
112053
+ message.errorMessage = reader.string();
112054
+ break;
112055
+ default:
112056
+ reader.skipType(tag & 7);
112057
+ break;
112058
+ }
112059
+ }
112060
+ return message;
112061
+ };
112062
+
112063
+ /**
112064
+ * Verifies a DecodingTransactionOutput message.
112065
+ * @function verify
112066
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
112067
+ * @static
112068
+ * @param {Object.<string,*>} message Plain object to verify
112069
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
112070
+ */
112071
+ DecodingTransactionOutput.verify = function verify(message) {
112072
+ if (typeof message !== "object" || message === null)
112073
+ return "object expected";
112074
+ if (message.transaction != null && message.hasOwnProperty("transaction")) {
112075
+ var error = $root.TW.Solana.Proto.RawMessage.verify(message.transaction);
112076
+ if (error)
112077
+ return "transaction." + error;
112078
+ }
112079
+ if (message.error != null && message.hasOwnProperty("error"))
112080
+ switch (message.error) {
112081
+ default:
112082
+ return "error: enum value expected";
112083
+ case 0:
112084
+ case 1:
112085
+ case 2:
112086
+ case 3:
112087
+ case 4:
112088
+ case 5:
112089
+ case 15:
112090
+ case 16:
112091
+ case 17:
112092
+ case 18:
112093
+ case 6:
112094
+ case 7:
112095
+ case 8:
112096
+ case 9:
112097
+ case 10:
112098
+ case 11:
112099
+ case 12:
112100
+ case 13:
112101
+ case 14:
112102
+ case 19:
112103
+ case 20:
112104
+ case 21:
112105
+ case 22:
112106
+ case 23:
112107
+ case 24:
112108
+ case 25:
112109
+ break;
112110
+ }
112111
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
112112
+ if (!$util.isString(message.errorMessage))
112113
+ return "errorMessage: string expected";
112114
+ return null;
112115
+ };
112116
+
112117
+ /**
112118
+ * Creates a DecodingTransactionOutput message from a plain object. Also converts values to their respective internal types.
112119
+ * @function fromObject
112120
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
112121
+ * @static
112122
+ * @param {Object.<string,*>} object Plain object
112123
+ * @returns {TW.Solana.Proto.DecodingTransactionOutput} DecodingTransactionOutput
112124
+ */
112125
+ DecodingTransactionOutput.fromObject = function fromObject(object) {
112126
+ if (object instanceof $root.TW.Solana.Proto.DecodingTransactionOutput)
112127
+ return object;
112128
+ var message = new $root.TW.Solana.Proto.DecodingTransactionOutput();
112129
+ if (object.transaction != null) {
112130
+ if (typeof object.transaction !== "object")
112131
+ throw TypeError(".TW.Solana.Proto.DecodingTransactionOutput.transaction: object expected");
112132
+ message.transaction = $root.TW.Solana.Proto.RawMessage.fromObject(object.transaction);
112133
+ }
112134
+ switch (object.error) {
112135
+ case "OK":
112136
+ case 0:
112137
+ message.error = 0;
112138
+ break;
112139
+ case "Error_general":
112140
+ case 1:
112141
+ message.error = 1;
112142
+ break;
112143
+ case "Error_internal":
112144
+ case 2:
112145
+ message.error = 2;
112146
+ break;
112147
+ case "Error_low_balance":
112148
+ case 3:
112149
+ message.error = 3;
112150
+ break;
112151
+ case "Error_zero_amount_requested":
112152
+ case 4:
112153
+ message.error = 4;
112154
+ break;
112155
+ case "Error_missing_private_key":
112156
+ case 5:
112157
+ message.error = 5;
112158
+ break;
112159
+ case "Error_invalid_private_key":
112160
+ case 15:
112161
+ message.error = 15;
112162
+ break;
112163
+ case "Error_invalid_address":
112164
+ case 16:
112165
+ message.error = 16;
112166
+ break;
112167
+ case "Error_invalid_utxo":
112168
+ case 17:
112169
+ message.error = 17;
112170
+ break;
112171
+ case "Error_invalid_utxo_amount":
112172
+ case 18:
112173
+ message.error = 18;
112174
+ break;
112175
+ case "Error_wrong_fee":
112176
+ case 6:
112177
+ message.error = 6;
112178
+ break;
112179
+ case "Error_signing":
112180
+ case 7:
112181
+ message.error = 7;
112182
+ break;
112183
+ case "Error_tx_too_big":
112184
+ case 8:
112185
+ message.error = 8;
112186
+ break;
112187
+ case "Error_missing_input_utxos":
112188
+ case 9:
112189
+ message.error = 9;
112190
+ break;
112191
+ case "Error_not_enough_utxos":
112192
+ case 10:
112193
+ message.error = 10;
112194
+ break;
112195
+ case "Error_script_redeem":
112196
+ case 11:
112197
+ message.error = 11;
112198
+ break;
112199
+ case "Error_script_output":
112200
+ case 12:
112201
+ message.error = 12;
112202
+ break;
112203
+ case "Error_script_witness_program":
112204
+ case 13:
112205
+ message.error = 13;
112206
+ break;
112207
+ case "Error_invalid_memo":
112208
+ case 14:
112209
+ message.error = 14;
112210
+ break;
112211
+ case "Error_input_parse":
112212
+ case 19:
112213
+ message.error = 19;
112214
+ break;
112215
+ case "Error_no_support_n2n":
112216
+ case 20:
112217
+ message.error = 20;
112218
+ break;
112219
+ case "Error_signatures_count":
112220
+ case 21:
112221
+ message.error = 21;
112222
+ break;
112223
+ case "Error_invalid_params":
112224
+ case 22:
112225
+ message.error = 22;
112226
+ break;
112227
+ case "Error_invalid_requested_token_amount":
112228
+ case 23:
112229
+ message.error = 23;
112230
+ break;
112231
+ case "Error_not_supported":
112232
+ case 24:
112233
+ message.error = 24;
112234
+ break;
112235
+ case "Error_dust_amount_requested":
112236
+ case 25:
112237
+ message.error = 25;
112238
+ break;
112239
+ }
112240
+ if (object.errorMessage != null)
112241
+ message.errorMessage = String(object.errorMessage);
112242
+ return message;
112243
+ };
112244
+
112245
+ /**
112246
+ * Creates a plain object from a DecodingTransactionOutput message. Also converts values to other types if specified.
112247
+ * @function toObject
112248
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
112249
+ * @static
112250
+ * @param {TW.Solana.Proto.DecodingTransactionOutput} message DecodingTransactionOutput
112251
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
112252
+ * @returns {Object.<string,*>} Plain object
112253
+ */
112254
+ DecodingTransactionOutput.toObject = function toObject(message, options) {
112255
+ if (!options)
112256
+ options = {};
112257
+ var object = {};
112258
+ if (options.defaults) {
112259
+ object.transaction = null;
112260
+ object.error = options.enums === String ? "OK" : 0;
112261
+ object.errorMessage = "";
112262
+ }
112263
+ if (message.transaction != null && message.hasOwnProperty("transaction"))
112264
+ object.transaction = $root.TW.Solana.Proto.RawMessage.toObject(message.transaction, options);
112265
+ if (message.error != null && message.hasOwnProperty("error"))
112266
+ object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
112267
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
112268
+ object.errorMessage = message.errorMessage;
112269
+ return object;
112270
+ };
112271
+
112272
+ /**
112273
+ * Converts this DecodingTransactionOutput to JSON.
112274
+ * @function toJSON
112275
+ * @memberof TW.Solana.Proto.DecodingTransactionOutput
112276
+ * @instance
112277
+ * @returns {Object.<string,*>} JSON object
112278
+ */
112279
+ DecodingTransactionOutput.prototype.toJSON = function toJSON() {
112280
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
112281
+ };
112282
+
112283
+ return DecodingTransactionOutput;
112284
+ })();
112285
+
112286
+ /**
112287
+ * Encoding enum.
112288
+ * @name TW.Solana.Proto.Encoding
112289
+ * @enum {number}
112290
+ * @property {number} Base58=0 Base58 value
112291
+ * @property {number} Base64=1 Base64 value
112292
+ */
112293
+ Proto.Encoding = (function() {
112294
+ var valuesById = {}, values = Object.create(valuesById);
112295
+ values[valuesById[0] = "Base58"] = 0;
112296
+ values[valuesById[1] = "Base64"] = 1;
112297
+ return values;
112298
+ })();
112299
+
112300
+ Proto.PriorityFeePrice = (function() {
112301
+
112302
+ /**
112303
+ * Properties of a PriorityFeePrice.
112304
+ * @memberof TW.Solana.Proto
112305
+ * @interface IPriorityFeePrice
112306
+ * @property {Long|null} [price] PriorityFeePrice price
112307
+ */
112308
+
112309
+ /**
112310
+ * Constructs a new PriorityFeePrice.
112311
+ * @memberof TW.Solana.Proto
112312
+ * @classdesc Represents a PriorityFeePrice.
112313
+ * @implements IPriorityFeePrice
112314
+ * @constructor
112315
+ * @param {TW.Solana.Proto.IPriorityFeePrice=} [properties] Properties to set
112316
+ */
112317
+ function PriorityFeePrice(properties) {
112318
+ if (properties)
112319
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
112320
+ if (properties[keys[i]] != null)
112321
+ this[keys[i]] = properties[keys[i]];
112322
+ }
112323
+
112324
+ /**
112325
+ * PriorityFeePrice price.
112326
+ * @member {Long} price
112327
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112328
+ * @instance
112329
+ */
112330
+ PriorityFeePrice.prototype.price = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
112331
+
112332
+ /**
112333
+ * Creates a new PriorityFeePrice instance using the specified properties.
112334
+ * @function create
112335
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112336
+ * @static
112337
+ * @param {TW.Solana.Proto.IPriorityFeePrice=} [properties] Properties to set
112338
+ * @returns {TW.Solana.Proto.PriorityFeePrice} PriorityFeePrice instance
112339
+ */
112340
+ PriorityFeePrice.create = function create(properties) {
112341
+ return new PriorityFeePrice(properties);
112342
+ };
112343
+
112344
+ /**
112345
+ * Encodes the specified PriorityFeePrice message. Does not implicitly {@link TW.Solana.Proto.PriorityFeePrice.verify|verify} messages.
112346
+ * @function encode
112347
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112348
+ * @static
112349
+ * @param {TW.Solana.Proto.IPriorityFeePrice} message PriorityFeePrice message or plain object to encode
112350
+ * @param {$protobuf.Writer} [writer] Writer to encode to
112351
+ * @returns {$protobuf.Writer} Writer
112352
+ */
112353
+ PriorityFeePrice.encode = function encode(message, writer) {
112354
+ if (!writer)
112355
+ writer = $Writer.create();
112356
+ if (message.price != null && Object.hasOwnProperty.call(message, "price"))
112357
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.price);
112358
+ return writer;
112359
+ };
112360
+
112361
+ /**
112362
+ * Decodes a PriorityFeePrice message from the specified reader or buffer.
112363
+ * @function decode
112364
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112365
+ * @static
112366
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
112367
+ * @param {number} [length] Message length if known beforehand
112368
+ * @returns {TW.Solana.Proto.PriorityFeePrice} PriorityFeePrice
112369
+ * @throws {Error} If the payload is not a reader or valid buffer
112370
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
112371
+ */
112372
+ PriorityFeePrice.decode = function decode(reader, length) {
112373
+ if (!(reader instanceof $Reader))
112374
+ reader = $Reader.create(reader);
112375
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PriorityFeePrice();
112376
+ while (reader.pos < end) {
112377
+ var tag = reader.uint32();
112378
+ switch (tag >>> 3) {
112379
+ case 1:
112380
+ message.price = reader.uint64();
112381
+ break;
112382
+ default:
112383
+ reader.skipType(tag & 7);
112384
+ break;
112385
+ }
112386
+ }
112387
+ return message;
112388
+ };
112389
+
112390
+ /**
112391
+ * Verifies a PriorityFeePrice message.
112392
+ * @function verify
112393
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112394
+ * @static
112395
+ * @param {Object.<string,*>} message Plain object to verify
112396
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
112397
+ */
112398
+ PriorityFeePrice.verify = function verify(message) {
112399
+ if (typeof message !== "object" || message === null)
112400
+ return "object expected";
112401
+ if (message.price != null && message.hasOwnProperty("price"))
112402
+ if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high)))
112403
+ return "price: integer|Long expected";
112404
+ return null;
112405
+ };
112406
+
112407
+ /**
112408
+ * Creates a PriorityFeePrice message from a plain object. Also converts values to their respective internal types.
112409
+ * @function fromObject
112410
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112411
+ * @static
112412
+ * @param {Object.<string,*>} object Plain object
112413
+ * @returns {TW.Solana.Proto.PriorityFeePrice} PriorityFeePrice
112414
+ */
112415
+ PriorityFeePrice.fromObject = function fromObject(object) {
112416
+ if (object instanceof $root.TW.Solana.Proto.PriorityFeePrice)
112417
+ return object;
112418
+ var message = new $root.TW.Solana.Proto.PriorityFeePrice();
112419
+ if (object.price != null)
112420
+ if ($util.Long)
112421
+ (message.price = $util.Long.fromValue(object.price)).unsigned = true;
112422
+ else if (typeof object.price === "string")
112423
+ message.price = parseInt(object.price, 10);
112424
+ else if (typeof object.price === "number")
112425
+ message.price = object.price;
112426
+ else if (typeof object.price === "object")
112427
+ message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(true);
112428
+ return message;
112429
+ };
112430
+
112431
+ /**
112432
+ * Creates a plain object from a PriorityFeePrice message. Also converts values to other types if specified.
112433
+ * @function toObject
112434
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112435
+ * @static
112436
+ * @param {TW.Solana.Proto.PriorityFeePrice} message PriorityFeePrice
112437
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
112438
+ * @returns {Object.<string,*>} Plain object
112439
+ */
112440
+ PriorityFeePrice.toObject = function toObject(message, options) {
112441
+ if (!options)
112442
+ options = {};
112443
+ var object = {};
112444
+ if (options.defaults)
112445
+ if ($util.Long) {
112446
+ var long = new $util.Long(0, 0, true);
112447
+ object.price = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
112448
+ } else
112449
+ object.price = options.longs === String ? "0" : 0;
112450
+ if (message.price != null && message.hasOwnProperty("price"))
112451
+ if (typeof message.price === "number")
112452
+ object.price = options.longs === String ? String(message.price) : message.price;
112453
+ else
112454
+ object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber(true) : message.price;
112455
+ return object;
112456
+ };
112457
+
112458
+ /**
112459
+ * Converts this PriorityFeePrice to JSON.
112460
+ * @function toJSON
112461
+ * @memberof TW.Solana.Proto.PriorityFeePrice
112462
+ * @instance
112463
+ * @returns {Object.<string,*>} JSON object
112464
+ */
112465
+ PriorityFeePrice.prototype.toJSON = function toJSON() {
112466
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
112467
+ };
112468
+
112469
+ return PriorityFeePrice;
112470
+ })();
112471
+
112472
+ Proto.PriorityFeeLimit = (function() {
112473
+
112474
+ /**
112475
+ * Properties of a PriorityFeeLimit.
112476
+ * @memberof TW.Solana.Proto
112477
+ * @interface IPriorityFeeLimit
112478
+ * @property {number|null} [limit] PriorityFeeLimit limit
112479
+ */
112480
+
112481
+ /**
112482
+ * Constructs a new PriorityFeeLimit.
112483
+ * @memberof TW.Solana.Proto
112484
+ * @classdesc Represents a PriorityFeeLimit.
112485
+ * @implements IPriorityFeeLimit
112486
+ * @constructor
112487
+ * @param {TW.Solana.Proto.IPriorityFeeLimit=} [properties] Properties to set
112488
+ */
112489
+ function PriorityFeeLimit(properties) {
112490
+ if (properties)
112491
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
112492
+ if (properties[keys[i]] != null)
112493
+ this[keys[i]] = properties[keys[i]];
112494
+ }
112495
+
112496
+ /**
112497
+ * PriorityFeeLimit limit.
112498
+ * @member {number} limit
112499
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112500
+ * @instance
112501
+ */
112502
+ PriorityFeeLimit.prototype.limit = 0;
112503
+
112504
+ /**
112505
+ * Creates a new PriorityFeeLimit instance using the specified properties.
112506
+ * @function create
112507
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112508
+ * @static
112509
+ * @param {TW.Solana.Proto.IPriorityFeeLimit=} [properties] Properties to set
112510
+ * @returns {TW.Solana.Proto.PriorityFeeLimit} PriorityFeeLimit instance
112511
+ */
112512
+ PriorityFeeLimit.create = function create(properties) {
112513
+ return new PriorityFeeLimit(properties);
112514
+ };
112515
+
112516
+ /**
112517
+ * Encodes the specified PriorityFeeLimit message. Does not implicitly {@link TW.Solana.Proto.PriorityFeeLimit.verify|verify} messages.
112518
+ * @function encode
112519
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112520
+ * @static
112521
+ * @param {TW.Solana.Proto.IPriorityFeeLimit} message PriorityFeeLimit message or plain object to encode
112522
+ * @param {$protobuf.Writer} [writer] Writer to encode to
112523
+ * @returns {$protobuf.Writer} Writer
112524
+ */
112525
+ PriorityFeeLimit.encode = function encode(message, writer) {
112526
+ if (!writer)
112527
+ writer = $Writer.create();
112528
+ if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
112529
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.limit);
112530
+ return writer;
112531
+ };
112532
+
112533
+ /**
112534
+ * Decodes a PriorityFeeLimit message from the specified reader or buffer.
112535
+ * @function decode
112536
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112537
+ * @static
112538
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
112539
+ * @param {number} [length] Message length if known beforehand
112540
+ * @returns {TW.Solana.Proto.PriorityFeeLimit} PriorityFeeLimit
112541
+ * @throws {Error} If the payload is not a reader or valid buffer
112542
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
112543
+ */
112544
+ PriorityFeeLimit.decode = function decode(reader, length) {
112545
+ if (!(reader instanceof $Reader))
112546
+ reader = $Reader.create(reader);
112547
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.PriorityFeeLimit();
112548
+ while (reader.pos < end) {
112549
+ var tag = reader.uint32();
112550
+ switch (tag >>> 3) {
112551
+ case 2:
112552
+ message.limit = reader.uint32();
112553
+ break;
112554
+ default:
112555
+ reader.skipType(tag & 7);
112556
+ break;
112557
+ }
112558
+ }
112559
+ return message;
112560
+ };
112561
+
112562
+ /**
112563
+ * Verifies a PriorityFeeLimit message.
112564
+ * @function verify
112565
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112566
+ * @static
112567
+ * @param {Object.<string,*>} message Plain object to verify
112568
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
112569
+ */
112570
+ PriorityFeeLimit.verify = function verify(message) {
112571
+ if (typeof message !== "object" || message === null)
112572
+ return "object expected";
112573
+ if (message.limit != null && message.hasOwnProperty("limit"))
112574
+ if (!$util.isInteger(message.limit))
112575
+ return "limit: integer expected";
112576
+ return null;
112577
+ };
112578
+
112579
+ /**
112580
+ * Creates a PriorityFeeLimit message from a plain object. Also converts values to their respective internal types.
112581
+ * @function fromObject
112582
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112583
+ * @static
112584
+ * @param {Object.<string,*>} object Plain object
112585
+ * @returns {TW.Solana.Proto.PriorityFeeLimit} PriorityFeeLimit
112586
+ */
112587
+ PriorityFeeLimit.fromObject = function fromObject(object) {
112588
+ if (object instanceof $root.TW.Solana.Proto.PriorityFeeLimit)
112589
+ return object;
112590
+ var message = new $root.TW.Solana.Proto.PriorityFeeLimit();
112591
+ if (object.limit != null)
112592
+ message.limit = object.limit >>> 0;
112593
+ return message;
112594
+ };
112595
+
112596
+ /**
112597
+ * Creates a plain object from a PriorityFeeLimit message. Also converts values to other types if specified.
112598
+ * @function toObject
112599
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112600
+ * @static
112601
+ * @param {TW.Solana.Proto.PriorityFeeLimit} message PriorityFeeLimit
112602
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
112603
+ * @returns {Object.<string,*>} Plain object
112604
+ */
112605
+ PriorityFeeLimit.toObject = function toObject(message, options) {
112606
+ if (!options)
112607
+ options = {};
112608
+ var object = {};
112609
+ if (options.defaults)
112610
+ object.limit = 0;
112611
+ if (message.limit != null && message.hasOwnProperty("limit"))
112612
+ object.limit = message.limit;
112613
+ return object;
112614
+ };
112615
+
112616
+ /**
112617
+ * Converts this PriorityFeeLimit to JSON.
112618
+ * @function toJSON
112619
+ * @memberof TW.Solana.Proto.PriorityFeeLimit
112620
+ * @instance
112621
+ * @returns {Object.<string,*>} JSON object
112622
+ */
112623
+ PriorityFeeLimit.prototype.toJSON = function toJSON() {
112624
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
112625
+ };
112626
+
112627
+ return PriorityFeeLimit;
112628
+ })();
112629
+
110231
112630
  Proto.SigningInput = (function() {
110232
112631
 
110233
112632
  /**
@@ -110253,6 +112652,10 @@
110253
112652
  * @property {string|null} [nonceAccount] SigningInput nonceAccount
110254
112653
  * @property {Uint8Array|null} [feePayerPrivateKey] SigningInput feePayerPrivateKey
110255
112654
  * @property {string|null} [feePayer] SigningInput feePayer
112655
+ * @property {TW.Solana.Proto.IRawMessage|null} [rawMessage] SigningInput rawMessage
112656
+ * @property {TW.Solana.Proto.Encoding|null} [txEncoding] SigningInput txEncoding
112657
+ * @property {TW.Solana.Proto.IPriorityFeePrice|null} [priorityFeePrice] SigningInput priorityFeePrice
112658
+ * @property {TW.Solana.Proto.IPriorityFeeLimit|null} [priorityFeeLimit] SigningInput priorityFeeLimit
110256
112659
  */
110257
112660
 
110258
112661
  /**
@@ -110422,6 +112825,38 @@
110422
112825
  */
110423
112826
  SigningInput.prototype.feePayer = "";
110424
112827
 
112828
+ /**
112829
+ * SigningInput rawMessage.
112830
+ * @member {TW.Solana.Proto.IRawMessage|null|undefined} rawMessage
112831
+ * @memberof TW.Solana.Proto.SigningInput
112832
+ * @instance
112833
+ */
112834
+ SigningInput.prototype.rawMessage = null;
112835
+
112836
+ /**
112837
+ * SigningInput txEncoding.
112838
+ * @member {TW.Solana.Proto.Encoding} txEncoding
112839
+ * @memberof TW.Solana.Proto.SigningInput
112840
+ * @instance
112841
+ */
112842
+ SigningInput.prototype.txEncoding = 0;
112843
+
112844
+ /**
112845
+ * SigningInput priorityFeePrice.
112846
+ * @member {TW.Solana.Proto.IPriorityFeePrice|null|undefined} priorityFeePrice
112847
+ * @memberof TW.Solana.Proto.SigningInput
112848
+ * @instance
112849
+ */
112850
+ SigningInput.prototype.priorityFeePrice = null;
112851
+
112852
+ /**
112853
+ * SigningInput priorityFeeLimit.
112854
+ * @member {TW.Solana.Proto.IPriorityFeeLimit|null|undefined} priorityFeeLimit
112855
+ * @memberof TW.Solana.Proto.SigningInput
112856
+ * @instance
112857
+ */
112858
+ SigningInput.prototype.priorityFeeLimit = null;
112859
+
110425
112860
  // OneOf field names bound to virtual getters and setters
110426
112861
  var $oneOfFields;
110427
112862
 
@@ -110498,6 +112933,14 @@
110498
112933
  writer.uint32(/* id 18, wireType 2 =*/146).string(message.feePayer);
110499
112934
  if (message.advanceNonceAccount != null && Object.hasOwnProperty.call(message, "advanceNonceAccount"))
110500
112935
  $root.TW.Solana.Proto.AdvanceNonceAccount.encode(message.advanceNonceAccount, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
112936
+ if (message.rawMessage != null && Object.hasOwnProperty.call(message, "rawMessage"))
112937
+ $root.TW.Solana.Proto.RawMessage.encode(message.rawMessage, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
112938
+ if (message.txEncoding != null && Object.hasOwnProperty.call(message, "txEncoding"))
112939
+ writer.uint32(/* id 21, wireType 0 =*/168).int32(message.txEncoding);
112940
+ if (message.priorityFeePrice != null && Object.hasOwnProperty.call(message, "priorityFeePrice"))
112941
+ $root.TW.Solana.Proto.PriorityFeePrice.encode(message.priorityFeePrice, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
112942
+ if (message.priorityFeeLimit != null && Object.hasOwnProperty.call(message, "priorityFeeLimit"))
112943
+ $root.TW.Solana.Proto.PriorityFeeLimit.encode(message.priorityFeeLimit, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
110501
112944
  return writer;
110502
112945
  };
110503
112946
 
@@ -110576,6 +113019,18 @@
110576
113019
  case 18:
110577
113020
  message.feePayer = reader.string();
110578
113021
  break;
113022
+ case 20:
113023
+ message.rawMessage = $root.TW.Solana.Proto.RawMessage.decode(reader, reader.uint32());
113024
+ break;
113025
+ case 21:
113026
+ message.txEncoding = reader.int32();
113027
+ break;
113028
+ case 22:
113029
+ message.priorityFeePrice = $root.TW.Solana.Proto.PriorityFeePrice.decode(reader, reader.uint32());
113030
+ break;
113031
+ case 23:
113032
+ message.priorityFeeLimit = $root.TW.Solana.Proto.PriorityFeeLimit.decode(reader, reader.uint32());
113033
+ break;
110579
113034
  default:
110580
113035
  reader.skipType(tag & 7);
110581
113036
  break;
@@ -110735,6 +113190,29 @@
110735
113190
  if (message.feePayer != null && message.hasOwnProperty("feePayer"))
110736
113191
  if (!$util.isString(message.feePayer))
110737
113192
  return "feePayer: string expected";
113193
+ if (message.rawMessage != null && message.hasOwnProperty("rawMessage")) {
113194
+ var error = $root.TW.Solana.Proto.RawMessage.verify(message.rawMessage);
113195
+ if (error)
113196
+ return "rawMessage." + error;
113197
+ }
113198
+ if (message.txEncoding != null && message.hasOwnProperty("txEncoding"))
113199
+ switch (message.txEncoding) {
113200
+ default:
113201
+ return "txEncoding: enum value expected";
113202
+ case 0:
113203
+ case 1:
113204
+ break;
113205
+ }
113206
+ if (message.priorityFeePrice != null && message.hasOwnProperty("priorityFeePrice")) {
113207
+ var error = $root.TW.Solana.Proto.PriorityFeePrice.verify(message.priorityFeePrice);
113208
+ if (error)
113209
+ return "priorityFeePrice." + error;
113210
+ }
113211
+ if (message.priorityFeeLimit != null && message.hasOwnProperty("priorityFeeLimit")) {
113212
+ var error = $root.TW.Solana.Proto.PriorityFeeLimit.verify(message.priorityFeeLimit);
113213
+ if (error)
113214
+ return "priorityFeeLimit." + error;
113215
+ }
110738
113216
  return null;
110739
113217
  };
110740
113218
 
@@ -110830,6 +113308,31 @@
110830
113308
  message.feePayerPrivateKey = object.feePayerPrivateKey;
110831
113309
  if (object.feePayer != null)
110832
113310
  message.feePayer = String(object.feePayer);
113311
+ if (object.rawMessage != null) {
113312
+ if (typeof object.rawMessage !== "object")
113313
+ throw TypeError(".TW.Solana.Proto.SigningInput.rawMessage: object expected");
113314
+ message.rawMessage = $root.TW.Solana.Proto.RawMessage.fromObject(object.rawMessage);
113315
+ }
113316
+ switch (object.txEncoding) {
113317
+ case "Base58":
113318
+ case 0:
113319
+ message.txEncoding = 0;
113320
+ break;
113321
+ case "Base64":
113322
+ case 1:
113323
+ message.txEncoding = 1;
113324
+ break;
113325
+ }
113326
+ if (object.priorityFeePrice != null) {
113327
+ if (typeof object.priorityFeePrice !== "object")
113328
+ throw TypeError(".TW.Solana.Proto.SigningInput.priorityFeePrice: object expected");
113329
+ message.priorityFeePrice = $root.TW.Solana.Proto.PriorityFeePrice.fromObject(object.priorityFeePrice);
113330
+ }
113331
+ if (object.priorityFeeLimit != null) {
113332
+ if (typeof object.priorityFeeLimit !== "object")
113333
+ throw TypeError(".TW.Solana.Proto.SigningInput.priorityFeeLimit: object expected");
113334
+ message.priorityFeeLimit = $root.TW.Solana.Proto.PriorityFeeLimit.fromObject(object.priorityFeeLimit);
113335
+ }
110833
113336
  return message;
110834
113337
  };
110835
113338
 
@@ -110866,6 +113369,10 @@
110866
113369
  object.feePayerPrivateKey = $util.newBuffer(object.feePayerPrivateKey);
110867
113370
  }
110868
113371
  object.feePayer = "";
113372
+ object.rawMessage = null;
113373
+ object.txEncoding = options.enums === String ? "Base58" : 0;
113374
+ object.priorityFeePrice = null;
113375
+ object.priorityFeeLimit = null;
110869
113376
  }
110870
113377
  if (message.privateKey != null && message.hasOwnProperty("privateKey"))
110871
113378
  object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
@@ -110941,6 +113448,14 @@
110941
113448
  if (options.oneofs)
110942
113449
  object.transactionType = "advanceNonceAccount";
110943
113450
  }
113451
+ if (message.rawMessage != null && message.hasOwnProperty("rawMessage"))
113452
+ object.rawMessage = $root.TW.Solana.Proto.RawMessage.toObject(message.rawMessage, options);
113453
+ if (message.txEncoding != null && message.hasOwnProperty("txEncoding"))
113454
+ object.txEncoding = options.enums === String ? $root.TW.Solana.Proto.Encoding[message.txEncoding] : message.txEncoding;
113455
+ if (message.priorityFeePrice != null && message.hasOwnProperty("priorityFeePrice"))
113456
+ object.priorityFeePrice = $root.TW.Solana.Proto.PriorityFeePrice.toObject(message.priorityFeePrice, options);
113457
+ if (message.priorityFeeLimit != null && message.hasOwnProperty("priorityFeeLimit"))
113458
+ object.priorityFeeLimit = $root.TW.Solana.Proto.PriorityFeeLimit.toObject(message.priorityFeeLimit, options);
110944
113459
  return object;
110945
113460
  };
110946
113461
 
@@ -110968,7 +113483,7 @@
110968
113483
  * @property {TW.Common.Proto.SigningError|null} [error] SigningOutput error
110969
113484
  * @property {string|null} [errorMessage] SigningOutput errorMessage
110970
113485
  * @property {string|null} [unsignedTx] SigningOutput unsignedTx
110971
- * @property {string|null} [messageEncoded] SigningOutput messageEncoded
113486
+ * @property {Array.<TW.Solana.Proto.IPubkeySignature>|null} [signatures] SigningOutput signatures
110972
113487
  */
110973
113488
 
110974
113489
  /**
@@ -110980,6 +113495,7 @@
110980
113495
  * @param {TW.Solana.Proto.ISigningOutput=} [properties] Properties to set
110981
113496
  */
110982
113497
  function SigningOutput(properties) {
113498
+ this.signatures = [];
110983
113499
  if (properties)
110984
113500
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
110985
113501
  if (properties[keys[i]] != null)
@@ -111019,12 +113535,12 @@
111019
113535
  SigningOutput.prototype.unsignedTx = "";
111020
113536
 
111021
113537
  /**
111022
- * SigningOutput messageEncoded.
111023
- * @member {string} messageEncoded
113538
+ * SigningOutput signatures.
113539
+ * @member {Array.<TW.Solana.Proto.IPubkeySignature>} signatures
111024
113540
  * @memberof TW.Solana.Proto.SigningOutput
111025
113541
  * @instance
111026
113542
  */
111027
- SigningOutput.prototype.messageEncoded = "";
113543
+ SigningOutput.prototype.signatures = $util.emptyArray;
111028
113544
 
111029
113545
  /**
111030
113546
  * Creates a new SigningOutput instance using the specified properties.
@@ -111058,8 +113574,9 @@
111058
113574
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
111059
113575
  if (message.unsignedTx != null && Object.hasOwnProperty.call(message, "unsignedTx"))
111060
113576
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.unsignedTx);
111061
- if (message.messageEncoded != null && Object.hasOwnProperty.call(message, "messageEncoded"))
111062
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.messageEncoded);
113577
+ if (message.signatures != null && message.signatures.length)
113578
+ for (var i = 0; i < message.signatures.length; ++i)
113579
+ $root.TW.Solana.Proto.PubkeySignature.encode(message.signatures[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
111063
113580
  return writer;
111064
113581
  };
111065
113582
 
@@ -111094,7 +113611,9 @@
111094
113611
  message.unsignedTx = reader.string();
111095
113612
  break;
111096
113613
  case 5:
111097
- message.messageEncoded = reader.string();
113614
+ if (!(message.signatures && message.signatures.length))
113615
+ message.signatures = [];
113616
+ message.signatures.push($root.TW.Solana.Proto.PubkeySignature.decode(reader, reader.uint32()));
111098
113617
  break;
111099
113618
  default:
111100
113619
  reader.skipType(tag & 7);
@@ -111156,9 +113675,15 @@
111156
113675
  if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
111157
113676
  if (!$util.isString(message.unsignedTx))
111158
113677
  return "unsignedTx: string expected";
111159
- if (message.messageEncoded != null && message.hasOwnProperty("messageEncoded"))
111160
- if (!$util.isString(message.messageEncoded))
111161
- return "messageEncoded: string expected";
113678
+ if (message.signatures != null && message.hasOwnProperty("signatures")) {
113679
+ if (!Array.isArray(message.signatures))
113680
+ return "signatures: array expected";
113681
+ for (var i = 0; i < message.signatures.length; ++i) {
113682
+ var error = $root.TW.Solana.Proto.PubkeySignature.verify(message.signatures[i]);
113683
+ if (error)
113684
+ return "signatures." + error;
113685
+ }
113686
+ }
111162
113687
  return null;
111163
113688
  };
111164
113689
 
@@ -111286,8 +113811,16 @@
111286
113811
  message.errorMessage = String(object.errorMessage);
111287
113812
  if (object.unsignedTx != null)
111288
113813
  message.unsignedTx = String(object.unsignedTx);
111289
- if (object.messageEncoded != null)
111290
- message.messageEncoded = String(object.messageEncoded);
113814
+ if (object.signatures) {
113815
+ if (!Array.isArray(object.signatures))
113816
+ throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: array expected");
113817
+ message.signatures = [];
113818
+ for (var i = 0; i < object.signatures.length; ++i) {
113819
+ if (typeof object.signatures[i] !== "object")
113820
+ throw TypeError(".TW.Solana.Proto.SigningOutput.signatures: object expected");
113821
+ message.signatures[i] = $root.TW.Solana.Proto.PubkeySignature.fromObject(object.signatures[i]);
113822
+ }
113823
+ }
111291
113824
  return message;
111292
113825
  };
111293
113826
 
@@ -111304,12 +113837,13 @@
111304
113837
  if (!options)
111305
113838
  options = {};
111306
113839
  var object = {};
113840
+ if (options.arrays || options.defaults)
113841
+ object.signatures = [];
111307
113842
  if (options.defaults) {
111308
113843
  object.encoded = "";
111309
113844
  object.error = options.enums === String ? "OK" : 0;
111310
113845
  object.errorMessage = "";
111311
113846
  object.unsignedTx = "";
111312
- object.messageEncoded = "";
111313
113847
  }
111314
113848
  if (message.encoded != null && message.hasOwnProperty("encoded"))
111315
113849
  object.encoded = message.encoded;
@@ -111319,8 +113853,11 @@
111319
113853
  object.errorMessage = message.errorMessage;
111320
113854
  if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
111321
113855
  object.unsignedTx = message.unsignedTx;
111322
- if (message.messageEncoded != null && message.hasOwnProperty("messageEncoded"))
111323
- object.messageEncoded = message.messageEncoded;
113856
+ if (message.signatures && message.signatures.length) {
113857
+ object.signatures = [];
113858
+ for (var j = 0; j < message.signatures.length; ++j)
113859
+ object.signatures[j] = $root.TW.Solana.Proto.PubkeySignature.toObject(message.signatures[j], options);
113860
+ }
111324
113861
  return object;
111325
113862
  };
111326
113863
 
@@ -111344,8 +113881,8 @@
111344
113881
  * Properties of a PreSigningOutput.
111345
113882
  * @memberof TW.Solana.Proto
111346
113883
  * @interface IPreSigningOutput
111347
- * @property {Array.<Uint8Array>|null} [signers] Signer list
111348
- * @property {Uint8Array|null} [data] Pre-image data. There is no hashing for Solana presign image
113884
+ * @property {Array.<Uint8Array>|null} [signers] PreSigningOutput signers
113885
+ * @property {Uint8Array|null} [data] PreSigningOutput data
111349
113886
  * @property {TW.Common.Proto.SigningError|null} [error] PreSigningOutput error
111350
113887
  * @property {string|null} [errorMessage] PreSigningOutput errorMessage
111351
113888
  */
@@ -111367,7 +113904,7 @@
111367
113904
  }
111368
113905
 
111369
113906
  /**
111370
- * Signer list
113907
+ * PreSigningOutput signers.
111371
113908
  * @member {Array.<Uint8Array>} signers
111372
113909
  * @memberof TW.Solana.Proto.PreSigningOutput
111373
113910
  * @instance
@@ -111375,7 +113912,7 @@
111375
113912
  PreSigningOutput.prototype.signers = $util.emptyArray;
111376
113913
 
111377
113914
  /**
111378
- * Pre-image data. There is no hashing for Solana presign image
113915
+ * PreSigningOutput data.
111379
113916
  * @member {Uint8Array} data
111380
113917
  * @memberof TW.Solana.Proto.PreSigningOutput
111381
113918
  * @instance
@@ -129049,11 +131586,13 @@
129049
131586
  * @enum {number}
129050
131587
  * @property {number} Unknown=0 Unknown value
129051
131588
  * @property {number} CosmosSignAmino=1 CosmosSignAmino value
131589
+ * @property {number} SolanaSignTransaction=2 SolanaSignTransaction value
129052
131590
  */
129053
131591
  Proto.Method = (function() {
129054
131592
  var valuesById = {}, values = Object.create(valuesById);
129055
131593
  values[valuesById[0] = "Unknown"] = 0;
129056
131594
  values[valuesById[1] = "CosmosSignAmino"] = 1;
131595
+ values[valuesById[2] = "SolanaSignTransaction"] = 2;
129057
131596
  return values;
129058
131597
  })();
129059
131598
 
@@ -129199,6 +131738,7 @@
129199
131738
  return "method: enum value expected";
129200
131739
  case 0:
129201
131740
  case 1:
131741
+ case 2:
129202
131742
  break;
129203
131743
  }
129204
131744
  if (message.payload != null && message.hasOwnProperty("payload"))
@@ -129234,6 +131774,10 @@
129234
131774
  case 1:
129235
131775
  message.method = 1;
129236
131776
  break;
131777
+ case "SolanaSignTransaction":
131778
+ case 2:
131779
+ message.method = 2;
131780
+ break;
129237
131781
  }
129238
131782
  if (object.payload != null)
129239
131783
  message.payload = String(object.payload);
@@ -129290,6 +131834,7 @@
129290
131834
  * @property {TW.Common.Proto.SigningError|null} [error] ParseRequestOutput error
129291
131835
  * @property {string|null} [errorMessage] ParseRequestOutput errorMessage
129292
131836
  * @property {TW.Binance.Proto.ISigningInput|null} [binance] ParseRequestOutput binance
131837
+ * @property {TW.Solana.Proto.ISigningInput|null} [solana] ParseRequestOutput solana
129293
131838
  */
129294
131839
 
129295
131840
  /**
@@ -129331,17 +131876,25 @@
129331
131876
  */
129332
131877
  ParseRequestOutput.prototype.binance = null;
129333
131878
 
131879
+ /**
131880
+ * ParseRequestOutput solana.
131881
+ * @member {TW.Solana.Proto.ISigningInput|null|undefined} solana
131882
+ * @memberof TW.WalletConnect.Proto.ParseRequestOutput
131883
+ * @instance
131884
+ */
131885
+ ParseRequestOutput.prototype.solana = null;
131886
+
129334
131887
  // OneOf field names bound to virtual getters and setters
129335
131888
  var $oneOfFields;
129336
131889
 
129337
131890
  /**
129338
131891
  * ParseRequestOutput signingInputOneof.
129339
- * @member {"binance"|undefined} signingInputOneof
131892
+ * @member {"binance"|"solana"|undefined} signingInputOneof
129340
131893
  * @memberof TW.WalletConnect.Proto.ParseRequestOutput
129341
131894
  * @instance
129342
131895
  */
129343
131896
  Object.defineProperty(ParseRequestOutput.prototype, "signingInputOneof", {
129344
- get: $util.oneOfGetter($oneOfFields = ["binance"]),
131897
+ get: $util.oneOfGetter($oneOfFields = ["binance", "solana"]),
129345
131898
  set: $util.oneOfSetter($oneOfFields)
129346
131899
  });
129347
131900
 
@@ -129375,6 +131928,8 @@
129375
131928
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
129376
131929
  if (message.binance != null && Object.hasOwnProperty.call(message, "binance"))
129377
131930
  $root.TW.Binance.Proto.SigningInput.encode(message.binance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
131931
+ if (message.solana != null && Object.hasOwnProperty.call(message, "solana"))
131932
+ $root.TW.Solana.Proto.SigningInput.encode(message.solana, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
129378
131933
  return writer;
129379
131934
  };
129380
131935
 
@@ -129405,6 +131960,9 @@
129405
131960
  case 3:
129406
131961
  message.binance = $root.TW.Binance.Proto.SigningInput.decode(reader, reader.uint32());
129407
131962
  break;
131963
+ case 4:
131964
+ message.solana = $root.TW.Solana.Proto.SigningInput.decode(reader, reader.uint32());
131965
+ break;
129408
131966
  default:
129409
131967
  reader.skipType(tag & 7);
129410
131968
  break;
@@ -129468,6 +132026,16 @@
129468
132026
  return "binance." + error;
129469
132027
  }
129470
132028
  }
132029
+ if (message.solana != null && message.hasOwnProperty("solana")) {
132030
+ if (properties.signingInputOneof === 1)
132031
+ return "signingInputOneof: multiple values";
132032
+ properties.signingInputOneof = 1;
132033
+ {
132034
+ var error = $root.TW.Solana.Proto.SigningInput.verify(message.solana);
132035
+ if (error)
132036
+ return "solana." + error;
132037
+ }
132038
+ }
129471
132039
  return null;
129472
132040
  };
129473
132041
 
@@ -129596,6 +132164,11 @@
129596
132164
  throw TypeError(".TW.WalletConnect.Proto.ParseRequestOutput.binance: object expected");
129597
132165
  message.binance = $root.TW.Binance.Proto.SigningInput.fromObject(object.binance);
129598
132166
  }
132167
+ if (object.solana != null) {
132168
+ if (typeof object.solana !== "object")
132169
+ throw TypeError(".TW.WalletConnect.Proto.ParseRequestOutput.solana: object expected");
132170
+ message.solana = $root.TW.Solana.Proto.SigningInput.fromObject(object.solana);
132171
+ }
129599
132172
  return message;
129600
132173
  };
129601
132174
 
@@ -129625,6 +132198,11 @@
129625
132198
  if (options.oneofs)
129626
132199
  object.signingInputOneof = "binance";
129627
132200
  }
132201
+ if (message.solana != null && message.hasOwnProperty("solana")) {
132202
+ object.solana = $root.TW.Solana.Proto.SigningInput.toObject(message.solana, options);
132203
+ if (options.oneofs)
132204
+ object.signingInputOneof = "solana";
132205
+ }
129628
132206
  return object;
129629
132207
  };
129630
132208