@trustwallet/wallet-core 4.1.19 → 4.1.21

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.
@@ -33399,6 +33399,12 @@ export namespace TW {
33399
33399
 
33400
33400
  /** BondAndNominate callIndices */
33401
33401
  callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33402
+
33403
+ /** BondAndNominate bondCallIndices */
33404
+ bondCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33405
+
33406
+ /** BondAndNominate nominateCallIndices */
33407
+ nominateCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33402
33408
  }
33403
33409
 
33404
33410
  /** Represents a BondAndNominate. */
@@ -33425,6 +33431,12 @@ export namespace TW {
33425
33431
  /** BondAndNominate callIndices. */
33426
33432
  public callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33427
33433
 
33434
+ /** BondAndNominate bondCallIndices. */
33435
+ public bondCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33436
+
33437
+ /** BondAndNominate nominateCallIndices. */
33438
+ public nominateCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33439
+
33428
33440
  /**
33429
33441
  * Creates a new BondAndNominate instance using the specified properties.
33430
33442
  * @param [properties] Properties to set
@@ -33882,6 +33894,12 @@ export namespace TW {
33882
33894
 
33883
33895
  /** ChillAndUnbond callIndices */
33884
33896
  callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33897
+
33898
+ /** ChillAndUnbond chillCallIndices */
33899
+ chillCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33900
+
33901
+ /** ChillAndUnbond unbondCallIndices */
33902
+ unbondCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33885
33903
  }
33886
33904
 
33887
33905
  /** Represents a ChillAndUnbond. */
@@ -33899,6 +33917,12 @@ export namespace TW {
33899
33917
  /** ChillAndUnbond callIndices. */
33900
33918
  public callIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33901
33919
 
33920
+ /** ChillAndUnbond chillCallIndices. */
33921
+ public chillCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33922
+
33923
+ /** ChillAndUnbond unbondCallIndices. */
33924
+ public unbondCallIndices?: (TW.Polkadot.Proto.ICallIndices|null);
33925
+
33902
33926
  /**
33903
33927
  * Creates a new ChillAndUnbond instance using the specified properties.
33904
33928
  * @param [properties] Properties to set
@@ -38216,6 +38240,255 @@ export namespace TW {
38216
38240
  */
38217
38241
  public toJSON(): { [k: string]: any };
38218
38242
  }
