@trustwallet/wallet-core 4.1.17 → 4.1.19

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.
@@ -30446,6 +30446,13 @@ export namespace TW {
30446
30446
  /** Namespace Proto. */
30447
30447
  namespace Proto {
30448
30448
 
30449
+ /** NetworkId enum. */
30450
+ enum NetworkId {
30451
+ UseDefault = 0,
30452
+ Mainnet = 42,
30453
+ MainnetAlbatross = 24
30454
+ }
30455
+
30449
30456
  /** Properties of a SigningInput. */
30450
30457
  interface ISigningInput {
30451
30458
 
@@ -30463,6 +30470,9 @@ export namespace TW {
30463
30470
 
30464
30471
  /** SigningInput validityStartHeight */
30465
30472
  validityStartHeight?: (number|null);
30473
+
30474
+ /** SigningInput networkId */
30475
+ networkId?: (TW.Nimiq.Proto.NetworkId|null);
30466
30476
  }
30467
30477
 
30468
30478
  /** Represents a SigningInput. */
@@ -30489,6 +30499,9 @@ export namespace TW {
30489
30499
  /** SigningInput validityStartHeight. */
30490
30500
  public validityStartHeight: number;
30491
30501
 
30502
+ /** SigningInput networkId. */
30503
+ public networkId: TW.Nimiq.Proto.NetworkId;
30504
+
30492
30505
  /**
30493
30506
  * Creates a new SigningInput instance using the specified properties.
30494
30507
  * @param [properties] Properties to set
@@ -90644,6 +90644,22 @@
90644
90644
  */
90645
90645
  var Proto = {};
90646
90646
 
90647
+ /**
90648
+ * NetworkId enum.
90649
+ * @name TW.Nimiq.Proto.NetworkId
90650
+ * @enum {number}
90651
+ * @property {number} UseDefault=0 UseDefault value
90652
+ * @property {number} Mainnet=42 Mainnet value
90653
+ * @property {number} MainnetAlbatross=24 MainnetAlbatross value
90654
+ */
90655
+ Proto.NetworkId = (function() {
90656
+ var valuesById = {}, values = Object.create(valuesById);
90657
+ values[valuesById[0] = "UseDefault"] = 0;
90658
+ values[valuesById[42] = "Mainnet"] = 42;
90659
+ values[valuesById[24] = "MainnetAlbatross"] = 24;
90660
+ return values;
90661
+ })();
90662
+
90647
90663
  Proto.SigningInput = (function() {
90648
90664
 
90649
90665
  /**
@@ -90655,6 +90671,7 @@
90655
90671
  * @property {Long|null} [value] SigningInput value
90656
90672
  * @property {Long|null} [fee] SigningInput fee
90657
90673
  * @property {number|null} [validityStartHeight] SigningInput validityStartHeight
90674
+ * @property {TW.Nimiq.Proto.NetworkId|null} [networkId] SigningInput networkId
90658
90675
  */
90659
90676
 
90660
90677
  /**
@@ -90712,6 +90729,14 @@
90712
90729
  */
90713
90730
  SigningInput.prototype.validityStartHeight = 0;
90714
90731
 
90732
+ /**
90733
+ * SigningInput networkId.
90734
+ * @member {TW.Nimiq.Proto.NetworkId} networkId
90735
+ * @memberof TW.Nimiq.Proto.SigningInput
90736
+ * @instance
90737
+ */
90738
+ SigningInput.prototype.networkId = 0;
90739
+
90715
90740
  /**
90716
90741
  * Creates a new SigningInput instance using the specified properties.
90717
90742
  * @function create
@@ -90746,6 +90771,8 @@
90746
90771
  writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fee);
90747
90772
  if (message.validityStartHeight != null && Object.hasOwnProperty.call(message, "validityStartHeight"))
90748
90773
  writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.validityStartHeight);
90774
+ if (message.networkId != null && Object.hasOwnProperty.call(message, "networkId"))
90775
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.networkId);
90749
90776
  return writer;
90750
90777
  };
90751
90778
 
@@ -90782,6 +90809,9 @@
90782
90809
  case 5:
90783
90810
  message.validityStartHeight = reader.uint32();
90784
90811
  break;
90812
+ case 6:
90813
+ message.networkId = reader.int32();
90814
+ break;
90785
90815
  default:
90786
90816
  reader.skipType(tag & 7);
90787
90817
  break;
@@ -90816,6 +90846,15 @@
90816
90846
  if (message.validityStartHeight != null && message.hasOwnProperty("validityStartHeight"))
90817
90847
  if (!$util.isInteger(message.validityStartHeight))
90818
90848
  return "validityStartHeight: integer expected";
90849
+ if (message.networkId != null && message.hasOwnProperty("networkId"))
90850
+ switch (message.networkId) {
90851
+ default:
90852
+ return "networkId: enum value expected";
90853
+ case 0:
90854
+ case 42:
90855
+ case 24:
90856
+ break;
90857
+ }
90819
90858
  return null;
90820
90859
  };
90821
90860
 
@@ -90858,6 +90897,20 @@
90858
90897
  message.fee = new $util.LongBits(object.fee.low >>> 0, object.fee.high >>> 0).toNumber(true);
90859
90898
  if (object.validityStartHeight != null)
90860
90899
  message.validityStartHeight = object.validityStartHeight >>> 0;
90900
+ switch (object.networkId) {
90901
+ case "UseDefault":
90902
+ case 0:
90903
+ message.networkId = 0;
90904
+ break;
90905
+ case "Mainnet":
90906
+ case 42:
90907
+ message.networkId = 42;
90908
+ break;
90909
+ case "MainnetAlbatross":
90910
+ case 24:
90911
+ message.networkId = 24;
90912
+ break;
90913
+ }
90861
90914
  return message;
90862
90915
  };
90863
90916
 
@@ -90894,6 +90947,7 @@
90894
90947
  } else
90895
90948
  object.fee = options.longs === String ? "0" : 0;
90896
90949
  object.validityStartHeight = 0;
90950
+ object.networkId = options.enums === String ? "UseDefault" : 0;
90897
90951
  }
90898
90952
  if (message.privateKey != null && message.hasOwnProperty("privateKey"))
90899
90953
  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;
@@ -90911,6 +90965,8 @@
90911
90965
  object.fee = options.longs === String ? $util.Long.prototype.toString.call(message.fee) : options.longs === Number ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber(true) : message.fee;
90912
90966
  if (message.validityStartHeight != null && message.hasOwnProperty("validityStartHeight"))
90913
90967
  object.validityStartHeight = message.validityStartHeight;
90968
+ if (message.networkId != null && message.hasOwnProperty("networkId"))
90969
+ object.networkId = options.enums === String ? $root.TW.Nimiq.Proto.NetworkId[message.networkId] : message.networkId;
90914
90970
  return object;
90915
90971
  };
90916
90972
 
@@ -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={2085524:()=>{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";}}},2086246:()=>g.fa()};
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()};
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/wallet-core",
3
- "version": "4.1.17",
3
+ "version": "4.1.19",
4
4
  "description": "wallet core wasm and protobuf models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",