@trustwallet/wallet-core 3.2.9 → 3.2.10

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.
@@ -2474,6 +2474,9 @@ export namespace TW {
2474
2474
 
2475
2475
  /** ContractAddressInput publicKey */
2476
2476
  publicKey?: (string|null);
2477
+
2478
+ /** ContractAddressInput salt */
2479
+ salt?: (number|null);
2477
2480
  }
2478
2481
 
2479
2482
  /** Represents a ContractAddressInput. */
@@ -2509,6 +2512,9 @@ export namespace TW {
2509
2512
  /** ContractAddressInput publicKey. */
2510
2513
  public publicKey: string;
2511
2514
 
2515
+ /** ContractAddressInput salt. */
2516
+ public salt: number;
2517
+
2512
2518
  /**
2513
2519
  * Creates a new ContractAddressInput instance using the specified properties.
2514
2520
  * @param [properties] Properties to set
@@ -7089,6 +7089,7 @@
7089
7089
  * @property {string|null} [defaultFallback] ContractAddressInput defaultFallback
7090
7090
  * @property {string|null} [bytecode] ContractAddressInput bytecode
7091
7091
  * @property {string|null} [publicKey] ContractAddressInput publicKey
7092
+ * @property {number|null} [salt] ContractAddressInput salt
7092
7093
  */
7093
7094
 
7094
7095
  /**
@@ -7170,6 +7171,14 @@
7170
7171
  */
7171
7172
  ContractAddressInput.prototype.publicKey = "";
7172
7173
 
7174
+ /**
7175
+ * ContractAddressInput salt.
7176
+ * @member {number} salt
7177
+ * @memberof TW.Barz.Proto.ContractAddressInput
7178
+ * @instance
7179
+ */
7180
+ ContractAddressInput.prototype.salt = 0;
7181
+
7173
7182
  /**
7174
7183
  * Creates a new ContractAddressInput instance using the specified properties.
7175
7184
  * @function create
@@ -7210,6 +7219,8 @@
7210
7219
  writer.uint32(/* id 7, wireType 2 =*/58).string(message.bytecode);
7211
7220
  if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
7212
7221
  writer.uint32(/* id 8, wireType 2 =*/66).string(message.publicKey);
7222
+ if (message.salt != null && Object.hasOwnProperty.call(message, "salt"))
7223
+ writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.salt);
7213
7224
  return writer;
7214
7225
  };
7215
7226
 
@@ -7255,6 +7266,9 @@
7255
7266
  case 8:
7256
7267
  message.publicKey = reader.string();
7257
7268
  break;
7269
+ case 9:
7270
+ message.salt = reader.uint32();
7271
+ break;
7258
7272
  default:
7259
7273
  reader.skipType(tag & 7);
7260
7274
  break;
@@ -7298,6 +7312,9 @@
7298
7312
  if (message.publicKey != null && message.hasOwnProperty("publicKey"))
7299
7313
  if (!$util.isString(message.publicKey))
7300
7314
  return "publicKey: string expected";
7315
+ if (message.salt != null && message.hasOwnProperty("salt"))
7316
+ if (!$util.isInteger(message.salt))
7317
+ return "salt: integer expected";
7301
7318
  return null;
7302
7319
  };
7303
7320
 
@@ -7329,6 +7346,8 @@
7329
7346
  message.bytecode = String(object.bytecode);
7330
7347
  if (object.publicKey != null)
7331
7348
  message.publicKey = String(object.publicKey);
7349
+ if (object.salt != null)
7350
+ message.salt = object.salt >>> 0;
7332
7351
  return message;
7333
7352
  };
7334
7353
 
@@ -7354,6 +7373,7 @@
7354
7373
  object.defaultFallback = "";
7355
7374
  object.bytecode = "";
7356
7375
  object.publicKey = "";
7376
+ object.salt = 0;
7357
7377
  }
