@trustwallet/wallet-core 2.9.8 → 3.0.2

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.
@@ -6,29 +6,38 @@
6
6
  //
7
7
  // This is a GENERATED FILE, changes made here WILL BE LOST.
8
8
  //
9
+ export namespace HexCoding {
10
+ export function decode(hex: string): Uint8Array;
11
+ export function encode(buffer: Uint8Array | Buffer): string;
12
+ }
9
13
  export class AnySigner {
10
14
  static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
11
15
  static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
12
16
  static supportsJSON(coin: CoinType): boolean;
13
17
  }
14
- export namespace HexCoding {
15
- export function decode(hex: string): Uint8Array;
16
- export function encode(buffer: Uint8Array | Buffer): string;
18
+ export class TransactionCompiler {
19
+ static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
20
+ static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
21
+ static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
17
22
  }
18
- export class SS58AddressType {
23
+ export class RippleXAddress {
24
+ static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
25
+ static isValidString(string: string): boolean;
26
+ static createWithString(string: string): RippleXAddress;
27
+ static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
28
+ description(): string;
29
+ tag(): number;
30
+ delete(): void;
31
+ }
32
+ export class Purpose {
19
33
  value: number;
20
- static polkadot: SS58AddressType;
21
- static kusama: SS58AddressType;
34
+ static bip44: Purpose;
35
+ static bip49: Purpose;
36
+ static bip84: Purpose;
37
+ static bip1852: Purpose;
22
38
  }
23
- export class Account {
24
- static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
25
- address(): string;
26
- derivation(): Derivation;
27
- derivationPath(): string;
28
- publicKey(): string;
29
- extendedPublicKey(): string;
30
- coin(): CoinType;
31
- delete(): void;
39
+ export class Cardano {
40
+ static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
32
41
  }
33
42
  export class GroestlcoinAddress {
34
43
  static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
@@ -38,6 +47,99 @@ export class GroestlcoinAddress {
38
47
  description(): string;
39
48
  delete(): void;
40
49
  }
50
+ export class Hash {
51
+ static sha1(data: Uint8Array | Buffer): Uint8Array;
52
+ static sha256(data: Uint8Array | Buffer): Uint8Array;
53
+ static sha512(data: Uint8Array | Buffer): Uint8Array;
54
+ static sha512_256(data: Uint8Array | Buffer): Uint8Array;
55
+ static keccak256(data: Uint8Array | Buffer): Uint8Array;
56
+ static keccak512(data: Uint8Array | Buffer): Uint8Array;
57
+ static sha3_256(data: Uint8Array | Buffer): Uint8Array;
58
+ static sha3_512(data: Uint8Array | Buffer): Uint8Array;
59
+ static ripemd(data: Uint8Array | Buffer): Uint8Array;
60
+ static blake256(data: Uint8Array | Buffer): Uint8Array;
61
+ static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
62
+ static groestl512(data: Uint8Array | Buffer): Uint8Array;
63
+ static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
64
+ static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
65
+ static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
66
+ static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
67
+ static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
68
+ static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
69
+ }
70
+ export class Base58 {
71
+ static encode(data: Uint8Array | Buffer): string;
72
+ static encodeNoCheck(data: Uint8Array | Buffer): string;
73
+ static decode(string: string): Uint8Array;
74
+ static decodeNoCheck(string: string): Uint8Array;
75
+ }
76
+ export class PBKDF2 {
77
+ static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
78
+ static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
79
+ }
80
+ export class BitcoinSigHashType {
81
+ value: number;
82
+ static all: BitcoinSigHashType;
83
+ static none: BitcoinSigHashType;
84
+ static single: BitcoinSigHashType;
85
+ static fork: BitcoinSigHashType;
86
+ static forkBTG: BitcoinSigHashType;
87
+ }
88
+ export class Derivation {
89
+ value: number;
90
+ static default: Derivation;
91
+ static custom: Derivation;
92
+ static bitcoinSegwit: Derivation;
93
+ static bitcoinLegacy: Derivation;
94
+ static litecoinLegacy: Derivation;
95
+ static solanaSolana: Derivation;
96
+ }
97
+ export class NervosAddress {
98
+ static equal(lhs: NervosAddress, rhs: NervosAddress): boolean;
99
+ static isValidString(string: string): boolean;
100
+ static createWithString(string: string): NervosAddress;
101
+ description(): string;
102
+ codeHash(): Uint8Array;
103
+ hashType(): string;
104
+ args(): Uint8Array;
105
+ delete(): void;
106
+ }
107
+ export class AES {
108
+ static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
109
+ static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
110
+ static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
111
+ static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
112
+ }
113
+ export class THORChainSwap {
114
+ static buildSwap(input: Uint8Array | Buffer): Uint8Array;
115
+ }
116
+ export class Base32 {
117
+ static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
118
+ static decode(string: string): Uint8Array;
119
+ static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
120
+ static encode(data: Uint8Array | Buffer): string;
121
+ }
122
+ export class DataVector {
123
+ static create(): DataVector;
124
+ static createWithData(data: Uint8Array | Buffer): DataVector;
125
+ size(): number;
126
+ add(data: Uint8Array | Buffer): void;
127
+ get(index: number): Uint8Array;
128
+ delete(): void;
129
+ }
130
+ export class FIOAccount {
131
+ static createWithString(string: string): FIOAccount;
132
+ description(): string;
133
+ delete(): void;
134
+ }
135
+ export class StellarMemoType {
136
+ value: number;
137
+ static none: StellarMemoType;
138
+ static text: StellarMemoType;
139
+ static id: StellarMemoType;
140
+ static hash: StellarMemoType;
141
+ static return: StellarMemoType;
142
+ }
41
143
  export class CoinType {
42
144
  value: number;
43
145
  static aeternity: CoinType;
@@ -130,14 +232,59 @@ export class CoinType {
130
232
  static kavaEvm: CoinType;
131
233
  static klaytn: CoinType;
132
234
  static meter: CoinType;
235
+ static okxchain: CoinType;
236
+ static nervos: CoinType;
237
+ static everscale: CoinType;
133
238
  }
134
- export class Cardano {
135
- static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
239
+ export class PublicKeyType {
240
+ value: number;
241
+ static secp256k1: PublicKeyType;
242
+ static secp256k1Extended: PublicKeyType;
243
+ static nist256p1: PublicKeyType;
244
+ static nist256p1Extended: PublicKeyType;
245
+ static ed25519: PublicKeyType;
246
+ static ed25519Blake2b: PublicKeyType;
247
+ static curve25519: PublicKeyType;
248
+ static ed25519Cardano: PublicKeyType;
136
249
  }
137
- export class TransactionCompiler {
138
- static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
139
- static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
140
- static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
250
+ export class StoredKey {
251
+ static load(path: string): StoredKey;
252
+ static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
253
+ static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
254
+ static importJSON(json: Uint8Array | Buffer): StoredKey;
255
+ static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
256
+ static create(name: string, password: Uint8Array | Buffer): StoredKey;
257
+ identifier(): string;
258
+ name(): string;
259
+ isMnemonic(): boolean;
260
+ accountCount(): number;
261
+ encryptionParameters(): string;
262
+ account(index: number): Account;
263
+ accountForCoin(coin: CoinType, wallet: HDWallet): Account;
264
+ accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
265
+ addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
266
+ addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
267
+ removeAccountForCoin(coin: CoinType): void;
268
+ removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
269
+ removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
270
+ store(path: string): boolean;
271
+ decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
272
+ decryptMnemonic(password: Uint8Array | Buffer): string;
273
+ privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
274
+ wallet(password: Uint8Array | Buffer): HDWallet;
275
+ exportJSON(): Uint8Array;
276
+ fixAddresses(password: Uint8Array | Buffer): boolean;
277
+ delete(): void;
278
+ }
279
+ export class Account {
280
+ static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
281
+ address(): string;
282
+ derivation(): Derivation;
283
+ derivationPath(): string;
284
+ publicKey(): string;
285
+ extendedPublicKey(): string;
286
+ coin(): CoinType;
287
+ delete(): void;
141
288
  }
142
289
  export class SolanaAddress {
143
290
  static createWithString(string: string): SolanaAddress;
@@ -145,31 +292,227 @@ export class SolanaAddress {
145
292
  defaultTokenAddress(tokenMintAddress: string): string;
146
293
  delete(): void;
147
294
  }
295
+ export class EthereumAbiValue {
296
+ static encodeBool(value: boolean): Uint8Array;
297
+ static encodeInt32(value: number): Uint8Array;
298
+ static encodeUInt32(value: number): Uint8Array;
299
+ static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
300
+ static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
301
+ static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
302
+ static encodeString(value: string): Uint8Array;
303
+ static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
304
+ static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
305
+ static decodeUInt256(input: Uint8Array | Buffer): string;
306
+ static decodeValue(input: Uint8Array | Buffer, type: string): string;
307
+ static decodeArray(input: Uint8Array | Buffer, type: string): string;
308
+ }
309
+ export class StellarPassphrase {
310
+ value: number;
311
+ static stellar: StellarPassphrase;
312
+ static kin: StellarPassphrase;
313
+ }
314
+
315
+ declare function describeStellarPassphrase(value: StellarPassphrase): string;
316
+
317
+ export class PublicKey {
318
+ static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
319
+ static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
320
+ static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
321
+ isCompressed(): boolean;
322
+ compressed(): PublicKey;
323
+ uncompressed(): PublicKey;
324
+ data(): Uint8Array;
325
+ keyType(): PublicKeyType;
326
+ description(): string;
327
+ verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
328
+ verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
329
+ verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
330
+ delete(): void;
331
+ }
332
+ export class SegwitAddress {
333
+ static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
334
+ static isValidString(string: string): boolean;
335
+ static createWithString(string: string): SegwitAddress;
336
+ static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
337
+ description(): string;
338
+ hrp(): HRP;
339
+ witnessVersion(): number;
340
+ witnessProgram(): Uint8Array;
341
+ delete(): void;
342
+ }
343
+ export class Curve {
344
+ value: number;
345
+ static secp256k1: Curve;
346
+ static ed25519: Curve;
347
+ static ed25519Blake2bNano: Curve;
348
+ static curve25519: Curve;
349
+ static nist256p1: Curve;
350
+ static ed25519ExtendedCardano: Curve;
351
+ }
352
+
353
+ declare function describeCurve(value: Curve): string;
354
+
148
355
  export class EthereumAbi {
149
356
  static encode(fn: EthereumAbiFunction): Uint8Array;
150
357
  static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
151
358
  static decodeCall(data: Uint8Array | Buffer, abi: string): string;
152
359
  static encodeTyped(messageJson: string): Uint8Array;
153
360
  }
154
- export class StellarVersionByte {
155
- value: number;
156
- static accountID: StellarVersionByte;
157
- static seed: StellarVersionByte;
158
- static preAuthTX: StellarVersionByte;
159
- static sha256Hash: StellarVersionByte;
160
- }
161
- export class Blockchain {
162
- value: number;
163
- static bitcoin: Blockchain;
164
- static ethereum: Blockchain;
165
- static vechain: Blockchain;
166
- static tron: Blockchain;
167
- static icon: Blockchain;
168
- static binance: Blockchain;
169
- static ripple: Blockchain;
170
- static tezos: Blockchain;
171
- static nimiq: Blockchain;
172
- static stellar: Blockchain;
361
+ export class EthereumAbiFunction {
362
+ static createWithString(name: string): EthereumAbiFunction;
363
+ getType(): string;
364
+ addParamUInt8(val: number, isOutput: boolean): number;
365
+ addParamUInt16(val: number, isOutput: boolean): number;
366
+ addParamUInt32(val: number, isOutput: boolean): number;
367
+ addParamUInt64(val: number, isOutput: boolean): number;
368
+ addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
369
+ addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
370
+ addParamInt8(val: number, isOutput: boolean): number;
371
+ addParamInt16(val: number, isOutput: boolean): number;
372
+ addParamInt32(val: number, isOutput: boolean): number;
373
+ addParamInt64(val: number, isOutput: boolean): number;
374
+ addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
375
+ addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
376
+ addParamBool(val: boolean, isOutput: boolean): number;
377
+ addParamString(val: string, isOutput: boolean): number;
378
+ addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
379
+ addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
380
+ addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
381
+ addParamArray(isOutput: boolean): number;
382
+ getParamUInt8(idx: number, isOutput: boolean): number;
383
+ getParamUInt64(idx: number, isOutput: boolean): number;
384
+ getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
385
+ getParamBool(idx: number, isOutput: boolean): boolean;
386
+ getParamString(idx: number, isOutput: boolean): string;
387
+ getParamAddress(idx: number, isOutput: boolean): Uint8Array;
388
+ addInArrayParamUInt8(arrayIdx: number, val: number): number;
389
+ addInArrayParamUInt16(arrayIdx: number, val: number): number;
390
+ addInArrayParamUInt32(arrayIdx: number, val: number): number;
391
+ addInArrayParamUInt64(arrayIdx: number, val: number): number;
392
+ addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
393
+ addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
394
+ addInArrayParamInt8(arrayIdx: number, val: number): number;
395
+ addInArrayParamInt16(arrayIdx: number, val: number): number;
396
+ addInArrayParamInt32(arrayIdx: number, val: number): number;
397
+ addInArrayParamInt64(arrayIdx: number, val: number): number;
398
+ addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
399
+ addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
400
+ addInArrayParamBool(arrayIdx: number, val: boolean): number;
401
+ addInArrayParamString(arrayIdx: number, val: string): number;
402
+ addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
403
+ addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
404
+ addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
405
+ delete(): void;
406
+ }
407
+ export class Base64 {
408
+ static decode(string: string): Uint8Array;
409
+ static decodeUrl(string: string): Uint8Array;
410
+ static encode(data: Uint8Array | Buffer): string;
411
+ static encodeUrl(data: Uint8Array | Buffer): string;
412
+ }
413
+ export class EthereumChainID {
414
+ value: number;
415
+ static ethereum: EthereumChainID;
416
+ static classic: EthereumChainID;
417
+ static poa: EthereumChainID;
418
+ static vechain: EthereumChainID;
419
+ static callisto: EthereumChainID;
420
+ static tomochain: EthereumChainID;
421
+ static polygon: EthereumChainID;
422
+ static okc: EthereumChainID;
423
+ static thundertoken: EthereumChainID;
424
+ static gochain: EthereumChainID;
425
+ static meter: EthereumChainID;
426
+ static celo: EthereumChainID;
427
+ static wanchain: EthereumChainID;
428
+ static cronos: EthereumChainID;
429
+ static optimism: EthereumChainID;
430
+ static xdai: EthereumChainID;
431
+ static smartbch: EthereumChainID;
432
+ static fantom: EthereumChainID;
433
+ static boba: EthereumChainID;
434
+ static kcc: EthereumChainID;
435
+ static heco: EthereumChainID;
436
+ static metis: EthereumChainID;
437
+ static moonbeam: EthereumChainID;
438
+ static moonriver: EthereumChainID;
439
+ static ronin: EthereumChainID;
440
+ static kavaevm: EthereumChainID;
441
+ static klaytn: EthereumChainID;
442
+ static avalanchec: EthereumChainID;
443
+ static evmos: EthereumChainID;
444
+ static arbitrum: EthereumChainID;
445
+ static smartchain: EthereumChainID;
446
+ static aurora: EthereumChainID;
447
+ }
448
+ export class NEARAccount {
449
+ static createWithString(string: string): NEARAccount;
450
+ description(): string;
451
+ delete(): void;
452
+ }
453
+ export class CoinTypeConfiguration {
454
+ static getSymbol(type: CoinType): string;
455
+ static getDecimals(type: CoinType): number;
456
+ static getTransactionURL(type: CoinType, transactionID: string): string;
457
+ static getAccountURL(type: CoinType, accountID: string): string;
458
+ static getID(type: CoinType): string;
459
+ static getName(type: CoinType): string;
460
+ }
461
+ export class HDWallet {
462
+ static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
463
+ static create(strength: number, passphrase: string): HDWallet;
464
+ static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
465
+ static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
466
+ static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
467
+ seed(): Uint8Array;
468
+ mnemonic(): string;
469
+ entropy(): Uint8Array;
470
+ getMasterKey(curve: Curve): PrivateKey;
471
+ getKeyForCoin(coin: CoinType): PrivateKey;
472
+ getAddressForCoin(coin: CoinType): string;
473
+ getKey(coin: CoinType, derivationPath: string): PrivateKey;
474
+ getKeyByCurve(curve: Curve, derivationPath: string): PrivateKey;
475
+ getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
476
+ getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
477
+ getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
478
+ getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
479
+ getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
480
+ getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
481
+ getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
482
+ delete(): void;
483
+ }
484
+ export class AnyAddress {
485
+ static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
486
+ static isValid(string: string, coin: CoinType): boolean;
487
+ static createWithString(string: string, coin: CoinType): AnyAddress;
488
+ static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
489
+ description(): string;
490
+ coin(): CoinType;
491
+ data(): Uint8Array;
492
+ delete(): void;
493
+ }
494
+ export class AESPaddingMode {
495
+ value: number;
496
+ static zero: AESPaddingMode;
497
+ static pkcs7: AESPaddingMode;
498
+ }
499
+ export class Mnemonic {
500
+ static isValid(mnemonic: string): boolean;
501
+ static isValidWord(word: string): boolean;
502
+ static suggest(prefix: string): string;
503
+ }
504
+ export class Blockchain {
505
+ value: number;
506
+ static bitcoin: Blockchain;
507
+ static ethereum: Blockchain;
508
+ static vechain: Blockchain;
509
+ static tron: Blockchain;
510
+ static icon: Blockchain;
511
+ static binance: Blockchain;
512
+ static ripple: Blockchain;
513
+ static tezos: Blockchain;
514
+ static nimiq: Blockchain;
515
+ static stellar: Blockchain;
173
516
  static aion: Blockchain;
174
517
  static cosmos: Blockchain;
175
518
  static theta: Blockchain;
@@ -199,19 +542,66 @@ export class Blockchain {
199
542
  static thorchain: Blockchain;
200
543
  static ronin: Blockchain;
201
544
  static kusama: Blockchain;
545
+ static nervos: Blockchain;
546
+ static everscale: Blockchain;
202
547
  }
203
- export class StellarMemoType {
548
+ export class BitcoinAddress {
549
+ static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
550
+ static isValid(data: Uint8Array | Buffer): boolean;
551
+ static isValidString(string: string): boolean;
552
+ static createWithString(string: string): BitcoinAddress;
553
+ static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
554
+ static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
555
+ description(): string;
556
+ prefix(): number;
557
+ keyhash(): Uint8Array;
558
+ delete(): void;
559
+ }
560
+ export class SS58AddressType {
204
561
  value: number;
205
- static none: StellarMemoType;
206
- static text: StellarMemoType;
207
- static id: StellarMemoType;
208
- static hash: StellarMemoType;
209
- static return: StellarMemoType;
562
+ static polkadot: SS58AddressType;
563
+ static kusama: SS58AddressType;
210
564
  }
211
- export class AESPaddingMode {
565
+ export class StellarVersionByte {
212
566
  value: number;
213
- static zero: AESPaddingMode;
214
- static pkcs7: AESPaddingMode;
567
+ static accountID: StellarVersionByte;
568
+ static seed: StellarVersionByte;
569
+ static preAuthTX: StellarVersionByte;
570
+ static sha256Hash: StellarVersionByte;
571
+ }
572
+ export class StoredKeyEncryptionLevel {
573
+ value: number;
574
+ static default: StoredKeyEncryptionLevel;
575
+ static minimal: StoredKeyEncryptionLevel;
576
+ static weak: StoredKeyEncryptionLevel;
577
+ static standard: StoredKeyEncryptionLevel;
578
+ }
579
+ export class BitcoinScript {
580
+ static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
581
+ static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
582
+ static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
583
+ static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
584
+ static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
585
+ static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
586
+ static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
587
+ static hashTypeForCoin(coinType: CoinType): number;
588
+ static create(): BitcoinScript;
589
+ static createWithData(data: Uint8Array | Buffer): BitcoinScript;
590
+ static createCopy(script: BitcoinScript): BitcoinScript;
591
+ size(): number;
592
+ data(): Uint8Array;
593
+ scriptHash(): Uint8Array;
594
+ isPayToScriptHash(): boolean;
595
+ isPayToWitnessScriptHash(): boolean;
596
+ isPayToWitnessPublicKeyHash(): boolean;
597
+ isWitnessProgram(): boolean;
598
+ matchPayToPubkey(): Uint8Array;
599
+ matchPayToPubkeyHash(): Uint8Array;
600
+ matchPayToScriptHash(): Uint8Array;
601
+ matchPayToWitnessPublicKeyHash(): Uint8Array;
602
+ matchPayToWitnessScriptHash(): Uint8Array;
603
+ encode(): Uint8Array;
604
+ delete(): void;
215
605
  }
216
606
  export class PrivateKey {
217
607
  static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
@@ -223,20 +613,12 @@ export class PrivateKey {
223
613
  getPublicKeyNist256p1(): PublicKey;
224
614
  getPublicKeyEd25519(): PublicKey;
225
615
  getPublicKeyEd25519Blake2b(): PublicKey;
226
- getPublicKeyEd25519Extended(): PublicKey;
616
+ getPublicKeyEd25519Cardano(): PublicKey;
227
617
  getPublicKeyCurve25519(): PublicKey;
228
618
  getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
229
619
  sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
230
- signAsDER(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
231
- signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
232
- delete(): void;
233
- }
234
- export class DataVector {
235
- static create(): DataVector;
236
- static createWithData(data: Uint8Array | Buffer): DataVector;
237
- size(): number;
238
- add(data: Uint8Array | Buffer): void;
239
- get(index: number): Uint8Array;
620
+ signAsDER(digest: Uint8Array | Buffer): Uint8Array;
621
+ signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
240
622
  delete(): void;
241
623
  }
242
624
  export class HDVersion {
@@ -257,285 +639,7 @@ export class HDVersion {
257
639
  static dgub: HDVersion;
258
640
  static dgpv: HDVersion;
259
641
  }
260
- export class Base32 {
261
- static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
262
- static decode(string: string): Uint8Array;
263
- static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
264
- static encode(data: Uint8Array | Buffer): string;
265
- }
266
- export class BitcoinScript {
267
- static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
268
- static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
269
- static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
270
- static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
271
- static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
272
- static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
273
- static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
274
- static hashTypeForCoin(coinType: CoinType): number;
275
- static create(): BitcoinScript;
276
- static createWithData(data: Uint8Array | Buffer): BitcoinScript;
277
- static createCopy(script: BitcoinScript): BitcoinScript;
278
- size(): number;
279
- data(): Uint8Array;
280
- scriptHash(): Uint8Array;
281
- isPayToScriptHash(): boolean;
282
- isPayToWitnessScriptHash(): boolean;
283
- isPayToWitnessPublicKeyHash(): boolean;
284
- isWitnessProgram(): boolean;
285
- matchPayToPubkey(): Uint8Array;
286
- matchPayToPubkeyHash(): Uint8Array;
287
- matchPayToScriptHash(): Uint8Array;
288
- matchPayToWitnessPublicKeyHash(): Uint8Array;
289
- matchPayToWitnessScriptHash(): Uint8Array;
290
- encode(): Uint8Array;
291
- delete(): void;
292
- }
293
- export class Purpose {
294
- value: number;
295
- static bip44: Purpose;
296
- static bip49: Purpose;
297
- static bip84: Purpose;
298
- static bip1852: Purpose;
299
- }
300
- export class StellarPassphrase {
301
- value: number;
302
- static stellar: StellarPassphrase;
303
- static kin: StellarPassphrase;
304
- }
305
-
306
- declare function describeStellarPassphrase(value: StellarPassphrase): string;
307
-
308
- export class Hash {
309
- static sha1(data: Uint8Array | Buffer): Uint8Array;
310
- static sha256(data: Uint8Array | Buffer): Uint8Array;
311
- static sha512(data: Uint8Array | Buffer): Uint8Array;
312
- static sha512_256(data: Uint8Array | Buffer): Uint8Array;
313
- static keccak256(data: Uint8Array | Buffer): Uint8Array;
314
- static keccak512(data: Uint8Array | Buffer): Uint8Array;
315
- static sha3_256(data: Uint8Array | Buffer): Uint8Array;
316
- static sha3_512(data: Uint8Array | Buffer): Uint8Array;
317
- static ripemd(data: Uint8Array | Buffer): Uint8Array;
318
- static blake256(data: Uint8Array | Buffer): Uint8Array;
319
- static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
320
- static groestl512(data: Uint8Array | Buffer): Uint8Array;
321
- static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
322
- static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
323
- static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
324
- static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
325
- static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
326
- static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
327
- }
328
- export class HDWallet {
329
- static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
330
- static create(strength: number, passphrase: string): HDWallet;
331
- static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
332
- static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
333
- static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
334
- seed(): Uint8Array;
335
- mnemonic(): string;
336
- entropy(): Uint8Array;
337
- getMasterKey(curve: Curve): PrivateKey;
338
- getKeyForCoin(coin: CoinType): PrivateKey;
339
- getAddressForCoin(coin: CoinType): string;
340
- getKey(coin: CoinType, derivationPath: string): PrivateKey;
341
- getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
342
- getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
343
- getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
344
- getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
345
- getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
346
- getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
347
- getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
348
- delete(): void;
349
- }
350
- export class SegwitAddress {
351
- static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
352
- static isValidString(string: string): boolean;
353
- static createWithString(string: string): SegwitAddress;
354
- static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
355
- description(): string;
356
- hrp(): HRP;
357
- witnessVersion(): number;
358
- witnessProgram(): Uint8Array;
359
- delete(): void;
360
- }
361
- export class StoredKeyEncryptionLevel {
362
- value: number;
363
- static default: StoredKeyEncryptionLevel;
364
- static minimal: StoredKeyEncryptionLevel;
365
- static weak: StoredKeyEncryptionLevel;
366
- static standard: StoredKeyEncryptionLevel;
367
- }
368
- export class Mnemonic {
369
- static isValid(mnemonic: string): boolean;
370
- static isValidWord(word: string): boolean;
371
- static suggest(prefix: string): string;
372
- }
373
- export class THORChainSwap {
374
- static buildSwap(input: Uint8Array | Buffer): Uint8Array;
375
- }
376
- export class AES {
377
- static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
378
- static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
379
- static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
380
- static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
381
- }
382
- export class EthereumAbiFunction {
383
- static createWithString(name: string): EthereumAbiFunction;
384
- getType(): string;
385
- addParamUInt8(val: number, isOutput: boolean): number;
386
- addParamUInt16(val: number, isOutput: boolean): number;
387
- addParamUInt32(val: number, isOutput: boolean): number;
388
- addParamUInt64(val: number, isOutput: boolean): number;
389
- addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
390
- addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
391
- addParamInt8(val: number, isOutput: boolean): number;
392
- addParamInt16(val: number, isOutput: boolean): number;
393
- addParamInt32(val: number, isOutput: boolean): number;
394
- addParamInt64(val: number, isOutput: boolean): number;
395
- addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
396
- addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
397
- addParamBool(val: boolean, isOutput: boolean): number;
398
- addParamString(val: string, isOutput: boolean): number;
399
- addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
400
- addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
401
- addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
402
- addParamArray(isOutput: boolean): number;
403
- getParamUInt8(idx: number, isOutput: boolean): number;
404
- getParamUInt64(idx: number, isOutput: boolean): number;
405
- getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
406
- getParamBool(idx: number, isOutput: boolean): boolean;
407
- getParamString(idx: number, isOutput: boolean): string;
408
- getParamAddress(idx: number, isOutput: boolean): Uint8Array;
409
- addInArrayParamUInt8(arrayIdx: number, val: number): number;
410
- addInArrayParamUInt16(arrayIdx: number, val: number): number;
411
- addInArrayParamUInt32(arrayIdx: number, val: number): number;
412
- addInArrayParamUInt64(arrayIdx: number, val: number): number;
413
- addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
414
- addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
415
- addInArrayParamInt8(arrayIdx: number, val: number): number;
416
- addInArrayParamInt16(arrayIdx: number, val: number): number;
417
- addInArrayParamInt32(arrayIdx: number, val: number): number;
418
- addInArrayParamInt64(arrayIdx: number, val: number): number;
419
- addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
420
- addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
421
- addInArrayParamBool(arrayIdx: number, val: boolean): number;
422
- addInArrayParamString(arrayIdx: number, val: string): number;
423
- addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
424
- addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
425
- addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
426
- delete(): void;
427
- }
428
- export class Curve {
429
- value: number;
430
- static secp256k1: Curve;
431
- static ed25519: Curve;
432
- static ed25519Blake2bNano: Curve;
433
- static curve25519: Curve;
434
- static nist256p1: Curve;
435
- static ed25519Extended: Curve;
436
- }
437
-
438
- declare function describeCurve(value: Curve): string;
439
-
440
- export class CoinTypeConfiguration {
441
- static getSymbol(type: CoinType): string;
442
- static getDecimals(type: CoinType): number;
443
- static getTransactionURL(type: CoinType, transactionID: string): string;
444
- static getAccountURL(type: CoinType, accountID: string): string;
445
- static getID(type: CoinType): string;
446
- static getName(type: CoinType): string;
447
- }
448
- export class FIOAccount {
449
- static createWithString(string: string): FIOAccount;
450
- description(): string;
451
- delete(): void;
452
- }
453
- export class NEARAccount {
454
- static createWithString(string: string): NEARAccount;
455
- description(): string;
456
- delete(): void;
457
- }
458
- export class BitcoinAddress {
459
- static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
460
- static isValid(data: Uint8Array | Buffer): boolean;
461
- static isValidString(string: string): boolean;
462
- static createWithString(string: string): BitcoinAddress;
463
- static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
464
- static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
465
- description(): string;
466
- prefix(): number;
467
- keyhash(): Uint8Array;
468
- delete(): void;
469
- }
470
- export class Base58 {
471
- static encode(data: Uint8Array | Buffer): string;
472
- static encodeNoCheck(data: Uint8Array | Buffer): string;
473
- static decode(string: string): Uint8Array;
474
- static decodeNoCheck(string: string): Uint8Array;
475
- }
476
- export class Derivation {
477
- value: number;
478
- static default: Derivation;
479
- static custom: Derivation;
480
- static bitcoinSegwit: Derivation;
481
- static bitcoinLegacy: Derivation;
482
- static litecoinLegacy: Derivation;
483
- static solanaSolana: Derivation;
484
- }
485
- export class PublicKeyType {
486
- value: number;
487
- static secp256k1: PublicKeyType;
488
- static secp256k1Extended: PublicKeyType;
489
- static nist256p1: PublicKeyType;
490
- static nist256p1Extended: PublicKeyType;
491
- static ed25519: PublicKeyType;
492
- static ed25519Blake2b: PublicKeyType;
493
- static curve25519: PublicKeyType;
494
- static ed25519Extended: PublicKeyType;
495
- }
496
- export class BitcoinSigHashType {
497
- value: number;
498
- static all: BitcoinSigHashType;
499
- static none: BitcoinSigHashType;
500
- static single: BitcoinSigHashType;
501
- static fork: BitcoinSigHashType;
502
- static forkBTG: BitcoinSigHashType;
503
- }
504
- export class EthereumChainID {
505
- value: number;
506
- static ethereum: EthereumChainID;
507
- static classic: EthereumChainID;
508
- static poa: EthereumChainID;
509
- static vechain: EthereumChainID;
510
- static callisto: EthereumChainID;
511
- static tomochain: EthereumChainID;
512
- static polygon: EthereumChainID;
513
- static thundertoken: EthereumChainID;
514
- static gochain: EthereumChainID;
515
- static meter: EthereumChainID;
516
- static celo: EthereumChainID;
517
- static wanchain: EthereumChainID;
518
- static cronos: EthereumChainID;
519
- static optimism: EthereumChainID;
520
- static xdai: EthereumChainID;
521
- static smartbch: EthereumChainID;
522
- static fantom: EthereumChainID;
523
- static boba: EthereumChainID;
524
- static kcc: EthereumChainID;
525
- static heco: EthereumChainID;
526
- static metis: EthereumChainID;
527
- static moonbeam: EthereumChainID;
528
- static moonriver: EthereumChainID;
529
- static ronin: EthereumChainID;
530
- static kavaevm: EthereumChainID;
531
- static klaytn: EthereumChainID;
532
- static avalanchec: EthereumChainID;
533
- static evmos: EthereumChainID;
534
- static arbitrum: EthereumChainID;
535
- static smartchain: EthereumChainID;
536
- static aurora: EthereumChainID;
537
- }
538
- export class HRP {
642
+ export class HRP {
539
643
  value: number;
540
644
  static unknown: HRP;
541
645
  static bitcoin: HRP;
@@ -548,6 +652,7 @@ export class HRP {
548
652
  static bitcoinCash: HRP;
549
653
  static bitcoinGold: HRP;
550
654
  static ioTeX: HRP;
655
+ static nervos: HRP;
551
656
  static zilliqa: HRP;
552
657
  static terra: HRP;
553
658
  static cryptoOrg: HRP;
@@ -569,84 +674,62 @@ export class HRP {
569
674
 
570
675
  declare function describeHRP(value: HRP): string;
571
676
 
572
- export class EthereumAbiValue {
573
- static encodeBool(value: boolean): Uint8Array;
574
- static encodeInt32(value: number): Uint8Array;
575
- static encodeUInt32(value: number): Uint8Array;
576
- static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
577
- static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
578
- static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
579
- static encodeString(value: string): Uint8Array;
580
- static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
581
- static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
582
- static decodeUInt256(input: Uint8Array | Buffer): string;
583
- static decodeValue(input: Uint8Array | Buffer, type: string): string;
584
- static decodeArray(input: Uint8Array | Buffer, type: string): string;
585
- }
586
- export class AnyAddress {
587
- static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
588
- static isValid(string: string, coin: CoinType): boolean;
589
- static createWithString(string: string, coin: CoinType): AnyAddress;
590
- static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
591
- description(): string;
592
- coin(): CoinType;
593
- data(): Uint8Array;
594
- delete(): void;
595
- }
596
- export class StoredKey {
597
- static load(path: string): StoredKey;
598
- static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
599
- static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
600
- static importJSON(json: Uint8Array | Buffer): StoredKey;
601
- static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
602
- static create(name: string, password: Uint8Array | Buffer): StoredKey;
603
- identifier(): string;
604
- name(): string;
605
- isMnemonic(): boolean;
606
- accountCount(): number;
607
- encryptionParameters(): string;
608
- account(index: number): Account;
609
- accountForCoin(coin: CoinType, wallet: HDWallet): Account;
610
- accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
611
- addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
612
- addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
613
- removeAccountForCoin(coin: CoinType): void;
614
- removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
615
- removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
616
- store(path: string): boolean;
617
- decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
618
- decryptMnemonic(password: Uint8Array | Buffer): string;
619
- privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
620
- wallet(password: Uint8Array | Buffer): HDWallet;
621
- exportJSON(): Uint8Array;
622
- fixAddresses(password: Uint8Array | Buffer): boolean;
623
- delete(): void;
624
- }
625
- export class RippleXAddress {
626
- static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
627
- static isValidString(string: string): boolean;
628
- static createWithString(string: string): RippleXAddress;
629
- static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
630
- description(): string;
631
- tag(): number;
632
- delete(): void;
633
- }
634
- export class PBKDF2 {
635
- static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
636
- static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
637
- }
638
- export class PublicKey {
639
- static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
640
- static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
641
- static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
642
- isCompressed(): boolean;
643
- compressed(): PublicKey;
644
- uncompressed(): PublicKey;
645
- data(): Uint8Array;
646
- keyType(): PublicKeyType;
647
- description(): string;
648
- verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
649
- verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
650
- verifySchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
651
- delete(): void;
677
+ export class PrivateKeyType {
678
+ value: number;
679
+ static default: PrivateKeyType;
680
+ static cardano: PrivateKeyType;
681
+ }
682
+ export interface WalletCore {
683
+ HexCoding: typeof HexCoding;
684
+ AnySigner: typeof AnySigner;
685
+ TransactionCompiler: typeof TransactionCompiler;
686
+ RippleXAddress: typeof RippleXAddress;
687
+ Purpose: typeof Purpose;
688
+ Cardano: typeof Cardano;
689
+ GroestlcoinAddress: typeof GroestlcoinAddress;
690
+ Hash: typeof Hash;
691
+ Base58: typeof Base58;
692
+ PBKDF2: typeof PBKDF2;
693
+ BitcoinSigHashType: typeof BitcoinSigHashType;
694
+ Derivation: typeof Derivation;
695
+ NervosAddress: typeof NervosAddress;
696
+ AES: typeof AES;
697
+ THORChainSwap: typeof THORChainSwap;
698
+ Base32: typeof Base32;
699
+ DataVector: typeof DataVector;
700
+ FIOAccount: typeof FIOAccount;
701
+ StellarMemoType: typeof StellarMemoType;
702
+ CoinType: typeof CoinType;
703
+ PublicKeyType: typeof PublicKeyType;
704
+ StoredKey: typeof StoredKey;
705
+ Account: typeof Account;
706
+ SolanaAddress: typeof SolanaAddress;
707
+ EthereumAbiValue: typeof EthereumAbiValue;
708
+ StellarPassphrase: typeof StellarPassphrase;
709
+ PublicKey: typeof PublicKey;
710
+ SegwitAddress: typeof SegwitAddress;
711
+ Curve: typeof Curve;
712
+ EthereumAbi: typeof EthereumAbi;
713
+ EthereumAbiFunction: typeof EthereumAbiFunction;
714
+ Base64: typeof Base64;
715
+ EthereumChainID: typeof EthereumChainID;
716
+ NEARAccount: typeof NEARAccount;
717
+ CoinTypeConfiguration: typeof CoinTypeConfiguration;
718
+ HDWallet: typeof HDWallet;
719
+ AnyAddress: typeof AnyAddress;
720
+ AESPaddingMode: typeof AESPaddingMode;
721
+ Mnemonic: typeof Mnemonic;
722
+ Blockchain: typeof Blockchain;
723
+ BitcoinAddress: typeof BitcoinAddress;
724
+ SS58AddressType: typeof SS58AddressType;
725
+ StellarVersionByte: typeof StellarVersionByte;
726
+ StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
727
+ BitcoinScript: typeof BitcoinScript;
728
+ PrivateKey: typeof PrivateKey;
729
+ HDVersion: typeof HDVersion;
730
+ HRP: typeof HRP;
731
+ PrivateKeyType: typeof PrivateKeyType;
732
+ describeStellarPassphrase: typeof describeStellarPassphrase;
733
+ describeCurve: typeof describeCurve;
734
+ describeHRP: typeof describeHRP;
652
735
  }