@trustwallet/wallet-core 3.2.2 → 3.2.4
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.
- package/dist/generated/core_proto.d.ts +2637 -3088
- package/dist/generated/core_proto.js +8496 -9645
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +8 -14
- package/package.json +1 -1
package/dist/lib/wallet-core.js
CHANGED
@@ -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={
|
37
|
+
var Za,$a,ab={1788244:()=>{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";}}},1788966:()=>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
|
@@ -226,6 +226,7 @@ export class Cardano {
|
|
226
226
|
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
227
227
|
static outputMinAdaAmount(toAddress: string, tokenBundle: Uint8Array | Buffer, coinsPerUtxoByte: string): string;
|
228
228
|
static getStakingAddress(baseAddress: string): string;
|
229
|
+
static getByronAddress(publicKey: PublicKey): string;
|
229
230
|
}
|
230
231
|
export class CoinType {
|
231
232
|
value: number;
|
@@ -365,6 +366,9 @@ export class CoinType {
|
|
365
366
|
static rootstock: CoinType;
|
366
367
|
static thetaFuel: CoinType;
|
367
368
|
static confluxeSpace: CoinType;
|
369
|
+
static acala: CoinType;
|
370
|
+
static acalaEVM: CoinType;
|
371
|
+
static opBNBtestnet: CoinType;
|
368
372
|
}
|
369
373
|
export class CoinTypeConfiguration {
|
370
374
|
static getSymbol(type: CoinType): string;
|
@@ -508,6 +512,7 @@ export class EthereumChainID {
|
|
508
512
|
static okc: EthereumChainID;
|
509
513
|
static thundertoken: EthereumChainID;
|
510
514
|
static cfxevm: EthereumChainID;
|
515
|
+
static opbnb: EthereumChainID;
|
511
516
|
static gochain: EthereumChainID;
|
512
517
|
static meter: EthereumChainID;
|
513
518
|
static celo: EthereumChainID;
|
@@ -522,6 +527,7 @@ export class EthereumChainID {
|
|
522
527
|
static kcc: EthereumChainID;
|
523
528
|
static zksync: EthereumChainID;
|
524
529
|
static heco: EthereumChainID;
|
530
|
+
static acalaevm: EthereumChainID;
|
525
531
|
static metis: EthereumChainID;
|
526
532
|
static polygonzkevm: EthereumChainID;
|
527
533
|
static moonbeam: EthereumChainID;
|
@@ -891,18 +897,6 @@ export class StoredKeyEncryptionLevel {
|
|
891
897
|
static weak: StoredKeyEncryptionLevel;
|
892
898
|
static standard: StoredKeyEncryptionLevel;
|
893
899
|
}
|
894
|
-
export class SubstrateAddress {
|
895
|
-
static equal(lhs: SubstrateAddress, rhs: SubstrateAddress): boolean;
|
896
|
-
static isValidString(string: string, network: number): boolean;
|
897
|
-
static createWithString(string: string, network: number): SubstrateAddress;
|
898
|
-
static createWithPublicKey(publicKey: PublicKey, network: number): SubstrateAddress;
|
899
|
-
description(): string;
|
900
|
-
delete(): void;
|
901
|
-
}
|
902
|
-
export class SubstrateSigner {
|
903
|
-
static message(data: Uint8Array | Buffer): Uint8Array;
|
904
|
-
static transaction(data: Uint8Array | Buffer, publicKey: Uint8Array | Buffer, signature: Uint8Array | Buffer): Uint8Array;
|
905
|
-
}
|
906
900
|
export class THORChainSwap {
|
907
901
|
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
908
902
|
}
|
@@ -924,6 +918,8 @@ export class TronMessageSigner {
|
|
924
918
|
}
|
925
919
|
export class WebAuthn {
|
926
920
|
static getPublicKey(attestationObject: Uint8Array | Buffer): PublicKey;
|
921
|
+
static getRSValues(signature: Uint8Array | Buffer): Uint8Array;
|
922
|
+
static reconstructOriginalMessage(authenticatorData: Uint8Array | Buffer, clientDataJSON: Uint8Array | Buffer): Uint8Array;
|
927
923
|
}
|
928
924
|
export interface WalletCore {
|
929
925
|
AnySigner: typeof AnySigner;
|
@@ -989,8 +985,6 @@ export interface WalletCore {
|
|
989
985
|
StoredKey: typeof StoredKey;
|
990
986
|
StoredKeyEncryption: typeof StoredKeyEncryption;
|
991
987
|
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
992
|
-
SubstrateAddress: typeof SubstrateAddress;
|
993
|
-
SubstrateSigner: typeof SubstrateSigner;
|
994
988
|
THORChainSwap: typeof THORChainSwap;
|
995
989
|
TezosMessageSigner: typeof TezosMessageSigner;
|
996
990
|
TransactionCompiler: typeof TransactionCompiler;
|