38243
+
38244
+ /** Properties of a MessageSigningInput. */
38245
+ interface IMessageSigningInput {
38246
+
38247
+ /** MessageSigningInput privateKey */
38248
+ privateKey?: (Uint8Array|null);
38249
+
38250
+ /** MessageSigningInput message */
38251
+ message?: (string|null);
38252
+ }
38253
+
38254
+ /** Represents a MessageSigningInput. */
38255
+ class MessageSigningInput implements IMessageSigningInput {
38256
+
38257
+ /**
38258
+ * Constructs a new MessageSigningInput.
38259
+ * @param [properties] Properties to set
38260
+ */
38261
+ constructor(properties?: TW.Solana.Proto.IMessageSigningInput);
38262
+
38263
+ /** MessageSigningInput privateKey. */
38264
+ public privateKey: Uint8Array;
38265
+
38266
+ /** MessageSigningInput message. */
38267
+ public message: string;
38268
+
38269
+ /**
38270
+ * Creates a new MessageSigningInput instance using the specified properties.
38271
+ * @param [properties] Properties to set
38272
+ * @returns MessageSigningInput instance
38273
+ */
38274
+ public static create(properties?: TW.Solana.Proto.IMessageSigningInput): TW.Solana.Proto.MessageSigningInput;
38275
+
38276
+ /**
38277
+ * Encodes the specified MessageSigningInput message. Does not implicitly {@link TW.Solana.Proto.MessageSigningInput.verify|verify} messages.
38278
+ * @param message MessageSigningInput message or plain object to encode
38279
+ * @param [writer] Writer to encode to
38280
+ * @returns Writer
38281
+ */
38282
+ public static encode(message: TW.Solana.Proto.IMessageSigningInput, writer?: $protobuf.Writer): $protobuf.Writer;
38283
+
38284
+ /**
38285
+ * Decodes a MessageSigningInput message from the specified reader or buffer.
38286
+ * @param reader Reader or buffer to decode from
38287
+ * @param [length] Message length if known beforehand
38288
+ * @returns MessageSigningInput
38289
+ * @throws {Error} If the payload is not a reader or valid buffer
38290
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
38291
+ */
38292
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Solana.Proto.MessageSigningInput;
38293
+
38294
+ /**
38295
+ * Verifies a MessageSigningInput message.
38296
+ * @param message Plain object to verify
38297
+ * @returns `null` if valid, otherwise the reason why it is not
38298
+ */
38299
+ public static verify(message: { [k: string]: any }): (string|null);
38300
+
38301
+ /**
38302
+ * Creates a MessageSigningInput message from a plain object. Also converts values to their respective internal types.
38303
+ * @param object Plain object
38304
+ * @returns MessageSigningInput
38305
+ */
38306
+ public static fromObject(object: { [k: string]: any }): TW.Solana.Proto.MessageSigningInput;
38307
+
38308
+ /**
38309
+ * Creates a plain object from a MessageSigningInput message. Also converts values to other types if specified.
38310
+ * @param message MessageSigningInput
38311
+ * @param [options] Conversion options
38312
+ * @returns Plain object
38313
+ */
38314
+ public static toObject(message: TW.Solana.Proto.MessageSigningInput, options?: $protobuf.IConversionOptions): { [k: string]: any };
38315
+
38316
+ /**
38317
+ * Converts this MessageSigningInput to JSON.
38318
+ * @returns JSON object
38319
+ */
38320
+ public toJSON(): { [k: string]: any };
38321
+ }
38322
+
38323
+ /** Properties of a MessageSigningOutput. */
38324
+ interface IMessageSigningOutput {
38325
+
38326
+ /** MessageSigningOutput signature */
38327
+ signature?: (string|null);
38328
+
38329
+ /** MessageSigningOutput error */
38330
+ error?: (TW.Common.Proto.SigningError|null);
38331
+
38332
+ /** MessageSigningOutput errorMessage */
38333
+ errorMessage?: (string|null);
38334
+ }
38335
+
38336
+ /** Represents a MessageSigningOutput. */
38337
+ class MessageSigningOutput implements IMessageSigningOutput {
38338
+
38339
+ /**
38340
+ * Constructs a new MessageSigningOutput.
38341
+ * @param [properties] Properties to set
38342
+ */
38343
+ constructor(properties?: TW.Solana.Proto.IMessageSigningOutput);
38344
+
38345
+ /** MessageSigningOutput signature. */
38346
+ public signature: string;
38347
+
38348
+ /** MessageSigningOutput error. */
38349
+ public error: TW.Common.Proto.SigningError;
38350
+
38351
+ /** MessageSigningOutput errorMessage. */
38352
+ public errorMessage: string;
38353
+
38354
+ /**
38355
+ * Creates a new MessageSigningOutput instance using the specified properties.
38356
+ * @param [properties] Properties to set
38357
+ * @returns MessageSigningOutput instance
38358
+ */
38359
+ public static create(properties?: TW.Solana.Proto.IMessageSigningOutput): TW.Solana.Proto.MessageSigningOutput;
38360
+
38361
+ /**
38362
+ * Encodes the specified MessageSigningOutput message. Does not implicitly {@link TW.Solana.Proto.MessageSigningOutput.verify|verify} messages.
38363
+ * @param message MessageSigningOutput message or plain object to encode
38364
+ * @param [writer] Writer to encode to
38365
+ * @returns Writer
38366
+ */
38367
+ public static encode(message: TW.Solana.Proto.IMessageSigningOutput, writer?: $protobuf.Writer): $protobuf.Writer;
38368
+
38369
+ /**
38370
+ * Decodes a MessageSigningOutput message from the specified reader or buffer.
38371
+ * @param reader Reader or buffer to decode from
38372
+ * @param [length] Message length if known beforehand
38373
+ * @returns MessageSigningOutput
38374
+ * @throws {Error} If the payload is not a reader or valid buffer
38375
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
38376
+ */
38377
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Solana.Proto.MessageSigningOutput;
38378
+
38379
+ /**
38380
+ * Verifies a MessageSigningOutput message.
38381
+ * @param message Plain object to verify
38382
+ * @returns `null` if valid, otherwise the reason why it is not
38383
+ */
38384
+ public static verify(message: { [k: string]: any }): (string|null);
38385
+
38386
+ /**
38387
+ * Creates a MessageSigningOutput message from a plain object. Also converts values to their respective internal types.
38388
+ * @param object Plain object
38389
+ * @returns MessageSigningOutput
38390
+ */
38391
+ public static fromObject(object: { [k: string]: any }): TW.Solana.Proto.MessageSigningOutput;
38392
+
38393
+ /**
38394
+ * Creates a plain object from a MessageSigningOutput message. Also converts values to other types if specified.
38395
+ * @param message MessageSigningOutput
38396
+ * @param [options] Conversion options
38397
+ * @returns Plain object
38398
+ */
38399
+ public static toObject(message: TW.Solana.Proto.MessageSigningOutput, options?: $protobuf.IConversionOptions): { [k: string]: any };
38400
+
38401
+ /**
38402
+ * Converts this MessageSigningOutput to JSON.
38403
+ * @returns JSON object
38404
+ */
38405
+ public toJSON(): { [k: string]: any };
38406
+ }
38407
+
38408
+ /** Properties of a MessageVerifyingInput. */
38409
+ interface IMessageVerifyingInput {
38410
+
38411
+ /** MessageVerifyingInput message */
38412
+ message?: (string|null);
38413
+
38414
+ /** MessageVerifyingInput publicKey */
38415
+ publicKey?: (Uint8Array|null);
38416
+
38417
+ /** MessageVerifyingInput signature */
38418
+ signature?: (string|null);
38419
+ }
38420
+
38421
+ /** Represents a MessageVerifyingInput. */
38422
+ class MessageVerifyingInput implements IMessageVerifyingInput {
38423
+
38424
+ /**
38425
+ * Constructs a new MessageVerifyingInput.
38426
+ * @param [properties] Properties to set
38427
+ */
38428
+ constructor(properties?: TW.Solana.Proto.IMessageVerifyingInput);
38429
+
38430
+ /** MessageVerifyingInput message. */
38431
+ public message: string;
38432
+
38433
+ /** MessageVerifyingInput publicKey. */
38434
+ public publicKey: Uint8Array;
38435
+
38436
+ /** MessageVerifyingInput signature. */
38437
+ public signature: string;
38438
+
38439
+ /**
38440
+ * Creates a new MessageVerifyingInput instance using the specified properties.
38441
+ * @param [properties] Properties to set
38442
+ * @returns MessageVerifyingInput instance
38443
+ */
38444
+ public static create(properties?: TW.Solana.Proto.IMessageVerifyingInput): TW.Solana.Proto.MessageVerifyingInput;
38445
+
38446
+ /**
38447
+ * Encodes the specified MessageVerifyingInput message. Does not implicitly {@link TW.Solana.Proto.MessageVerifyingInput.verify|verify} messages.
38448
+ * @param message MessageVerifyingInput message or plain object to encode
38449
+ * @param [writer] Writer to encode to
38450
+ * @returns Writer
38451
+ */
38452
+ public static encode(message: TW.Solana.Proto.IMessageVerifyingInput, writer?: $protobuf.Writer): $protobuf.Writer;
38453
+
38454
+ /**
38455
+ * Decodes a MessageVerifyingInput message from the specified reader or buffer.
38456
+ * @param reader Reader or buffer to decode from
38457
+ * @param [length] Message length if known beforehand
38458
+ * @returns MessageVerifyingInput
38459
+ * @throws {Error} If the payload is not a reader or valid buffer
38460
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
38461
+ */
38462
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Solana.Proto.MessageVerifyingInput;
38463
+
38464
+ /**
38465
+ * Verifies a MessageVerifyingInput message.
38466
+ * @param message Plain object to verify
38467
+ * @returns `null` if valid, otherwise the reason why it is not
38468
+ */
38469
+ public static verify(message: { [k: string]: any }): (string|null);
38470
+
38471
+ /**
38472
+ * Creates a MessageVerifyingInput message from a plain object. Also converts values to their respective internal types.
38473
+ * @param object Plain object
38474
+ * @returns MessageVerifyingInput
38475
+ */
38476
+ public static fromObject(object: { [k: string]: any }): TW.Solana.Proto.MessageVerifyingInput;
38477
+
38478
+ /**
38479
+ * Creates a plain object from a MessageVerifyingInput message. Also converts values to other types if specified.
38480
+ * @param message MessageVerifyingInput
38481
+ * @param [options] Conversion options
38482
+ * @returns Plain object
38483
+ */
38484
+ public static toObject(message: TW.Solana.Proto.MessageVerifyingInput, options?: $protobuf.IConversionOptions): { [k: string]: any };
38485
+
38486
+ /**
38487
+ * Converts this MessageVerifyingInput to JSON.
38488
+ * @returns JSON object
38489
+ */
38490
+ public toJSON(): { [k: string]: any };
38491
+ }
38219
38492
  }
38220
38493
  }
38221
38494
 
@@ -99489,6 +99489,8 @@
99489
99489
  * @property {TW.Polkadot.Proto.RewardDestination|null} [rewardDestination] BondAndNominate rewardDestination
99490
99490
  * @property {Array.<string>|null} [nominators] BondAndNominate nominators
99491
99491
  * @property {TW.Polkadot.Proto.ICallIndices|null} [callIndices] BondAndNominate callIndices
99492
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [bondCallIndices] BondAndNominate bondCallIndices
99493
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [nominateCallIndices] BondAndNominate nominateCallIndices
99492
99494
  */
99493
99495
 
99494
99496
  /**
@@ -99547,6 +99549,22 @@
99547
99549
  */
99548
99550
  BondAndNominate.prototype.callIndices = null;
99549
99551
 