7358
7378
  if (message.entryPoint != null && message.hasOwnProperty("entryPoint"))
7359
7379
  object.entryPoint = message.entryPoint;
@@ -7371,6 +7391,8 @@
7371
7391
  object.bytecode = message.bytecode;
7372
7392
  if (message.publicKey != null && message.hasOwnProperty("publicKey"))
7373
7393
  object.publicKey = message.publicKey;
7394
+ if (message.salt != null && message.hasOwnProperty("salt"))
7395
+ object.salt = message.salt;
7374
7396
  return object;
7375
7397
  };
7376
7398
 
@@ -34,7 +34,7 @@ function Ua(){Qa++;g.monitorRunDependencies&&g.monitorRunDependencies(Qa);assert
34
34
  function Va(){return G.startsWith("data:application/octet-stream;base64,")}function ma(a){return a.startsWith("file://")}function H(a){return function(){var b=g.asm;assert(Oa,"native function `"+a+"` called before runtime initialization");b[a]||assert(b[a],"exported native function `"+a+"` not found");return b[a].apply(null,arguments)}}var G;G="wallet-core.wasm";if(!Va()){var Wa=G;G=g.locateFile?g.locateFile(Wa,w):w+Wa}
35
35
  function Xa(){var a=G;try{if(a==G&&qa)return new Uint8Array(qa);if(ka)return ka(a);throw"both async and sync fetching of the wasm failed";}catch(b){n(b)}}
36
36
  function Ya(){if(!qa&&(ea||fa)){if("function"==typeof fetch&&!ma(G))return fetch(G,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+G+"'";return a.arrayBuffer()}).catch(function(){return Xa()});if(ja)return new Promise(function(a,b){ja(G,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Xa()})}
37
- var Za,$a,ab={1790740:()=>{if(void 0===g.ea)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.ea=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.ea=a}catch(e){throw"No secure random number generator found";}}},1791462:()=>g.ea()};function bb(a){for(;0<a.length;)a.shift()(g)}
37
+ var Za,$a,ab={1790868:()=>{if(void 0===g.ea)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.ea=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.ea=a}catch(e){throw"No secure random number generator found";}}},1791590:()=>g.ea()};function bb(a){for(;0<a.length;)a.shift()(g)}
38
38
  function va(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function pa(a){cb||(cb={});cb[a]||(cb[a]=1,v&&(a="warning: "+a),y(a))}var cb,db=0;
39
39
  function eb(a){this.l=a-24;this.Ta=function(b){F[this.l+4>>2]=b};this.Da=function(){return F[this.l+4>>2]};this.Ja=function(b){F[this.l+8>>2]=b};this.Ka=function(){E[this.l>>2]=0};this.Ia=function(){C[this.l+12>>0]=0};this.Na=function(){C[this.l+13>>0]=0};this.Ea=function(b,c){this.F(0);this.Ta(b);this.Ja(c);this.Ka();this.Ia();this.Na()};this.F=function(b){F[this.l+16>>2]=b}}
40
40
  var fb=0,gb=(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},hb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=gb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},ib=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},jb=
Binary file
@@ -95,7 +95,7 @@ export class AsnParser {
95
95
  }
96
96
  export class Barz {
97
97
  static getCounterfactualAddress(input: Uint8Array | Buffer): string;
98
- static getInitCode(factory: string, publicKey: PublicKey, verificationFacet: string): Uint8Array;
98
+ static getInitCode(factory: string, publicKey: PublicKey, verificationFacet: string, salt: number): Uint8Array;
99
99
  static getFormattedSignature(signature: Uint8Array | Buffer, challenge: Uint8Array | Buffer, authenticatorData: Uint8Array | Buffer, clientDataJSON: string): Uint8Array;
100
100
  }
101
101
  export class Base32 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/wallet-core",
3
- "version": "3.2.9",
3
+ "version": "3.2.10",
4
4
  "description": "wallet core wasm and protobuf models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",