@trustwallet/wallet-core 4.2.11 → 4.2.13

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.
@@ -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={2159636:()=>{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";}}},2160358:()=>g.fa()};
39
+ var eb={2164756:()=>{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";}}},2165478:()=>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
@@ -101,11 +101,9 @@ var Default = /** @class */ (function () {
101
101
  var _this = this;
102
102
  return this.load(id).then(function (wallet) {
103
103
  var storedKey = _this.mapStoredKey(wallet);
104
- var hdWallet = storedKey.wallet(Buffer.from(password));
105
104
  var coin = _this.core.CoinType.values["" + account.coin];
106
- var privateKey = hdWallet.getKey(coin, account.derivationPath);
105
+ var privateKey = storedKey.privateKey(coin, Buffer.from(password));
107
106
  storedKey.delete();
108
- hdWallet.delete();
109
107
  return privateKey;
110
108
  });
111
109
  };
@@ -1,7 +1,7 @@
1
1
  import { CoinType, Derivation, PrivateKey, StoredKeyEncryption } from "../wallet-core";
2
2
  export declare enum WalletType {
3
3
  Mnemonic = "mnemonic",
4
- PrivateKey = "privateKey",
4
+ PrivateKey = "private-key",
5
5
  WatchOnly = "watchOnly",
6
6
  Hardware = "hardware"
7
7
  }
@@ -7,7 +7,7 @@ exports.Error = exports.WalletType = void 0;
7
7
  var WalletType;
8
8
  (function (WalletType) {
9
9
  WalletType["Mnemonic"] = "mnemonic";
10
- WalletType["PrivateKey"] = "privateKey";
10
+ WalletType["PrivateKey"] = "private-key";
11
11
  WalletType["WatchOnly"] = "watchOnly";
12
12
  WalletType["Hardware"] = "hardware";
13
13
  })(WalletType = exports.WalletType || (exports.WalletType = {}));
@@ -232,6 +232,7 @@ export class Blockchain {
232
232
  static bitcoinCash: Blockchain;
233
233
  static pactus: Blockchain;
234
234
  static komodo: Blockchain;
235
+ static polymesh: Blockchain;
235
236
  }
236
237
  export class Cardano {
237
238
  static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
@@ -401,6 +402,7 @@ export class CoinType {
401
402
  static zkLinkNova: CoinType;
402
403
  static pactus: CoinType;
403
404
  static sonic: CoinType;
405
+ static polymesh: CoinType;
404
406
  }
405
407
  export class CoinTypeConfiguration {
406
408
  static getSymbol(type: CoinType): string;
@@ -791,9 +793,9 @@ export class LiquidStaking {
791
793
  static buildRequest(input: Uint8Array | Buffer): Uint8Array;
792
794
  }
793
795
  export class MessageSigner {
794
- static preImageHashes(coin: CoinType, input: Uint8Array | Buffer): Uint8Array;
795
796
  static sign(coin: CoinType, input: Uint8Array | Buffer): Uint8Array;
796
797
  static verify(coin: CoinType, input: Uint8Array | Buffer): boolean;
798
+ static preImageHashes(coin: CoinType, input: Uint8Array | Buffer): Uint8Array;
797
799
  }
798
800
  export class Mnemonic {
799
801
  static isValid(mnemonic: string): boolean;
@@ -995,6 +997,7 @@ export class TONMessageSigner {
995
997
  }
996
998
  export class TONWallet {
997
999
  static buildV4R2StateInit(publicKey: PublicKey, workchain: number, walletId: number): string;
1000
+ static buildV5R1StateInit(publicKey: PublicKey, workchain: number, walletId: number): string;
998
1001
  }
999
1002
  export class TezosMessageSigner {
1000
1003
  static formatMessage(message: string, url: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/wallet-core",
3
- "version": "4.2.11",
3
+ "version": "4.2.13",
4
4
  "description": "wallet core wasm and protobuf models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",