99552
+ /**
99553
+ * BondAndNominate bondCallIndices.
99554
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} bondCallIndices
99555
+ * @memberof TW.Polkadot.Proto.Staking.BondAndNominate
99556
+ * @instance
99557
+ */
99558
+ BondAndNominate.prototype.bondCallIndices = null;
99559
+
99560
+ /**
99561
+ * BondAndNominate nominateCallIndices.
99562
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} nominateCallIndices
99563
+ * @memberof TW.Polkadot.Proto.Staking.BondAndNominate
99564
+ * @instance
99565
+ */
99566
+ BondAndNominate.prototype.nominateCallIndices = null;
99567
+
99550
99568
  /**
99551
99569
  * Creates a new BondAndNominate instance using the specified properties.
99552
99570
  * @function create
@@ -99582,6 +99600,10 @@
99582
99600
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.nominators[i]);
99583
99601
  if (message.callIndices != null && Object.hasOwnProperty.call(message, "callIndices"))
99584
99602
  $root.TW.Polkadot.Proto.CallIndices.encode(message.callIndices, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
99603
+ if (message.bondCallIndices != null && Object.hasOwnProperty.call(message, "bondCallIndices"))
99604
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.bondCallIndices, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
99605
+ if (message.nominateCallIndices != null && Object.hasOwnProperty.call(message, "nominateCallIndices"))
99606
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.nominateCallIndices, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
99585
99607
  return writer;
99586
99608
  };
99587
99609
 
@@ -99620,6 +99642,12 @@
99620
99642
  case 5:
99621
99643
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
99622
99644
  break;
99645
+ case 6:
99646
+ message.bondCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
99647
+ break;
99648
+ case 7:
99649
+ message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
99650
+ break;
99623
99651
  default:
99624
99652
  reader.skipType(tag & 7);
99625
99653
  break;
@@ -99666,6 +99694,16 @@
99666
99694
  if (error)
99667
99695
  return "callIndices." + error;
99668
99696
  }
99697
+ if (message.bondCallIndices != null && message.hasOwnProperty("bondCallIndices")) {
99698
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.bondCallIndices);
99699
+ if (error)
99700
+ return "bondCallIndices." + error;
99701
+ }
99702
+ if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices")) {
99703
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.nominateCallIndices);
99704
+ if (error)
99705
+ return "nominateCallIndices." + error;
99706
+ }
99669
99707
  return null;
99670
99708
  };
99671
99709
 
@@ -99714,6 +99752,16 @@
99714
99752
  throw TypeError(".TW.Polkadot.Proto.Staking.BondAndNominate.callIndices: object expected");
99715
99753
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.callIndices);
99716
99754
  }
99755
+ if (object.bondCallIndices != null) {
99756
+ if (typeof object.bondCallIndices !== "object")
99757
+ throw TypeError(".TW.Polkadot.Proto.Staking.BondAndNominate.bondCallIndices: object expected");
99758
+ message.bondCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.bondCallIndices);
99759
+ }
99760
+ if (object.nominateCallIndices != null) {
99761
+ if (typeof object.nominateCallIndices !== "object")
99762
+ throw TypeError(".TW.Polkadot.Proto.Staking.BondAndNominate.nominateCallIndices: object expected");
99763
+ message.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.nominateCallIndices);
99764
+ }
99717
99765
  return message;
99718
99766
  };
99719
99767
 
@@ -99743,6 +99791,8 @@
99743
99791
  }
99744
99792
  object.rewardDestination = options.enums === String ? "STAKED" : 0;
99745
99793
  object.callIndices = null;
99794
+ object.bondCallIndices = null;
99795
+ object.nominateCallIndices = null;
99746
99796
  }
99747
99797
  if (message.controller != null && message.hasOwnProperty("controller"))
99748
99798
  object.controller = message.controller;
@@ -99757,6 +99807,10 @@
99757
99807
  }
99758
99808
  if (message.callIndices != null && message.hasOwnProperty("callIndices"))
99759
99809
  object.callIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.callIndices, options);
99810
+ if (message.bondCallIndices != null && message.hasOwnProperty("bondCallIndices"))
99811
+ object.bondCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.bondCallIndices, options);
99812
+ if (message.nominateCallIndices != null && message.hasOwnProperty("nominateCallIndices"))
99813
+ object.nominateCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.nominateCallIndices, options);
99760
99814
  return object;
99761
99815
  };
99762
99816
 
@@ -100755,6 +100809,8 @@
100755
100809
  * @interface IChillAndUnbond
100756
100810
  * @property {Uint8Array|null} [value] ChillAndUnbond value
100757
100811
  * @property {TW.Polkadot.Proto.ICallIndices|null} [callIndices] ChillAndUnbond callIndices
100812
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [chillCallIndices] ChillAndUnbond chillCallIndices
100813
+ * @property {TW.Polkadot.Proto.ICallIndices|null} [unbondCallIndices] ChillAndUnbond unbondCallIndices
100758
100814
  */
100759
100815
 
100760
100816
  /**
@@ -100788,6 +100844,22 @@
100788
100844
  */
100789
100845
  ChillAndUnbond.prototype.callIndices = null;
100790
100846
 
