@trustwallet/wallet-core 3.1.38 → 3.2.0

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.
@@ -95,9 +95,8 @@ export class AsnParser {
95
95
  }
96
96
  export class Barz {
97
97
  static getCounterfactualAddress(input: Uint8Array | Buffer): string;
98
- static getInitCodeFromPublicKey(factory: string, publicKey: string, verificationFacet: string): Uint8Array;
99
- static getInitCodeFromAttestationObject(factory: string, attestationObject: string, verificationFacet: string): Uint8Array;
100
- static getFormattedSignature(signature: Uint8Array | Buffer, authenticatorData: Uint8Array | Buffer, origin: string): Uint8Array;
98
+ static getInitCode(factory: string, publicKey: PublicKey, verificationFacet: string): Uint8Array;
99
+ static getFormattedSignature(signature: Uint8Array | Buffer, challenge: Uint8Array | Buffer, authenticatorData: Uint8Array | Buffer, clientDataJSON: string): Uint8Array;
101
100
  }
102
101
  export class Base32 {
103
102
  static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
@@ -140,7 +139,9 @@ export class BitcoinScript {
140
139
  static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
141
140
  static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
142
141
  static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
142
+ static buildBRC20InscribeTransfer(ticker: string, amount: string, pubkey: Uint8Array | Buffer): Uint8Array;
143
143
  static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
144
+ static lockScriptForAddressReplay(address: string, coin: CoinType, blockHash: Uint8Array | Buffer, blockHeight: number): BitcoinScript;
144
145
  static hashTypeForCoin(coinType: CoinType): number;
145
146
  static create(): BitcoinScript;
146
147
  static createWithData(data: Uint8Array | Buffer): BitcoinScript;
@@ -197,6 +198,7 @@ export class Blockchain {
197
198
  static harmony: Blockchain;
198
199
  static near: Blockchain;
199
200
  static algorand: Blockchain;
201
+ static iost: Blockchain;
200
202
  static polkadot: Blockchain;
201
203
  static cardano: Blockchain;
202
204
  static neo: Blockchain;
@@ -209,9 +211,13 @@ export class Blockchain {
209
211
  static thorchain: Blockchain;
210
212
  static ronin: Blockchain;
211
213
  static kusama: Blockchain;
214
+ static zen: Blockchain;
215
+ static bitcoinDiamond: Blockchain;
216
+ static verge: Blockchain;
212
217
  static nervos: Blockchain;
213
218
  static everscale: Blockchain;
214
219
  static aptos: Blockchain;
220
+ static nebl: Blockchain;
215
221
  static hedera: Blockchain;
216
222
  static theOpenNetwork: Blockchain;
217
223
  static sui: Blockchain;
@@ -232,6 +238,7 @@ export class CoinType {
232
238
  static callisto: CoinType;
233
239
  static cardano: CoinType;
234
240
  static cosmos: CoinType;
241
+ static pivx: CoinType;
235
242
  static dash: CoinType;
236
243
  static decred: CoinType;
237
244
  static digiByte: CoinType;
@@ -286,6 +293,7 @@ export class CoinType {
286
293
  static bandChain: CoinType;
287
294
  static smartChainLegacy: CoinType;
288
295
  static smartChain: CoinType;
296
+ static tbinance: CoinType;
289
297
  static oasis: CoinType;
290
298
  static polygon: CoinType;
291
299
  static thorchain: CoinType;
@@ -302,10 +310,15 @@ export class CoinType {
302
310
  static ronin: CoinType;
303
311
  static osmosis: CoinType;
304
312
  static ecash: CoinType;
313
+ static iost: CoinType;
305
314
  static cronosChain: CoinType;
306
315
  static smartBitcoinCash: CoinType;
307
316
  static kuCoinCommunityChain: CoinType;
317
+ static bitcoinDiamond: CoinType;
308
318
  static boba: CoinType;
319
+ static syscoin: CoinType;
320
+ static verge: CoinType;
321
+ static zen: CoinType;
309
322
  static metis: CoinType;
310
323
  static aurora: CoinType;
311
324
  static evmos: CoinType;
@@ -316,9 +329,12 @@ export class CoinType {
316
329
  static klaytn: CoinType;
317
330
  static meter: CoinType;
318
331
  static okxchain: CoinType;
332
+ static stratis: CoinType;
333
+ static komodo: CoinType;
319
334
  static nervos: CoinType;
320
335
  static everscale: CoinType;
321
336
  static aptos: CoinType;
337
+ static nebl: CoinType;
322
338
  static hedera: CoinType;
323
339
  static secret: CoinType;
324
340
  static nativeInjective: CoinType;
@@ -347,6 +363,7 @@ export class CoinType {
347
363
  static noble: CoinType;
348
364
  static scroll: CoinType;
349
365
  static rootstock: CoinType;
366
+ static thetaFuel: CoinType;
350
367
  }
351
368
  export class CoinTypeConfiguration {
352
369
  static getSymbol(type: CoinType): string;
@@ -482,6 +499,7 @@ export class EthereumChainID {
482
499
  static classic: EthereumChainID;
483
500
  static rootstock: EthereumChainID;
484
501
  static poa: EthereumChainID;
502
+ static tfuelevm: EthereumChainID;
485
503
  static vechain: EthereumChainID;
486
504
  static callisto: EthereumChainID;
487
505
  static tomochain: EthereumChainID;
@@ -555,10 +573,16 @@ export class HDVersion {
555
573
  static yprv: HDVersion;
556
574
  static zpub: HDVersion;
557
575
  static zprv: HDVersion;
576
+ static vpub: HDVersion;
577
+ static vprv: HDVersion;
578
+ static tpub: HDVersion;
579
+ static tprv: HDVersion;
558
580
  static ltub: HDVersion;
559
581
  static ltpv: HDVersion;
560
582
  static mtub: HDVersion;
561
583
  static mtpv: HDVersion;
584
+ static ttub: HDVersion;
585
+ static ttpv: HDVersion;
562
586
  static dpub: HDVersion;
563
587
  static dprv: HDVersion;
564
588
  static dgub: HDVersion;
@@ -598,6 +622,8 @@ export class HRP {
598
622
  static groestlcoin: HRP;
599
623
  static digiByte: HRP;
600
624
  static monacoin: HRP;
625
+ static syscoin: HRP;
626
+ static verge: HRP;
601
627
  static cosmos: HRP;
602
628
  static bitcoinCash: HRP;
603
629
  static bitcoinGold: HRP;
@@ -616,9 +642,11 @@ export class HRP {
616
642
  static binance: HRP;
617
643
  static ecash: HRP;
618
644
  static thorchain: HRP;
645
+ static bitcoinDiamond: HRP;
619
646
  static harmony: HRP;
620
647
  static cardano: HRP;
621
648
  static qtum: HRP;
649
+ static stratis: HRP;
622
650
  static nativeInjective: HRP;
623
651
  static osmosis: HRP;
624
652
  static terraV2: HRP;
@@ -635,6 +663,7 @@ export class HRP {
635
663
  static stargaze: HRP;
636
664
  static nativeEvmos: HRP;
637
665
  static juno: HRP;
666
+ static tbinance: HRP;
638
667
  static stride: HRP;
639
668
  static axelar: HRP;
640
669
  static crescent: HRP;
@@ -657,6 +686,7 @@ export class Hash {
657
686
  static ripemd(data: Uint8Array | Buffer): Uint8Array;
658
687
  static blake256(data: Uint8Array | Buffer): Uint8Array;
659
688
  static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
689
+ static blake2bPersonal(data: Uint8Array | Buffer, personal: Uint8Array | Buffer, outlen: number): Uint8Array;
660
690
  static groestl512(data: Uint8Array | Buffer): Uint8Array;
661
691
  static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
662
692
  static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
@@ -859,6 +889,18 @@ export class StoredKeyEncryptionLevel {
859
889
  static weak: StoredKeyEncryptionLevel;
860
890
  static standard: StoredKeyEncryptionLevel;
861
891
  }
892
+ export class SubstrateAddress {
893
+ static equal(lhs: SubstrateAddress, rhs: SubstrateAddress): boolean;
894
+ static isValidString(string: string, network: number): boolean;
895
+ static createWithString(string: string, network: number): SubstrateAddress;
896
+ static createWithPublicKey(publicKey: PublicKey, network: number): SubstrateAddress;
897
+ description(): string;
898
+ delete(): void;
899
+ }
900
+ export class SubstrateSigner {
901
+ static message(data: Uint8Array | Buffer): Uint8Array;
902
+ static transaction(data: Uint8Array | Buffer, publicKey: Uint8Array | Buffer, signature: Uint8Array | Buffer): Uint8Array;
903
+ }
862
904
  export class THORChainSwap {
863
905
  static buildSwap(input: Uint8Array | Buffer): Uint8Array;
864
906
  }
@@ -872,11 +914,15 @@ export class TransactionCompiler {
872
914
  static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
873
915
  static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
874
916
  static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
917
+ static compileWithSignaturesAndPubKeyType(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector, pubKeyType: PublicKeyType): Uint8Array;
875
918
  }
876
919
  export class TronMessageSigner {
877
920
  static signMessage(privateKey: PrivateKey, message: string): string;
878
921
  static verifyMessage(pubKey: PublicKey, message: string, signature: string): boolean;
879
922
  }
923
+ export class WebAuthn {
924
+ static getPublicKey(attestationObject: Uint8Array | Buffer): PublicKey;
925
+ }
880
926
  export interface WalletCore {
881
927
  AnySigner: typeof AnySigner;
882
928
  HexCoding: typeof HexCoding;
@@ -941,10 +987,13 @@ export interface WalletCore {
941
987
  StoredKey: typeof StoredKey;
942
988
  StoredKeyEncryption: typeof StoredKeyEncryption;
943
989
  StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
990
+ SubstrateAddress: typeof SubstrateAddress;
991
+ SubstrateSigner: typeof SubstrateSigner;
944
992
  THORChainSwap: typeof THORChainSwap;
945
993
  TezosMessageSigner: typeof TezosMessageSigner;
946
994
  TransactionCompiler: typeof TransactionCompiler;
947
995
  TronMessageSigner: typeof TronMessageSigner;
996
+ WebAuthn: typeof WebAuthn;
948
997
  describeCurve: typeof describeCurve;
949
998
  describeHRP: typeof describeHRP;
950
999
  describeStellarPassphrase: typeof describeStellarPassphrase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/wallet-core",
3
- "version": "3.1.38",
3
+ "version": "3.2.0",
4
4
  "description": "wallet core wasm and protobuf models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",