@trustwallet/wallet-core 3.0.8 → 3.0.9

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.
@@ -20560,12 +20560,6 @@ export namespace TW {
20560
20560
  /** Namespace Proto. */
20561
20561
  namespace Proto {
20562
20562
 
20563
- /** Network enum. */
20564
- enum Network {
20565
- POLKADOT = 0,
20566
- KUSAMA = 2
20567
- }
20568
-
20569
20563
  /** RewardDestination enum. */
20570
20564
  enum RewardDestination {
20571
20565
  STAKED = 0,
@@ -21567,7 +21561,7 @@ export namespace TW {
21567
21561
  privateKey?: (Uint8Array|null);
21568
21562
 
21569
21563
  /** SigningInput network */
21570
- network?: (TW.Polkadot.Proto.Network|null);
21564
+ network?: (number|null);
21571
21565
 
21572
21566
  /** SigningInput balanceCall */
21573
21567
  balanceCall?: (TW.Polkadot.Proto.IBalance|null);
@@ -21610,7 +21604,7 @@ export namespace TW {
21610
21604
  public privateKey: Uint8Array;
21611
21605
 
21612
21606
  /** SigningInput network. */
21613
- public network: TW.Polkadot.Proto.Network;
21607
+ public network: number;
21614
21608
 
21615
21609
  /** SigningInput balanceCall. */
21616
21610
  public balanceCall?: (TW.Polkadot.Proto.IBalance|null);
@@ -22967,6 +22961,9 @@ export namespace TW {
22967
22961
 
22968
22962
  /** SigningOutput encoded */
22969
22963
  encoded?: (string|null);
22964
+
22965
+ /** SigningOutput unsignedTx */
22966
+ unsignedTx?: (string|null);
22970
22967
  }
22971
22968
 
22972
22969
  /** Represents a SigningOutput. */
@@ -22981,6 +22978,9 @@ export namespace TW {
22981
22978
  /** SigningOutput encoded. */
22982
22979
  public encoded: string;
22983
22980
 
22981
+ /** SigningOutput unsignedTx. */
22982
+ public unsignedTx: string;
22983
+
22984
22984
  /**
22985
22985
  * Creates a new SigningOutput instance using the specified properties.
22986
22986
  * @param [properties] Properties to set
@@ -60138,20 +60138,6 @@
60138
60138
  */
60139
60139
  var Proto = {};
60140
60140
 
60141
- /**
60142
- * Network enum.
60143
- * @name TW.Polkadot.Proto.Network
60144
- * @enum {number}
60145
- * @property {number} POLKADOT=0 POLKADOT value
60146
- * @property {number} KUSAMA=2 KUSAMA value
60147
- */
60148
- Proto.Network = (function() {
60149
- var valuesById = {}, values = Object.create(valuesById);
60150
- values[valuesById[0] = "POLKADOT"] = 0;
60151
- values[valuesById[2] = "KUSAMA"] = 2;
60152
- return values;
60153
- })();
60154
-
60155
60141
  /**
60156
60142
  * RewardDestination enum.
60157
60143
  * @name TW.Polkadot.Proto.RewardDestination
@@ -62646,7 +62632,7 @@
62646
62632
  * @property {Uint8Array|null} [tip] SigningInput tip
62647
62633
  * @property {TW.Polkadot.Proto.IEra|null} [era] SigningInput era
62648
62634
  * @property {Uint8Array|null} [privateKey] SigningInput privateKey
62649
- * @property {TW.Polkadot.Proto.Network|null} [network] SigningInput network
62635
+ * @property {number|null} [network] SigningInput network
62650
62636
  * @property {TW.Polkadot.Proto.IBalance|null} [balanceCall] SigningInput balanceCall
62651
62637
  * @property {TW.Polkadot.Proto.IStaking|null} [stakingCall] SigningInput stakingCall
62652
62638
  */
@@ -62732,7 +62718,7 @@
62732
62718
 
62733
62719
  /**
62734
62720
  * SigningInput network.
62735
- * @member {TW.Polkadot.Proto.Network} network
62721
+ * @member {number} network
62736
62722
  * @memberof TW.Polkadot.Proto.SigningInput
62737
62723
  * @instance
62738
62724
  */
@@ -62809,7 +62795,7 @@
62809
62795
  if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
62810
62796
  writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.privateKey);
62811
62797
  if (message.network != null && Object.hasOwnProperty.call(message, "network"))
62812
- writer.uint32(/* id 9, wireType 0 =*/72).int32(message.network);
62798
+ writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.network);
62813
62799
  if (message.balanceCall != null && Object.hasOwnProperty.call(message, "balanceCall"))
62814
62800
  $root.TW.Polkadot.Proto.Balance.encode(message.balanceCall, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
62815
62801
  if (message.stakingCall != null && Object.hasOwnProperty.call(message, "stakingCall"))
@@ -62860,7 +62846,7 @@
62860
62846
  message.privateKey = reader.bytes();
62861
62847
  break;
62862
62848
  case 9:
62863
- message.network = reader.int32();
62849
+ message.network = reader.uint32();
62864
62850
  break;
62865
62851
  case 10:
62866
62852
  message.balanceCall = $root.TW.Polkadot.Proto.Balance.decode(reader, reader.uint32());
@@ -62915,13 +62901,8 @@
62915
62901
  if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey)))
62916
62902
  return "privateKey: buffer expected";
62917
62903
  if (message.network != null && message.hasOwnProperty("network"))
62918
- switch (message.network) {
62919
- default:
62920
- return "network: enum value expected";
62921
- case 0:
62922
- case 2:
62923
- break;
62924
- }
62904
+ if (!$util.isInteger(message.network))
62905
+ return "network: integer expected";
62925
62906
  if (message.balanceCall != null && message.hasOwnProperty("balanceCall")) {
62926
62907
  properties.messageOneof = 1;
62927
62908
  {
@@ -62993,16 +62974,8 @@
62993
62974
  $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0);
62994
62975
  else if (object.privateKey.length)
62995
62976
  message.privateKey = object.privateKey;
62996
- switch (object.network) {
62997
- case "POLKADOT":
62998
- case 0:
62999
- message.network = 0;
63000
- break;
63001
- case "KUSAMA":
63002
- case 2:
63003
- message.network = 2;
63004
- break;
63005
- }
62977
+ if (object.network != null)
62978
+ message.network = object.network >>> 0;
63006
62979
  if (object.balanceCall != null) {
63007
62980
  if (typeof object.balanceCall !== "object")
63008
62981
  throw TypeError(".TW.Polkadot.Proto.SigningInput.balanceCall: object expected");
@@ -63066,7 +63039,7 @@
63066
63039
  if (options.bytes !== Array)
63067
63040
  object.privateKey = $util.newBuffer(object.privateKey);
63068
63041
  }
63069
- object.network = options.enums === String ? "POLKADOT" : 0;
63042
+ object.network = 0;
63070
63043
  }
63071
63044
  if (message.blockHash != null && message.hasOwnProperty("blockHash"))
63072
63045
  object.blockHash = options.bytes === String ? $util.base64.encode(message.blockHash, 0, message.blockHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.blockHash) : message.blockHash;
@@ -63088,7 +63061,7 @@
63088
63061
  if (message.privateKey != null && message.hasOwnProperty("privateKey"))
63089
63062
  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;
63090
63063
  if (message.network != null && message.hasOwnProperty("network"))
63091
- object.network = options.enums === String ? $root.TW.Polkadot.Proto.Network[message.network] : message.network;
63064
+ object.network = message.network;
63092
63065
  if (message.balanceCall != null && message.hasOwnProperty("balanceCall")) {
63093
63066
  object.balanceCall = $root.TW.Polkadot.Proto.Balance.toObject(message.balanceCall, options);
63094
63067
  if (options.oneofs)
@@ -66803,6 +66776,7 @@
66803
66776
  * @memberof TW.Solana.Proto
66804
66777
  * @interface ISigningOutput
66805
66778
  * @property {string|null} [encoded] SigningOutput encoded
66779
+ * @property {string|null} [unsignedTx] SigningOutput unsignedTx
66806
66780
  */
66807
66781
 
66808
66782
  /**
@@ -66828,6 +66802,14 @@
66828
66802
  */
66829
66803
  SigningOutput.prototype.encoded = "";
66830
66804
 
66805
+ /**
66806
+ * SigningOutput unsignedTx.
66807
+ * @member {string} unsignedTx
66808
+ * @memberof TW.Solana.Proto.SigningOutput
66809
+ * @instance
66810
+ */
66811
+ SigningOutput.prototype.unsignedTx = "";
66812
+
66831
66813
  /**
66832
66814
  * Creates a new SigningOutput instance using the specified properties.
66833
66815
  * @function create
@@ -66854,6 +66836,8 @@
66854
66836
  writer = $Writer.create();
66855
66837
  if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
66856
66838
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoded);
66839
+ if (message.unsignedTx != null && Object.hasOwnProperty.call(message, "unsignedTx"))
66840
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.unsignedTx);
66857
66841
  return writer;
66858
66842
  };
66859
66843
 
@@ -66878,6 +66862,9 @@
66878
66862
  case 1:
66879
66863
  message.encoded = reader.string();
66880
66864
  break;
66865
+ case 2:
66866
+ message.unsignedTx = reader.string();
66867
+ break;
66881
66868
  default:
66882
66869
  reader.skipType(tag & 7);
66883
66870
  break;
@@ -66900,6 +66887,9 @@
66900
66887
  if (message.encoded != null && message.hasOwnProperty("encoded"))
66901
66888
  if (!$util.isString(message.encoded))
66902
66889
  return "encoded: string expected";
66890
+ if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
66891
+ if (!$util.isString(message.unsignedTx))
66892
+ return "unsignedTx: string expected";
66903
66893
  return null;
66904
66894
  };
66905
66895
 
@@ -66917,6 +66907,8 @@
66917
66907
  var message = new $root.TW.Solana.Proto.SigningOutput();
66918
66908
  if (object.encoded != null)
66919
66909
  message.encoded = String(object.encoded);
66910
+ if (object.unsignedTx != null)
66911
+ message.unsignedTx = String(object.unsignedTx);
66920
66912
  return message;
66921
66913
  };
66922
66914
 
@@ -66933,10 +66925,14 @@
66933
66925
  if (!options)
66934
66926
  options = {};
66935
66927
  var object = {};
66936
- if (options.defaults)
66928
+ if (options.defaults) {
66937
66929
  object.encoded = "";
66930
+ object.unsignedTx = "";
66931
+ }
66938
66932
  if (message.encoded != null && message.hasOwnProperty("encoded"))
66939
66933
  object.encoded = message.encoded;
66934
+ if (message.unsignedTx != null && message.hasOwnProperty("unsignedTx"))
66935
+ object.unsignedTx = message.unsignedTx;
66940
66936
  return object;
66941
66937
  };
66942
66938
 
Binary file