100847
+ /**
100848
+ * ChillAndUnbond chillCallIndices.
100849
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} chillCallIndices
100850
+ * @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
100851
+ * @instance
100852
+ */
100853
+ ChillAndUnbond.prototype.chillCallIndices = null;
100854
+
100855
+ /**
100856
+ * ChillAndUnbond unbondCallIndices.
100857
+ * @member {TW.Polkadot.Proto.ICallIndices|null|undefined} unbondCallIndices
100858
+ * @memberof TW.Polkadot.Proto.Staking.ChillAndUnbond
100859
+ * @instance
100860
+ */
100861
+ ChillAndUnbond.prototype.unbondCallIndices = null;
100862
+
100791
100863
  /**
100792
100864
  * Creates a new ChillAndUnbond instance using the specified properties.
100793
100865
  * @function create
@@ -100816,6 +100888,10 @@
100816
100888
  writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
100817
100889
  if (message.callIndices != null && Object.hasOwnProperty.call(message, "callIndices"))
100818
100890
  $root.TW.Polkadot.Proto.CallIndices.encode(message.callIndices, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
100891
+ if (message.chillCallIndices != null && Object.hasOwnProperty.call(message, "chillCallIndices"))
100892
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.chillCallIndices, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
100893
+ if (message.unbondCallIndices != null && Object.hasOwnProperty.call(message, "unbondCallIndices"))
100894
+ $root.TW.Polkadot.Proto.CallIndices.encode(message.unbondCallIndices, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
100819
100895
  return writer;
100820
100896
  };
100821
100897
 
@@ -100843,6 +100919,12 @@
100843
100919
  case 2:
100844
100920
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
100845
100921
  break;
100922
+ case 3:
100923
+ message.chillCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
100924
+ break;
100925
+ case 4:
100926
+ message.unbondCallIndices = $root.TW.Polkadot.Proto.CallIndices.decode(reader, reader.uint32());
100927
+ break;
100846
100928
  default:
100847
100929
  reader.skipType(tag & 7);
100848
100930
  break;
@@ -100870,6 +100952,16 @@
100870
100952
  if (error)
100871
100953
  return "callIndices." + error;
100872
100954
  }
100955
+ if (message.chillCallIndices != null && message.hasOwnProperty("chillCallIndices")) {
100956
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.chillCallIndices);
100957
+ if (error)
100958
+ return "chillCallIndices." + error;
100959
+ }
100960
+ if (message.unbondCallIndices != null && message.hasOwnProperty("unbondCallIndices")) {
100961
+ var error = $root.TW.Polkadot.Proto.CallIndices.verify(message.unbondCallIndices);
100962
+ if (error)
100963
+ return "unbondCallIndices." + error;
100964
+ }
100873
100965
  return null;
100874
100966
  };
100875
100967
 
@@ -100895,6 +100987,16 @@
100895
100987
  throw TypeError(".TW.Polkadot.Proto.Staking.ChillAndUnbond.callIndices: object expected");
100896
100988
  message.callIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.callIndices);
100897
100989
  }
100990
+ if (object.chillCallIndices != null) {
100991
+ if (typeof object.chillCallIndices !== "object")
100992
+ throw TypeError(".TW.Polkadot.Proto.Staking.ChillAndUnbond.chillCallIndices: object expected");
100993
+ message.chillCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.chillCallIndices);
100994
+ }
100995
+ if (object.unbondCallIndices != null) {
100996
+ if (typeof object.unbondCallIndices !== "object")
100997
+ throw TypeError(".TW.Polkadot.Proto.Staking.ChillAndUnbond.unbondCallIndices: object expected");
100998
+ message.unbondCallIndices = $root.TW.Polkadot.Proto.CallIndices.fromObject(object.unbondCallIndices);
100999
+ }
100898
101000
  return message;
100899
101001
  };
100900
101002
 
@@ -100920,11 +101022,17 @@
100920
101022
  object.value = $util.newBuffer(object.value);
100921
101023
  }
100922
101024
  object.callIndices = null;
101025
+ object.chillCallIndices = null;
101026
+ object.unbondCallIndices = null;
100923
101027
  }
100924
101028
  if (message.value != null && message.hasOwnProperty("value"))
100925
101029
  object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
100926
101030
  if (message.callIndices != null && message.hasOwnProperty("callIndices"))
100927
101031
  object.callIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.callIndices, options);
101032
+ if (message.chillCallIndices != null && message.hasOwnProperty("chillCallIndices"))
101033
+ object.chillCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.chillCallIndices, options);
101034
+ if (message.unbondCallIndices != null && message.hasOwnProperty("unbondCallIndices"))
101035
+ object.unbondCallIndices = $root.TW.Polkadot.Proto.CallIndices.toObject(message.unbondCallIndices, options);
100928
101036
  return object;
100929
101037
  };
100930
101038
 
@@ -113336,6 +113444,744 @@
113336
113444
  return PreSigningOutput;
113337
113445
  })();
113338
113446
 
113447
+ Proto.MessageSigningInput = (function() {
113448
+
113449
+ /**
113450
+ * Properties of a MessageSigningInput.
113451
+ * @memberof TW.Solana.Proto
113452
+ * @interface IMessageSigningInput
113453
+ * @property {Uint8Array|null} [privateKey] MessageSigningInput privateKey
113454
+ * @property {string|null} [message] MessageSigningInput message
113455
+ */
113456
+
113457
+ /**
113458
+ * Constructs a new MessageSigningInput.
113459
+ * @memberof TW.Solana.Proto
113460
+ * @classdesc Represents a MessageSigningInput.
113461
+ * @implements IMessageSigningInput
113462
+ * @constructor
113463
+ * @param {TW.Solana.Proto.IMessageSigningInput=} [properties] Properties to set
113464
+ */
113465
+ function MessageSigningInput(properties) {
113466
+ if (properties)
113467
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
113468
+ if (properties[keys[i]] != null)
113469
+ this[keys[i]] = properties[keys[i]];
113470
+ }
113471
+
113472
+ /**
113473
+ * MessageSigningInput privateKey.
113474
+ * @member {Uint8Array} privateKey
113475
+ * @memberof TW.Solana.Proto.MessageSigningInput
113476
+ * @instance
113477
+ */
113478
+ MessageSigningInput.prototype.privateKey = $util.newBuffer([]);
113479
+
113480
+ /**
113481
+ * MessageSigningInput message.
113482
+ * @member {string} message
113483
+ * @memberof TW.Solana.Proto.MessageSigningInput
113484
+ * @instance
113485
+ */
113486
+ MessageSigningInput.prototype.message = "";
113487
+
113488
+ /**
113489
+ * Creates a new MessageSigningInput instance using the specified properties.
113490
+ * @function create
113491
+ * @memberof TW.Solana.Proto.MessageSigningInput
113492
+ * @static
113493
+ * @param {TW.Solana.Proto.IMessageSigningInput=} [properties] Properties to set
113494
+ * @returns {TW.Solana.Proto.MessageSigningInput} MessageSigningInput instance
113495
+ */
113496
+ MessageSigningInput.create = function create(properties) {
113497
+ return new MessageSigningInput(properties);
113498
+ };
113499
+
113500
+ /**
113501
+ * Encodes the specified MessageSigningInput message. Does not implicitly {@link TW.Solana.Proto.MessageSigningInput.verify|verify} messages.
113502
+ * @function encode
113503
+ * @memberof TW.Solana.Proto.MessageSigningInput
113504
+ * @static
113505
+ * @param {TW.Solana.Proto.IMessageSigningInput} message MessageSigningInput message or plain object to encode
113506
+ * @param {$protobuf.Writer} [writer] Writer to encode to
113507
+ * @returns {$protobuf.Writer} Writer
113508
+ */
113509
+ MessageSigningInput.encode = function encode(message, writer) {
113510
+ if (!writer)
113511
+ writer = $Writer.create();
113512
+ if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
113513
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey);
113514
+ if (message.message != null && Object.hasOwnProperty.call(message, "message"))
113515
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
113516
+ return writer;
113517
+ };
113518
+
113519
+ /**
113520
+ * Decodes a MessageSigningInput message from the specified reader or buffer.
113521
+ * @function decode
113522
+ * @memberof TW.Solana.Proto.MessageSigningInput
113523
+ * @static
113524
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
113525
+ * @param {number} [length] Message length if known beforehand
113526
+ * @returns {TW.Solana.Proto.MessageSigningInput} MessageSigningInput
113527
+ * @throws {Error} If the payload is not a reader or valid buffer
113528
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
113529
+ */
113530
+ MessageSigningInput.decode = function decode(reader, length) {
113531
+ if (!(reader instanceof $Reader))
113532
+ reader = $Reader.create(reader);
113533
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.MessageSigningInput();
113534
+ while (reader.pos < end) {
113535
+ var tag = reader.uint32();
113536
+ switch (tag >>> 3) {
113537
+ case 1:
113538
+ message.privateKey = reader.bytes();
113539
+ break;
113540
+ case 2:
113541
+ message.message = reader.string();
113542
+ break;
113543
+ default:
113544
+ reader.skipType(tag & 7);
113545
+ break;
113546
+ }
113547
+ }
113548
+ return message;
113549
+ };
113550
+
113551
+ /**
113552
+ * Verifies a MessageSigningInput message.
113553
+ * @function verify
113554
+ * @memberof TW.Solana.Proto.MessageSigningInput
113555
+ * @static
113556
+ * @param {Object.<string,*>} message Plain object to verify
113557
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
113558
+ */
113559
+ MessageSigningInput.verify = function verify(message) {
113560
+ if (typeof message !== "object" || message === null)
113561
+ return "object expected";
113562
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
113563
+ if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
113564
+ return "privateKey: buffer expected";
113565
+ if (message.message != null && message.hasOwnProperty("message"))
113566
+ if (!$util.isString(message.message))
113567
+ return "message: string expected";
113568
+ return null;
113569
+ };
113570
+
113571
+ /**
113572
+ * Creates a MessageSigningInput message from a plain object. Also converts values to their respective internal types.
113573
+ * @function fromObject
113574
+ * @memberof TW.Solana.Proto.MessageSigningInput
113575
+ * @static
113576
+ * @param {Object.<string,*>} object Plain object
113577
+ * @returns {TW.Solana.Proto.MessageSigningInput} MessageSigningInput
113578
+ */
113579
+ MessageSigningInput.fromObject = function fromObject(object) {
113580
+ if (object instanceof $root.TW.Solana.Proto.MessageSigningInput)
113581
+ return object;
113582
+ var message = new $root.TW.Solana.Proto.MessageSigningInput();
113583
+ if (object.privateKey != null)
113584
+ if (typeof object.privateKey === "string")
113585
+ $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
113586
+ else if (object.privateKey.length)
113587
+ message.privateKey = object.privateKey;
113588
+ if (object.message != null)
113589
+ message.message = String(object.message);
113590
+ return message;
113591
+ };
113592
+
113593
+ /**
113594
+ * Creates a plain object from a MessageSigningInput message. Also converts values to other types if specified.
113595
+ * @function toObject
113596
+ * @memberof TW.Solana.Proto.MessageSigningInput
113597
+ * @static
113598
+ * @param {TW.Solana.Proto.MessageSigningInput} message MessageSigningInput
113599
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
113600
+ * @returns {Object.<string,*>} Plain object
113601
+ */
113602
+ MessageSigningInput.toObject = function toObject(message, options) {
113603
+ if (!options)
113604
+ options = {};
113605
+ var object = {};
113606
+ if (options.defaults) {
113607
+ if (options.bytes === String)
113608
+ object.privateKey = "";
113609
+ else {
113610
+ object.privateKey = [];
113611
+ if (options.bytes !== Array)
113612
+ object.privateKey = $util.newBuffer(object.privateKey);
113613
+ }
113614
+ object.message = "";
113615
+ }
113616
+ if (message.privateKey != null && message.hasOwnProperty("privateKey"))
113617
+ object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey;
113618
+ if (message.message != null && message.hasOwnProperty("message"))
113619
+ object.message = message.message;
113620
+ return object;
113621
+ };
113622
+
113623
+ /**
113624
+ * Converts this MessageSigningInput to JSON.
113625
+ * @function toJSON
113626
+ * @memberof TW.Solana.Proto.MessageSigningInput
113627
+ * @instance
113628
+ * @returns {Object.<string,*>} JSON object
113629
+ */
113630
+ MessageSigningInput.prototype.toJSON = function toJSON() {
113631
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
113632
+ };
113633
+
113634
+ return MessageSigningInput;
113635
+ })();
113636
+
113637
+ Proto.MessageSigningOutput = (function() {
113638
+
113639
+ /**
113640
+ * Properties of a MessageSigningOutput.
113641
+ * @memberof TW.Solana.Proto
113642
+ * @interface IMessageSigningOutput
113643
+ * @property {string|null} [signature] MessageSigningOutput signature
113644
+ * @property {TW.Common.Proto.SigningError|null} [error] MessageSigningOutput error
113645
+ * @property {string|null} [errorMessage] MessageSigningOutput errorMessage
113646
+ */
113647
+
113648
+ /**
113649
+ * Constructs a new MessageSigningOutput.
113650
+ * @memberof TW.Solana.Proto
113651
+ * @classdesc Represents a MessageSigningOutput.
113652
+ * @implements IMessageSigningOutput
113653
+ * @constructor
113654
+ * @param {TW.Solana.Proto.IMessageSigningOutput=} [properties] Properties to set
113655
+ */
113656
+ function MessageSigningOutput(properties) {
113657
+ if (properties)
113658
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
113659
+ if (properties[keys[i]] != null)
113660
+ this[keys[i]] = properties[keys[i]];
113661
+ }
113662
+
113663
+ /**
113664
+ * MessageSigningOutput signature.
113665
+ * @member {string} signature
113666
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113667
+ * @instance
113668
+ */
113669
+ MessageSigningOutput.prototype.signature = "";
113670
+
113671
+ /**
113672
+ * MessageSigningOutput error.
113673
+ * @member {TW.Common.Proto.SigningError} error
113674
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113675
+ * @instance
113676
+ */
113677
+ MessageSigningOutput.prototype.error = 0;
113678
+
113679
+ /**
113680
+ * MessageSigningOutput errorMessage.
113681
+ * @member {string} errorMessage
113682
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113683
+ * @instance
113684
+ */
113685
+ MessageSigningOutput.prototype.errorMessage = "";
113686
+
113687
+ /**
113688
+ * Creates a new MessageSigningOutput instance using the specified properties.
113689
+ * @function create
113690
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113691
+ * @static
113692
+ * @param {TW.Solana.Proto.IMessageSigningOutput=} [properties] Properties to set
113693
+ * @returns {TW.Solana.Proto.MessageSigningOutput} MessageSigningOutput instance
113694
+ */
113695
+ MessageSigningOutput.create = function create(properties) {
113696
+ return new MessageSigningOutput(properties);
113697
+ };
113698
+
113699
+ /**
113700
+ * Encodes the specified MessageSigningOutput message. Does not implicitly {@link TW.Solana.Proto.MessageSigningOutput.verify|verify} messages.
113701
+ * @function encode
113702
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113703
+ * @static
113704
+ * @param {TW.Solana.Proto.IMessageSigningOutput} message MessageSigningOutput message or plain object to encode
113705
+ * @param {$protobuf.Writer} [writer] Writer to encode to
113706
+ * @returns {$protobuf.Writer} Writer
113707
+ */
113708
+ MessageSigningOutput.encode = function encode(message, writer) {
113709
+ if (!writer)
113710
+ writer = $Writer.create();
113711
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
113712
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.signature);
113713
+ if (message.error != null && Object.hasOwnProperty.call(message, "error"))
113714
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.error);
113715
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
113716
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage);
113717
+ return writer;
113718
+ };
113719
+
113720
+ /**
113721
+ * Decodes a MessageSigningOutput message from the specified reader or buffer.
113722
+ * @function decode
113723
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113724
+ * @static
113725
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
113726
+ * @param {number} [length] Message length if known beforehand
113727
+ * @returns {TW.Solana.Proto.MessageSigningOutput} MessageSigningOutput
113728
+ * @throws {Error} If the payload is not a reader or valid buffer
113729
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
113730
+ */
113731
+ MessageSigningOutput.decode = function decode(reader, length) {
113732
+ if (!(reader instanceof $Reader))
113733
+ reader = $Reader.create(reader);
113734
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.MessageSigningOutput();
113735
+ while (reader.pos < end) {
113736
+ var tag = reader.uint32();
113737
+ switch (tag >>> 3) {
113738
+ case 1:
113739
+ message.signature = reader.string();
113740
+ break;
113741
+ case 2:
113742
+ message.error = reader.int32();
113743
+ break;
113744
+ case 3:
113745
+ message.errorMessage = reader.string();
113746
+ break;
113747
+ default:
113748
+ reader.skipType(tag & 7);
113749
+ break;
113750
+ }
113751
+ }
113752
+ return message;
113753
+ };
113754
+
113755
+ /**
113756
+ * Verifies a MessageSigningOutput message.
113757
+ * @function verify
113758
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113759
+ * @static
113760
+ * @param {Object.<string,*>} message Plain object to verify
113761
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
113762
+ */
113763
+ MessageSigningOutput.verify = function verify(message) {
113764
+ if (typeof message !== "object" || message === null)
113765
+ return "object expected";
113766
+ if (message.signature != null && message.hasOwnProperty("signature"))
113767
+ if (!$util.isString(message.signature))
113768
+ return "signature: string expected";
113769
+ if (message.error != null && message.hasOwnProperty("error"))
113770
+ switch (message.error) {
113771
+ default:
113772
+ return "error: enum value expected";
113773
+ case 0:
113774
+ case 1:
113775
+ case 2:
113776
+ case 3:
113777
+ case 4:
113778
+ case 5:
113779
+ case 15:
113780
+ case 16:
113781
+ case 17:
113782
+ case 18:
113783
+ case 6:
113784
+ case 7:
113785
+ case 8:
113786
+ case 9:
113787
+ case 10:
113788
+ case 11:
113789
+ case 12:
113790
+ case 13:
113791
+ case 14:
113792
+ case 19:
113793
+ case 20:
113794
+ case 21:
113795
+ case 22:
113796
+ case 23:
113797
+ case 24:
113798
+ case 25:
113799
+ break;
113800
+ }
113801
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
113802
+ if (!$util.isString(message.errorMessage))
113803
+ return "errorMessage: string expected";
113804
+ return null;
113805
+ };
113806
+
113807
+ /**
113808
+ * Creates a MessageSigningOutput message from a plain object. Also converts values to their respective internal types.
113809
+ * @function fromObject
113810
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113811
+ * @static
113812
+ * @param {Object.<string,*>} object Plain object
113813
+ * @returns {TW.Solana.Proto.MessageSigningOutput} MessageSigningOutput
113814
+ */
113815
+ MessageSigningOutput.fromObject = function fromObject(object) {
113816
+ if (object instanceof $root.TW.Solana.Proto.MessageSigningOutput)
113817
+ return object;
113818
+ var message = new $root.TW.Solana.Proto.MessageSigningOutput();
113819
+ if (object.signature != null)
113820
+ message.signature = String(object.signature);
113821
+ switch (object.error) {
113822
+ case "OK":
113823
+ case 0:
113824
+ message.error = 0;
113825
+ break;
113826
+ case "Error_general":
113827
+ case 1:
113828
+ message.error = 1;
113829
+ break;
113830
+ case "Error_internal":
113831
+ case 2:
113832
+ message.error = 2;
113833
+ break;
113834
+ case "Error_low_balance":
113835
+ case 3:
113836
+ message.error = 3;
113837
+ break;
113838
+ case "Error_zero_amount_requested":
113839
+ case 4:
113840
+ message.error = 4;
113841
+ break;
113842
+ case "Error_missing_private_key":
113843
+ case 5:
113844
+ message.error = 5;
113845
+ break;
113846
+ case "Error_invalid_private_key":
113847
+ case 15:
113848
+ message.error = 15;
113849
+ break;
113850
+ case "Error_invalid_address":
113851
+ case 16:
113852
+ message.error = 16;
113853
+ break;
113854
+ case "Error_invalid_utxo":
113855
+ case 17:
113856
+ message.error = 17;
113857
+ break;
113858
+ case "Error_invalid_utxo_amount":
113859
+ case 18:
113860
+ message.error = 18;
113861
+ break;
113862
+ case "Error_wrong_fee":
113863
+ case 6:
113864
+ message.error = 6;
113865
+ break;
113866
+ case "Error_signing":
113867
+ case 7:
113868
+ message.error = 7;
113869
+ break;
113870
+ case "Error_tx_too_big":
113871
+ case 8:
113872
+ message.error = 8;
113873
+ break;
113874
+ case "Error_missing_input_utxos":
113875
+ case 9:
113876
+ message.error = 9;
113877
+ break;
113878
+ case "Error_not_enough_utxos":
113879
+ case 10:
113880
+ message.error = 10;
113881
+ break;
113882
+ case "Error_script_redeem":
113883
+ case 11:
113884
+ message.error = 11;
113885
+ break;
113886
+ case "Error_script_output":
113887
+ case 12:
113888
+ message.error = 12;
113889
+ break;
113890
+ case "Error_script_witness_program":
113891
+ case 13:
113892
+ message.error = 13;
113893
+ break;
113894
+ case "Error_invalid_memo":
113895
+ case 14:
113896
+ message.error = 14;
113897
+ break;
113898
+ case "Error_input_parse":
113899
+ case 19:
113900
+ message.error = 19;
113901
+ break;
113902
+ case "Error_no_support_n2n":
113903
+ case 20:
113904
+ message.error = 20;
113905
+ break;
113906
+ case "Error_signatures_count":
113907
+ case 21:
113908
+ message.error = 21;
113909
+ break;
113910
+ case "Error_invalid_params":
113911
+ case 22:
113912
+ message.error = 22;
113913
+ break;
113914
+ case "Error_invalid_requested_token_amount":
113915
+ case 23:
113916
+ message.error = 23;
113917
+ break;
113918
+ case "Error_not_supported":
113919
+ case 24:
113920
+ message.error = 24;
113921
+ break;
113922
+ case "Error_dust_amount_requested":
113923
+ case 25:
113924
+ message.error = 25;
113925
+ break;
113926
+ }
113927
+ if (object.errorMessage != null)
113928
+ message.errorMessage = String(object.errorMessage);
113929
+ return message;
113930
+ };
113931
+
113932
+ /**
113933
+ * Creates a plain object from a MessageSigningOutput message. Also converts values to other types if specified.
113934
+ * @function toObject
113935
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113936
+ * @static
113937
+ * @param {TW.Solana.Proto.MessageSigningOutput} message MessageSigningOutput
113938
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
113939
+ * @returns {Object.<string,*>} Plain object
113940
+ */
113941
+ MessageSigningOutput.toObject = function toObject(message, options) {
113942
+ if (!options)
113943
+ options = {};
113944
+ var object = {};
113945
+ if (options.defaults) {
113946
+ object.signature = "";
113947
+ object.error = options.enums === String ? "OK" : 0;
113948
+ object.errorMessage = "";
113949
+ }
113950
+ if (message.signature != null && message.hasOwnProperty("signature"))
113951
+ object.signature = message.signature;
113952
+ if (message.error != null && message.hasOwnProperty("error"))
113953
+ object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
113954
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
113955
+ object.errorMessage = message.errorMessage;
113956
+ return object;
113957
+ };
113958
+
113959
+ /**
113960
+ * Converts this MessageSigningOutput to JSON.
113961
+ * @function toJSON
113962
+ * @memberof TW.Solana.Proto.MessageSigningOutput
113963
+ * @instance
113964
+ * @returns {Object.<string,*>} JSON object
113965
+ */
113966
+ MessageSigningOutput.prototype.toJSON = function toJSON() {
113967
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
113968
+ };
113969
+
113970
+ return MessageSigningOutput;
113971
+ })();
113972
+
113973
+ Proto.MessageVerifyingInput = (function() {
113974
+
113975
+ /**
113976
+ * Properties of a MessageVerifyingInput.
113977
+ * @memberof TW.Solana.Proto
113978
+ * @interface IMessageVerifyingInput
113979
+ * @property {string|null} [message] MessageVerifyingInput message
113980
+ * @property {Uint8Array|null} [publicKey] MessageVerifyingInput publicKey
113981
+ * @property {string|null} [signature] MessageVerifyingInput signature
113982
+ */
113983
+
113984
+ /**
113985
+ * Constructs a new MessageVerifyingInput.
113986
+ * @memberof TW.Solana.Proto
113987
+ * @classdesc Represents a MessageVerifyingInput.
113988
+ * @implements IMessageVerifyingInput
113989
+ * @constructor
113990
+ * @param {TW.Solana.Proto.IMessageVerifyingInput=} [properties] Properties to set
113991
+ */
113992
+ function MessageVerifyingInput(properties) {
113993
+ if (properties)
113994
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
113995
+ if (properties[keys[i]] != null)
113996
+ this[keys[i]] = properties[keys[i]];
113997
+ }
113998
+
113999
+ /**
114000
+ * MessageVerifyingInput message.
114001
+ * @member {string} message
114002
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114003
+ * @instance
114004
+ */
114005
+ MessageVerifyingInput.prototype.message = "";
114006
+
114007
+ /**
114008
+ * MessageVerifyingInput publicKey.
114009
+ * @member {Uint8Array} publicKey
114010
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114011
+ * @instance
114012
+ */
114013
+ MessageVerifyingInput.prototype.publicKey = $util.newBuffer([]);
114014
+
114015
+ /**
114016
+ * MessageVerifyingInput signature.
114017
+ * @member {string} signature
114018
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114019
+ * @instance
114020
+ */
114021
+ MessageVerifyingInput.prototype.signature = "";
114022
+
114023
+ /**
114024
+ * Creates a new MessageVerifyingInput instance using the specified properties.
114025
+ * @function create
114026
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114027
+ * @static
114028
+ * @param {TW.Solana.Proto.IMessageVerifyingInput=} [properties] Properties to set
114029
+ * @returns {TW.Solana.Proto.MessageVerifyingInput} MessageVerifyingInput instance
114030
+ */
114031
+ MessageVerifyingInput.create = function create(properties) {
114032
+ return new MessageVerifyingInput(properties);
114033
+ };
114034
+
114035
+ /**
114036
+ * Encodes the specified MessageVerifyingInput message. Does not implicitly {@link TW.Solana.Proto.MessageVerifyingInput.verify|verify} messages.
114037
+ * @function encode
114038
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114039
+ * @static
114040
+ * @param {TW.Solana.Proto.IMessageVerifyingInput} message MessageVerifyingInput message or plain object to encode
114041
+ * @param {$protobuf.Writer} [writer] Writer to encode to
114042
+ * @returns {$protobuf.Writer} Writer
114043
+ */
114044
+ MessageVerifyingInput.encode = function encode(message, writer) {
114045
+ if (!writer)
114046
+ writer = $Writer.create();
114047
+ if (message.message != null && Object.hasOwnProperty.call(message, "message"))
114048
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.message);
114049
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
114050
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKey);
114051
+ if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
114052
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.signature);
114053
+ return writer;
114054
+ };
114055
+
114056
+ /**
114057
+ * Decodes a MessageVerifyingInput message from the specified reader or buffer.
114058
+ * @function decode
114059
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114060
+ * @static
114061
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
114062
+ * @param {number} [length] Message length if known beforehand
114063
+ * @returns {TW.Solana.Proto.MessageVerifyingInput} MessageVerifyingInput
114064
+ * @throws {Error} If the payload is not a reader or valid buffer
114065
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
114066
+ */
114067
+ MessageVerifyingInput.decode = function decode(reader, length) {
114068
+ if (!(reader instanceof $Reader))
114069
+ reader = $Reader.create(reader);
114070
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Solana.Proto.MessageVerifyingInput();
114071
+ while (reader.pos < end) {
114072
+ var tag = reader.uint32();
114073
+ switch (tag >>> 3) {
114074
+ case 1:
114075
+ message.message = reader.string();
114076
+ break;
114077
+ case 2:
114078
+ message.publicKey = reader.bytes();
114079
+ break;
114080
+ case 3:
114081
+ message.signature = reader.string();
114082
+ break;
114083
+ default:
114084
+ reader.skipType(tag & 7);
114085
+ break;
114086
+ }
114087
+ }
114088
+ return message;
114089
+ };
114090
+
114091
+ /**
114092
+ * Verifies a MessageVerifyingInput message.
114093
+ * @function verify
114094
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114095
+ * @static
114096
+ * @param {Object.<string,*>} message Plain object to verify
114097
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
114098
+ */
114099
+ MessageVerifyingInput.verify = function verify(message) {
114100
+ if (typeof message !== "object" || message === null)
114101
+ return "object expected";
114102
+ if (message.message != null && message.hasOwnProperty("message"))
114103
+ if (!$util.isString(message.message))
114104
+ return "message: string expected";
114105
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
114106
+ if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
114107
+ return "publicKey: buffer expected";
114108
+ if (message.signature != null && message.hasOwnProperty("signature"))
114109
+ if (!$util.isString(message.signature))
114110
+ return "signature: string expected";
114111
+ return null;
114112
+ };
114113
+
114114
+ /**
114115
+ * Creates a MessageVerifyingInput message from a plain object. Also converts values to their respective internal types.
114116
+ * @function fromObject
114117
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114118
+ * @static
114119
+ * @param {Object.<string,*>} object Plain object
114120
+ * @returns {TW.Solana.Proto.MessageVerifyingInput} MessageVerifyingInput
114121
+ */
114122
+ MessageVerifyingInput.fromObject = function fromObject(object) {
114123
+ if (object instanceof $root.TW.Solana.Proto.MessageVerifyingInput)
114124
+ return object;
114125
+ var message = new $root.TW.Solana.Proto.MessageVerifyingInput();
114126
+ if (object.message != null)
114127
+ message.message = String(object.message);
114128
+ if (object.publicKey != null)
114129
+ if (typeof object.publicKey === "string")
114130
+ $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
114131
+ else if (object.publicKey.length)
114132
+ message.publicKey = object.publicKey;
114133
+ if (object.signature != null)
114134
+ message.signature = String(object.signature);
114135
+ return message;
114136
+ };
114137
+
114138
+ /**
114139
+ * Creates a plain object from a MessageVerifyingInput message. Also converts values to other types if specified.
114140
+ * @function toObject
114141
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114142
+ * @static
114143
+ * @param {TW.Solana.Proto.MessageVerifyingInput} message MessageVerifyingInput
114144
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
114145
+ * @returns {Object.<string,*>} Plain object
114146
+ */
114147
+ MessageVerifyingInput.toObject = function toObject(message, options) {
114148
+ if (!options)
114149
+ options = {};
114150
+ var object = {};
114151
+ if (options.defaults) {
114152
+ object.message = "";
114153
+ if (options.bytes === String)
114154
+ object.publicKey = "";
114155
+ else {
114156
+ object.publicKey = [];
114157
+ if (options.bytes !== Array)
114158
+ object.publicKey = $util.newBuffer(object.publicKey);
114159
+ }
114160
+ object.signature = "";
114161
+ }
114162
+ if (message.message != null && message.hasOwnProperty("message"))
114163
+ object.message = message.message;
114164
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
114165
+ object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
114166
+ if (message.signature != null && message.hasOwnProperty("signature"))
114167
+ object.signature = message.signature;
114168
+ return object;
114169
+ };
114170
+
114171
+ /**
114172
+ * Converts this MessageVerifyingInput to JSON.
114173
+ * @function toJSON
114174
+ * @memberof TW.Solana.Proto.MessageVerifyingInput
114175
+ * @instance
114176
+ * @returns {Object.<string,*>} JSON object
114177
+ */
114178
+ MessageVerifyingInput.prototype.toJSON = function toJSON() {
114179
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
114180
+ };
114181
+
114182
+ return MessageVerifyingInput;
114183
+ })();
114184
+
113339
114185
  return Proto;
113340
114186
  })();
113341
114187
 
@@ -36,7 +36,7 @@ function $a(a,b){var c=M;return sa||"function"!=typeof WebAssembly.instantiateSt
36
36
  function z(a,b){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){n("Module."+a+" has been replaced with plain "+b+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}
37
37
  function cb(a){return"FS_createPath"===a||"FS_createDataFile"===a||"FS_createPreloadedFile"===a||"FS_unlink"===a||"addRunDependency"===a||"FS_createLazyFile"===a||"FS_createDevice"===a||"removeRunDependency"===a}(function(a,b){"undefined"!==typeof globalThis&&Object.defineProperty(globalThis,a,{configurable:!0,get:function(){ya("`"+a+"` is not longer defined by emscripten. "+b)}})})("buffer","Please use HEAP8.buffer or wasmMemory.buffer");
38
38
  function db(a){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){var b="'"+a+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";cb(a)&&(b+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");n(b)}})}
39
- var eb={2085716:()=>{if(void 0===g.fa)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.fa=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.fa=a}catch(e){throw"No secure random number generator found";}}},2086438:()=>g.fa()};
39
+ var eb={2087380:()=>{if(void 0===g.fa)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.fa=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.fa=a}catch(e){throw"No secure random number generator found";}}},2088102:()=>g.fa()};
40
40
  function qa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function fb(a){for(;0<a.length;)a.shift()(g)}function za(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function ya(a){gb||(gb={});gb[a]||(gb[a]=1,w&&(a="warning: "+a),y(a))}var gb,hb=[];function ib(a){var b=hb[a];b||(a>=hb.length&&(hb.length=a+1),hb[a]=b=Ha.get(a));assert(Ha.get(a)==b,"JavaScript-side Wasm function table mirror is out of date!");return b}
41
41
  function jb(a){this.l=a-24;this.Oa=function(b){G[this.l+4>>2]=b};this.Ja=function(b){G[this.l+8>>2]=b};this.Ka=function(){F[this.l>>2]=0};this.Ea=function(){D[this.l+12>>0]=0};this.La=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Da();this.Oa(b);this.Ja(c);this.Ka();this.Ea();this.La()};this.Da=function(){G[this.l+16>>2]=0}}
42
42
  var kb=0,lb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},mb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=lb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},nb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},ob=
Binary file
@@ -115,6 +115,12 @@ export class Base64 {
115
115
  static encode(data: Uint8Array | Buffer): string;
116
116
  static encodeUrl(data: Uint8Array | Buffer): string;
117
117
  }
118
+ export class Bech32 {
119
+ static encode(hrp: string, data: Uint8Array | Buffer): string;
120
+ static decode(string: string): Uint8Array;
121
+ static encodeM(hrp: string, data: Uint8Array | Buffer): string;
122
+ static decodeM(string: string): Uint8Array;
123
+ }
118
124
  export class BitcoinAddress {
119
125
  static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
120
126
  static isValid(data: Uint8Array | Buffer): boolean;
@@ -780,6 +786,10 @@ export class Hash {
780
786
  export class LiquidStaking {
781
787
  static buildRequest(input: Uint8Array | Buffer): Uint8Array;
782
788
  }
789
+ export class MessageSigner {
790
+ static sign(coin: CoinType, input: Uint8Array | Buffer): Uint8Array;
791
+ static verify(coin: CoinType, input: Uint8Array | Buffer): boolean;
792
+ }
783
793
  export class Mnemonic {
784
794
  static isValid(mnemonic: string): boolean;
785
795
  static isValidWord(word: string): boolean;
@@ -1038,6 +1048,7 @@ export interface WalletCore {
1038
1048
  Base32: typeof Base32;
1039
1049
  Base58: typeof Base58;
1040
1050
  Base64: typeof Base64;
1051
+ Bech32: typeof Bech32;
1041
1052
  BitcoinAddress: typeof BitcoinAddress;
1042
1053
  BitcoinMessageSigner: typeof BitcoinMessageSigner;
1043
1054
  BitcoinScript: typeof BitcoinScript;
@@ -1071,6 +1082,7 @@ export interface WalletCore {
1071
1082
  HRP: typeof HRP;
1072
1083
  Hash: typeof Hash;
1073
1084
  LiquidStaking: typeof LiquidStaking;
1085
+ MessageSigner: typeof MessageSigner;
1074
1086
  Mnemonic: typeof Mnemonic;
1075
1087
  NEARAccount: typeof NEARAccount;
1076
1088
  NervosAddress: typeof NervosAddress;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/wallet-core",
3
- "version": "4.1.19",
3
+ "version": "4.1.21",
4
4
  "description": "wallet core wasm and protobuf models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",