@trustwallet/wallet-core 2.9.6 → 3.0.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.
@@ -15,170 +15,28 @@ export namespace HexCoding {
15
15
  export function decode(hex: string): Uint8Array;
16
16
  export function encode(buffer: Uint8Array | Buffer): string;
17
17
  }
18
- export class Hash {
19
- static sha1(data: Uint8Array | Buffer): Uint8Array;
20
- static sha256(data: Uint8Array | Buffer): Uint8Array;
21
- static sha512(data: Uint8Array | Buffer): Uint8Array;
22
- static sha512_256(data: Uint8Array | Buffer): Uint8Array;
23
- static keccak256(data: Uint8Array | Buffer): Uint8Array;
24
- static keccak512(data: Uint8Array | Buffer): Uint8Array;
25
- static sha3_256(data: Uint8Array | Buffer): Uint8Array;
26
- static sha3_512(data: Uint8Array | Buffer): Uint8Array;
27
- static ripemd(data: Uint8Array | Buffer): Uint8Array;
28
- static blake256(data: Uint8Array | Buffer): Uint8Array;
29
- static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
30
- static groestl512(data: Uint8Array | Buffer): Uint8Array;
31
- static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
32
- static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
33
- static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
34
- static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
35
- static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
36
- static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
37
- }
38
- export class Blockchain {
39
- value: number;
40
- static bitcoin: Blockchain;
41
- static ethereum: Blockchain;
42
- static vechain: Blockchain;
43
- static tron: Blockchain;
44
- static icon: Blockchain;
45
- static binance: Blockchain;
46
- static ripple: Blockchain;
47
- static tezos: Blockchain;
48
- static nimiq: Blockchain;
49
- static stellar: Blockchain;
50
- static aion: Blockchain;
51
- static cosmos: Blockchain;
52
- static theta: Blockchain;
53
- static ontology: Blockchain;
54
- static zilliqa: Blockchain;
55
- static ioTeX: Blockchain;
56
- static eos: Blockchain;
57
- static nano: Blockchain;
58
- static nuls: Blockchain;
59
- static waves: Blockchain;
60
- static aeternity: Blockchain;
61
- static nebulas: Blockchain;
62
- static fio: Blockchain;
63
- static solana: Blockchain;
64
- static harmony: Blockchain;
65
- static near: Blockchain;
66
- static algorand: Blockchain;
67
- static polkadot: Blockchain;
68
- static cardano: Blockchain;
69
- static neo: Blockchain;
70
- static filecoin: Blockchain;
71
- static elrondNetwork: Blockchain;
72
- static oasisNetwork: Blockchain;
73
- static decred: Blockchain;
74
- static zcash: Blockchain;
75
- static groestlcoin: Blockchain;
76
- static thorchain: Blockchain;
77
- static ronin: Blockchain;
78
- static kusama: Blockchain;
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 AnyAddress {
89
- static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
90
- static isValid(string: string, coin: CoinType): boolean;
91
- static createWithString(string: string, coin: CoinType): AnyAddress;
92
- static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
93
- description(): string;
94
- coin(): CoinType;
95
- data(): Uint8Array;
96
- delete(): void;
97
- }
98
- export class FIOAccount {
99
- static createWithString(string: string): FIOAccount;
100
- description(): string;
101
- delete(): void;
102
- }
103
- export class Mnemonic {
104
- static isValid(mnemonic: string): boolean;
105
- static isValidWord(word: string): boolean;
106
- static suggest(prefix: string): string;
107
- }
108
- export class StoredKeyEncryptionLevel {
109
- value: number;
110
- static default: StoredKeyEncryptionLevel;
111
- static minimal: StoredKeyEncryptionLevel;
112
- static weak: StoredKeyEncryptionLevel;
113
- static standard: StoredKeyEncryptionLevel;
114
- }
115
18
  export class SS58AddressType {
116
19
  value: number;
117
20
  static polkadot: SS58AddressType;
118
21
  static kusama: SS58AddressType;
119
22
  }
120
- export class Cardano {
121
- static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
122
- }
123
- export class EthereumAbiFunction {
124
- static createWithString(name: string): EthereumAbiFunction;
125
- getType(): string;
126
- addParamUInt8(val: number, isOutput: boolean): number;
127
- addParamUInt16(val: number, isOutput: boolean): number;
128
- addParamUInt32(val: number, isOutput: boolean): number;
129
- addParamUInt64(val: number, isOutput: boolean): number;
130
- addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
131
- addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
132
- addParamInt8(val: number, isOutput: boolean): number;
133
- addParamInt16(val: number, isOutput: boolean): number;
134
- addParamInt32(val: number, isOutput: boolean): number;
135
- addParamInt64(val: number, isOutput: boolean): number;
136
- addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
137
- addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
138
- addParamBool(val: boolean, isOutput: boolean): number;
139
- addParamString(val: string, isOutput: boolean): number;
140
- addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
141
- addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
142
- addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
143
- addParamArray(isOutput: boolean): number;
144
- getParamUInt8(idx: number, isOutput: boolean): number;
145
- getParamUInt64(idx: number, isOutput: boolean): number;
146
- getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
147
- getParamBool(idx: number, isOutput: boolean): boolean;
148
- getParamString(idx: number, isOutput: boolean): string;
149
- getParamAddress(idx: number, isOutput: boolean): Uint8Array;
150
- addInArrayParamUInt8(arrayIdx: number, val: number): number;
151
- addInArrayParamUInt16(arrayIdx: number, val: number): number;
152
- addInArrayParamUInt32(arrayIdx: number, val: number): number;
153
- addInArrayParamUInt64(arrayIdx: number, val: number): number;
154
- addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
155
- addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
156
- addInArrayParamInt8(arrayIdx: number, val: number): number;
157
- addInArrayParamInt16(arrayIdx: number, val: number): number;
158
- addInArrayParamInt32(arrayIdx: number, val: number): number;
159
- addInArrayParamInt64(arrayIdx: number, val: number): number;
160
- addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
161
- addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
162
- addInArrayParamBool(arrayIdx: number, val: boolean): number;
163
- addInArrayParamString(arrayIdx: number, val: string): number;
164
- addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
165
- addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
166
- addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
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;
167
31
  delete(): void;
168
32
  }
169
- export class THORChainSwap {
170
- static buildSwap(input: Uint8Array | Buffer): Uint8Array;
171
- }
172
- export class PublicKeyType {
173
- value: number;
174
- static secp256k1: PublicKeyType;
175
- static secp256k1Extended: PublicKeyType;
176
- static nist256p1: PublicKeyType;
177
- static nist256p1Extended: PublicKeyType;
178
- static ed25519: PublicKeyType;
179
- static ed25519Blake2b: PublicKeyType;
180
- static curve25519: PublicKeyType;
181
- static ed25519Extended: PublicKeyType;
33
+ export class GroestlcoinAddress {
34
+ static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
35
+ static isValidString(string: string): boolean;
36
+ static createWithString(string: string): GroestlcoinAddress;
37
+ static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
38
+ description(): string;
39
+ delete(): void;
182
40
  }
183
41
  export class CoinType {
184
42
  value: number;
@@ -234,6 +92,7 @@ export class CoinType {
234
92
  static ravencoin: CoinType;
235
93
  static waves: CoinType;
236
94
  static terra: CoinType;
95
+ static terraV2: CoinType;
237
96
  static harmony: CoinType;
238
97
  static algorand: CoinType;
239
98
  static kusama: CoinType;
@@ -268,89 +127,23 @@ export class CoinType {
268
127
  static nativeEvmos: CoinType;
269
128
  static moonriver: CoinType;
270
129
  static moonbeam: CoinType;
130
+ static kavaEvm: CoinType;
271
131
  static klaytn: CoinType;
132
+ static meter: CoinType;
133
+ static okxchain: CoinType;
272
134
  }
273
- export class HDVersion {
274
- value: number;
275
- static none: HDVersion;
276
- static xpub: HDVersion;
277
- static xprv: HDVersion;
278
- static ypub: HDVersion;
279
- static yprv: HDVersion;
280
- static zpub: HDVersion;
281
- static zprv: HDVersion;
282
- static ltub: HDVersion;
283
- static ltpv: HDVersion;
284
- static mtub: HDVersion;
285
- static mtpv: HDVersion;
286
- static dpub: HDVersion;
287
- static dprv: HDVersion;
288
- static dgub: HDVersion;
289
- static dgpv: HDVersion;
290
- }
291
- export class Purpose {
292
- value: number;
293
- static bip44: Purpose;
294
- static bip49: Purpose;
295
- static bip84: Purpose;
296
- static bip1852: Purpose;
297
- }
298
- export class PBKDF2 {
299
- static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
300
- static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
301
- }
302
- export class Base58 {
303
- static encode(data: Uint8Array | Buffer): string;
304
- static encodeNoCheck(data: Uint8Array | Buffer): string;
305
- static decode(string: string): Uint8Array;
306
- static decodeNoCheck(string: string): Uint8Array;
135
+ export class Cardano {
136
+ static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
307
137
  }
308
138
  export class TransactionCompiler {
309
139
  static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
310
140
  static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
311
141
  static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
312
142
  }
313
- export class SegwitAddress {
314
- static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
315
- static isValidString(string: string): boolean;
316
- static createWithString(string: string): SegwitAddress;
317
- static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
318
- description(): string;
319
- hrp(): HRP;
320
- witnessVersion(): number;
321
- witnessProgram(): Uint8Array;
322
- delete(): void;
323
- }
324
- export class StellarVersionByte {
325
- value: number;
326
- static accountID: StellarVersionByte;
327
- static seed: StellarVersionByte;
328
- static preAuthTX: StellarVersionByte;
329
- static sha256Hash: StellarVersionByte;
330
- }
331
- export class CoinTypeConfiguration {
332
- static getSymbol(type: CoinType): string;
333
- static getDecimals(type: CoinType): number;
334
- static getTransactionURL(type: CoinType, transactionID: string): string;
335
- static getAccountURL(type: CoinType, accountID: string): string;
336
- static getID(type: CoinType): string;
337
- static getName(type: CoinType): string;
338
- }
339
- export class NEARAccount {
340
- static createWithString(string: string): NEARAccount;
341
- description(): string;
342
- delete(): void;
343
- }
344
- export class BitcoinAddress {
345
- static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
346
- static isValid(data: Uint8Array | Buffer): boolean;
347
- static isValidString(string: string): boolean;
348
- static createWithString(string: string): BitcoinAddress;
349
- static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
350
- static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
143
+ export class SolanaAddress {
144
+ static createWithString(string: string): SolanaAddress;
351
145
  description(): string;
352
- prefix(): number;
353
- keyhash(): Uint8Array;
146
+ defaultTokenAddress(tokenMintAddress: string): string;
354
147
  delete(): void;
355
148
  }
356
149
  export class EthereumAbi {
@@ -359,39 +152,55 @@ export class EthereumAbi {
359
152
  static decodeCall(data: Uint8Array | Buffer, abi: string): string;
360
153
  static encodeTyped(messageJson: string): Uint8Array;
361
154
  }
362
- export class HRP {
155
+ export class StellarVersionByte {
363
156
  value: number;
364
- static unknown: HRP;
365
- static bitcoin: HRP;
366
- static litecoin: HRP;
367
- static viacoin: HRP;
368
- static groestlcoin: HRP;
369
- static digiByte: HRP;
370
- static monacoin: HRP;
371
- static cosmos: HRP;
372
- static bitcoinCash: HRP;
373
- static bitcoinGold: HRP;
374
- static ioTeX: HRP;
375
- static zilliqa: HRP;
376
- static terra: HRP;
377
- static cryptoOrg: HRP;
378
- static kava: HRP;
379
- static oasis: HRP;
380
- static bluzelle: HRP;
381
- static bandChain: HRP;
382
- static elrond: HRP;
383
- static binance: HRP;
384
- static ecash: HRP;
385
- static thorchain: HRP;
386
- static harmony: HRP;
387
- static cardano: HRP;
388
- static qtum: HRP;
389
- static osmosis: HRP;
390
- static nativeEvmos: HRP;
157
+ static accountID: StellarVersionByte;
158
+ static seed: StellarVersionByte;
159
+ static preAuthTX: StellarVersionByte;
160
+ static sha256Hash: StellarVersionByte;
161
+ }
162
+ export class Blockchain {
163
+ value: number;
164
+ static bitcoin: Blockchain;
165
+ static ethereum: Blockchain;
166
+ static vechain: Blockchain;
167
+ static tron: Blockchain;
168
+ static icon: Blockchain;
169
+ static binance: Blockchain;
170
+ static ripple: Blockchain;
171
+ static tezos: Blockchain;
172
+ static nimiq: Blockchain;
173
+ static stellar: Blockchain;
174
+ static aion: Blockchain;
175
+ static cosmos: Blockchain;
176
+ static theta: Blockchain;
177
+ static ontology: Blockchain;
178
+ static zilliqa: Blockchain;
179
+ static ioTeX: Blockchain;
180
+ static eos: Blockchain;
181
+ static nano: Blockchain;
182
+ static nuls: Blockchain;
183
+ static waves: Blockchain;
184
+ static aeternity: Blockchain;
185
+ static nebulas: Blockchain;
186
+ static fio: Blockchain;
187
+ static solana: Blockchain;
188
+ static harmony: Blockchain;
189
+ static near: Blockchain;
190
+ static algorand: Blockchain;
191
+ static polkadot: Blockchain;
192
+ static cardano: Blockchain;
193
+ static neo: Blockchain;
194
+ static filecoin: Blockchain;
195
+ static elrondNetwork: Blockchain;
196
+ static oasisNetwork: Blockchain;
197
+ static decred: Blockchain;
198
+ static zcash: Blockchain;
199
+ static groestlcoin: Blockchain;
200
+ static thorchain: Blockchain;
201
+ static ronin: Blockchain;
202
+ static kusama: Blockchain;
391
203
  }
392
-
393
- declare function describeHRP(value: HRP): string;
394
-
395
204
  export class StellarMemoType {
396
205
  value: number;
397
206
  static none: StellarMemoType;
@@ -400,20 +209,310 @@ export class StellarMemoType {
400
209
  static hash: StellarMemoType;
401
210
  static return: StellarMemoType;
402
211
  }
212
+ export class AESPaddingMode {
213
+ value: number;
214
+ static zero: AESPaddingMode;
215
+ static pkcs7: AESPaddingMode;
216
+ }
217
+ export class PrivateKey {
218
+ static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
219
+ static create(): PrivateKey;
220
+ static createWithData(data: Uint8Array | Buffer): PrivateKey;
221
+ static createCopy(key: PrivateKey): PrivateKey;
222
+ data(): Uint8Array;
223
+ getPublicKeySecp256k1(compressed: boolean): PublicKey;
224
+ getPublicKeyNist256p1(): PublicKey;
225
+ getPublicKeyEd25519(): PublicKey;
226
+ getPublicKeyEd25519Blake2b(): PublicKey;
227
+ getPublicKeyEd25519Cardano(): PublicKey;
228
+ getPublicKeyCurve25519(): PublicKey;
229
+ getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
230
+ sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
231
+ signAsDER(digest: Uint8Array | Buffer): Uint8Array;
232
+ signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
233
+ delete(): void;
234
+ }
235
+ export class PrivateKeyType {
236
+ value: number;
237
+ static default: PrivateKeyType;
238
+ static cardano: PrivateKeyType;
239
+ }
240
+ export class DataVector {
241
+ static create(): DataVector;
242
+ static createWithData(data: Uint8Array | Buffer): DataVector;
243
+ size(): number;
244
+ add(data: Uint8Array | Buffer): void;
245
+ get(index: number): Uint8Array;
246
+ delete(): void;
247
+ }
248
+ export class HDVersion {
249
+ value: number;
250
+ static none: HDVersion;
251
+ static xpub: HDVersion;
252
+ static xprv: HDVersion;
253
+ static ypub: HDVersion;
254
+ static yprv: HDVersion;
255
+ static zpub: HDVersion;
256
+ static zprv: HDVersion;
257
+ static ltub: HDVersion;
258
+ static ltpv: HDVersion;
259
+ static mtub: HDVersion;
260
+ static mtpv: HDVersion;
261
+ static dpub: HDVersion;
262
+ static dprv: HDVersion;
263
+ static dgub: HDVersion;
264
+ static dgpv: HDVersion;
265
+ }
266
+ export class Base64 {
267
+ static decode(string: string): Uint8Array;
268
+ static decodeUrl(string: string): Uint8Array;
269
+ static encode(data: Uint8Array | Buffer): string;
270
+ static encodeUrl(data: Uint8Array | Buffer): string;
271
+ }
272
+ export class Base32 {
273
+ static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
274
+ static decode(string: string): Uint8Array;
275
+ static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
276
+ static encode(data: Uint8Array | Buffer): string;
277
+ }
278
+ export class BitcoinScript {
279
+ static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
280
+ static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
281
+ static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
282
+ static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
283
+ static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
284
+ static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
285
+ static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
286
+ static hashTypeForCoin(coinType: CoinType): number;
287
+ static create(): BitcoinScript;
288
+ static createWithData(data: Uint8Array | Buffer): BitcoinScript;
289
+ static createCopy(script: BitcoinScript): BitcoinScript;
290
+ size(): number;
291
+ data(): Uint8Array;
292
+ scriptHash(): Uint8Array;
293
+ isPayToScriptHash(): boolean;
294
+ isPayToWitnessScriptHash(): boolean;
295
+ isPayToWitnessPublicKeyHash(): boolean;
296
+ isWitnessProgram(): boolean;
297
+ matchPayToPubkey(): Uint8Array;
298
+ matchPayToPubkeyHash(): Uint8Array;
299
+ matchPayToScriptHash(): Uint8Array;
300
+ matchPayToWitnessPublicKeyHash(): Uint8Array;
301
+ matchPayToWitnessScriptHash(): Uint8Array;
302
+ encode(): Uint8Array;
303
+ delete(): void;
304
+ }
305
+ export class Purpose {
306
+ value: number;
307
+ static bip44: Purpose;
308
+ static bip49: Purpose;
309
+ static bip84: Purpose;
310
+ static bip1852: Purpose;
311
+ }
403
312
  export class StellarPassphrase {
404
313
  value: number;
405
314
  static stellar: StellarPassphrase;
406
315
  static kin: StellarPassphrase;
407
316
  }
408
317
 
409
- declare function describeStellarPassphrase(value: StellarPassphrase): string;
318
+ declare function describeStellarPassphrase(value: StellarPassphrase): string;
319
+
320
+ export class Hash {
321
+ static sha1(data: Uint8Array | Buffer): Uint8Array;
322
+ static sha256(data: Uint8Array | Buffer): Uint8Array;
323
+ static sha512(data: Uint8Array | Buffer): Uint8Array;
324
+ static sha512_256(data: Uint8Array | Buffer): Uint8Array;
325
+ static keccak256(data: Uint8Array | Buffer): Uint8Array;
326
+ static keccak512(data: Uint8Array | Buffer): Uint8Array;
327
+ static sha3_256(data: Uint8Array | Buffer): Uint8Array;
328
+ static sha3_512(data: Uint8Array | Buffer): Uint8Array;
329
+ static ripemd(data: Uint8Array | Buffer): Uint8Array;
330
+ static blake256(data: Uint8Array | Buffer): Uint8Array;
331
+ static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
332
+ static groestl512(data: Uint8Array | Buffer): Uint8Array;
333
+ static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
334
+ static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
335
+ static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
336
+ static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
337
+ static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
338
+ static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
339
+ }
340
+ export class HDWallet {
341
+ static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
342
+ static create(strength: number, passphrase: string): HDWallet;
343
+ static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
344
+ static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
345
+ static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
346
+ seed(): Uint8Array;
347
+ mnemonic(): string;
348
+ entropy(): Uint8Array;
349
+ getMasterKey(curve: Curve): PrivateKey;
350
+ getKeyForCoin(coin: CoinType): PrivateKey;
351
+ getAddressForCoin(coin: CoinType): string;
352
+ getKey(coin: CoinType, derivationPath: string): PrivateKey;
353
+ getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
354
+ getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
355
+ getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
356
+ getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
357
+ getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
358
+ getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
359
+ getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
360
+ delete(): void;
361
+ }
362
+ export class SegwitAddress {
363
+ static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
364
+ static isValidString(string: string): boolean;
365
+ static createWithString(string: string): SegwitAddress;
366
+ static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
367
+ description(): string;
368
+ hrp(): HRP;
369
+ witnessVersion(): number;
370
+ witnessProgram(): Uint8Array;
371
+ delete(): void;
372
+ }
373
+ export class StoredKeyEncryptionLevel {
374
+ value: number;
375
+ static default: StoredKeyEncryptionLevel;
376
+ static minimal: StoredKeyEncryptionLevel;
377
+ static weak: StoredKeyEncryptionLevel;
378
+ static standard: StoredKeyEncryptionLevel;
379
+ }
380
+ export class Mnemonic {
381
+ static isValid(mnemonic: string): boolean;
382
+ static isValidWord(word: string): boolean;
383
+ static suggest(prefix: string): string;
384
+ }
385
+ export class THORChainSwap {
386
+ static buildSwap(input: Uint8Array | Buffer): Uint8Array;
387
+ }
388
+ export class AES {
389
+ static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
390
+ static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
391
+ static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
392
+ static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
393
+ }
394
+ export class EthereumAbiFunction {
395
+ static createWithString(name: string): EthereumAbiFunction;
396
+ getType(): string;
397
+ addParamUInt8(val: number, isOutput: boolean): number;
398
+ addParamUInt16(val: number, isOutput: boolean): number;
399
+ addParamUInt32(val: number, isOutput: boolean): number;
400
+ addParamUInt64(val: number, isOutput: boolean): number;
401
+ addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
402
+ addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
403
+ addParamInt8(val: number, isOutput: boolean): number;
404
+ addParamInt16(val: number, isOutput: boolean): number;
405
+ addParamInt32(val: number, isOutput: boolean): number;
406
+ addParamInt64(val: number, isOutput: boolean): number;
407
+ addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
408
+ addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
409
+ addParamBool(val: boolean, isOutput: boolean): number;
410
+ addParamString(val: string, isOutput: boolean): number;
411
+ addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
412
+ addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
413
+ addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
414
+ addParamArray(isOutput: boolean): number;
415
+ getParamUInt8(idx: number, isOutput: boolean): number;
416
+ getParamUInt64(idx: number, isOutput: boolean): number;
417
+ getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
418
+ getParamBool(idx: number, isOutput: boolean): boolean;
419
+ getParamString(idx: number, isOutput: boolean): string;
420
+ getParamAddress(idx: number, isOutput: boolean): Uint8Array;
421
+ addInArrayParamUInt8(arrayIdx: number, val: number): number;
422
+ addInArrayParamUInt16(arrayIdx: number, val: number): number;
423
+ addInArrayParamUInt32(arrayIdx: number, val: number): number;
424
+ addInArrayParamUInt64(arrayIdx: number, val: number): number;
425
+ addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
426
+ addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
427
+ addInArrayParamInt8(arrayIdx: number, val: number): number;
428
+ addInArrayParamInt16(arrayIdx: number, val: number): number;
429
+ addInArrayParamInt32(arrayIdx: number, val: number): number;
430
+ addInArrayParamInt64(arrayIdx: number, val: number): number;
431
+ addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
432
+ addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
433
+ addInArrayParamBool(arrayIdx: number, val: boolean): number;
434
+ addInArrayParamString(arrayIdx: number, val: string): number;
435
+ addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
436
+ addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
437
+ addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
438
+ delete(): void;
439
+ }
440
+ export class Curve {
441
+ value: number;
442
+ static secp256k1: Curve;
443
+ static ed25519: Curve;
444
+ static ed25519Blake2bNano: Curve;
445
+ static curve25519: Curve;
446
+ static nist256p1: Curve;
447
+ static ed25519ExtendedCardano: Curve;
448
+ }
449
+
450
+ declare function describeCurve(value: Curve): string;
410
451
 
411
- export class SolanaAddress {
412
- static createWithString(string: string): SolanaAddress;
452
+ export class CoinTypeConfiguration {
453
+ static getSymbol(type: CoinType): string;
454
+ static getDecimals(type: CoinType): number;
455
+ static getTransactionURL(type: CoinType, transactionID: string): string;
456
+ static getAccountURL(type: CoinType, accountID: string): string;
457
+ static getID(type: CoinType): string;
458
+ static getName(type: CoinType): string;
459
+ }
460
+ export class FIOAccount {
461
+ static createWithString(string: string): FIOAccount;
413
462
  description(): string;
414
- defaultTokenAddress(tokenMintAddress: string): string;
415
463
  delete(): void;
416
464
  }
465
+ export class NEARAccount {
466
+ static createWithString(string: string): NEARAccount;
467
+ description(): string;
468
+ delete(): void;
469
+ }
470
+ export class BitcoinAddress {
471
+ static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
472
+ static isValid(data: Uint8Array | Buffer): boolean;
473
+ static isValidString(string: string): boolean;
474
+ static createWithString(string: string): BitcoinAddress;
475
+ static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
476
+ static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
477
+ description(): string;
478
+ prefix(): number;
479
+ keyhash(): Uint8Array;
480
+ delete(): void;
481
+ }
482
+ export class Base58 {
483
+ static encode(data: Uint8Array | Buffer): string;
484
+ static encodeNoCheck(data: Uint8Array | Buffer): string;
485
+ static decode(string: string): Uint8Array;
486
+ static decodeNoCheck(string: string): Uint8Array;
487
+ }
488
+ export class Derivation {
489
+ value: number;
490
+ static default: Derivation;
491
+ static custom: Derivation;
492
+ static bitcoinSegwit: Derivation;
493
+ static bitcoinLegacy: Derivation;
494
+ static litecoinLegacy: Derivation;
495
+ static solanaSolana: Derivation;
496
+ }
497
+ export class PublicKeyType {
498
+ value: number;
499
+ static secp256k1: PublicKeyType;
500
+ static secp256k1Extended: PublicKeyType;
501
+ static nist256p1: PublicKeyType;
502
+ static nist256p1Extended: PublicKeyType;
503
+ static ed25519: PublicKeyType;
504
+ static ed25519Blake2b: PublicKeyType;
505
+ static curve25519: PublicKeyType;
506
+ static ed25519Cardano: PublicKeyType;
507
+ }
508
+ export class BitcoinSigHashType {
509
+ value: number;
510
+ static all: BitcoinSigHashType;
511
+ static none: BitcoinSigHashType;
512
+ static single: BitcoinSigHashType;
513
+ static fork: BitcoinSigHashType;
514
+ static forkBTG: BitcoinSigHashType;
515
+ }
417
516
  export class EthereumChainID {
418
517
  value: number;
419
518
  static ethereum: EthereumChainID;
@@ -423,8 +522,10 @@ export class EthereumChainID {
423
522
  static callisto: EthereumChainID;
424
523
  static tomochain: EthereumChainID;
425
524
  static polygon: EthereumChainID;
525
+ static okc: EthereumChainID;
426
526
  static thundertoken: EthereumChainID;
427
527
  static gochain: EthereumChainID;
528
+ static meter: EthereumChainID;
428
529
  static celo: EthereumChainID;
429
530
  static wanchain: EthereumChainID;
430
531
  static cronos: EthereumChainID;
@@ -439,6 +540,7 @@ export class EthereumChainID {
439
540
  static moonbeam: EthereumChainID;
440
541
  static moonriver: EthereumChainID;
441
542
  static ronin: EthereumChainID;
543
+ static kavaevm: EthereumChainID;
442
544
  static klaytn: EthereumChainID;
443
545
  static avalanchec: EthereumChainID;
444
546
  static evmos: EthereumChainID;
@@ -446,71 +548,62 @@ export class EthereumChainID {
446
548
  static smartchain: EthereumChainID;
447
549
  static aurora: EthereumChainID;
448
550
  }
449
- export class BitcoinScript {
450
- static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
451
- static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
452
- static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
453
- static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
454
- static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
455
- static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
456
- static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
457
- static hashTypeForCoin(coinType: CoinType): number;
458
- static create(): BitcoinScript;
459
- static createWithData(data: Uint8Array | Buffer): BitcoinScript;
460
- static createCopy(script: BitcoinScript): BitcoinScript;
461
- size(): number;
462
- data(): Uint8Array;
463
- scriptHash(): Uint8Array;
464
- isPayToScriptHash(): boolean;
465
- isPayToWitnessScriptHash(): boolean;
466
- isPayToWitnessPublicKeyHash(): boolean;
467
- isWitnessProgram(): boolean;
468
- matchPayToPubkey(): Uint8Array;
469
- matchPayToPubkeyHash(): Uint8Array;
470
- matchPayToScriptHash(): Uint8Array;
471
- matchPayToWitnessPublicKeyHash(): Uint8Array;
472
- matchPayToWitnessScriptHash(): Uint8Array;
473
- encode(): Uint8Array;
474
- delete(): void;
551
+ export class HRP {
552
+ value: number;
553
+ static unknown: HRP;
554
+ static bitcoin: HRP;
555
+ static litecoin: HRP;
556
+ static viacoin: HRP;
557
+ static groestlcoin: HRP;
558
+ static digiByte: HRP;
559
+ static monacoin: HRP;
560
+ static cosmos: HRP;
561
+ static bitcoinCash: HRP;
562
+ static bitcoinGold: HRP;
563
+ static ioTeX: HRP;
564
+ static zilliqa: HRP;
565
+ static terra: HRP;
566
+ static cryptoOrg: HRP;
567
+ static kava: HRP;
568
+ static oasis: HRP;
569
+ static bluzelle: HRP;
570
+ static bandChain: HRP;
571
+ static elrond: HRP;
572
+ static binance: HRP;
573
+ static ecash: HRP;
574
+ static thorchain: HRP;
575
+ static harmony: HRP;
576
+ static cardano: HRP;
577
+ static qtum: HRP;
578
+ static osmosis: HRP;
579
+ static terraV2: HRP;
580
+ static nativeEvmos: HRP;
475
581
  }
476
- export class PrivateKey {
477
- static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
478
- static create(): PrivateKey;
479
- static createWithData(data: Uint8Array | Buffer): PrivateKey;
480
- static createCopy(key: PrivateKey): PrivateKey;
481
- data(): Uint8Array;
482
- getPublicKeySecp256k1(compressed: boolean): PublicKey;
483
- getPublicKeyNist256p1(): PublicKey;
484
- getPublicKeyEd25519(): PublicKey;
485
- getPublicKeyEd25519Blake2b(): PublicKey;
486
- getPublicKeyEd25519Extended(): PublicKey;
487
- getPublicKeyCurve25519(): PublicKey;
488
- getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
489
- sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
490
- signAsDER(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
491
- signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
492
- delete(): void;
582
+
583
+ declare function describeHRP(value: HRP): string;
584
+
585
+ export class EthereumAbiValue {
586
+ static encodeBool(value: boolean): Uint8Array;
587
+ static encodeInt32(value: number): Uint8Array;
588
+ static encodeUInt32(value: number): Uint8Array;
589
+ static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
590
+ static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
591
+ static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
592
+ static encodeString(value: string): Uint8Array;
593
+ static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
594
+ static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
595
+ static decodeUInt256(input: Uint8Array | Buffer): string;
596
+ static decodeValue(input: Uint8Array | Buffer, type: string): string;
597
+ static decodeArray(input: Uint8Array | Buffer, type: string): string;
493
598
  }
494
- export class HDWallet {
495
- static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
496
- static create(strength: number, passphrase: string): HDWallet;
497
- static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
498
- static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
499
- static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
500
- seed(): Uint8Array;
501
- mnemonic(): string;
502
- entropy(): Uint8Array;
503
- getMasterKey(curve: Curve): PrivateKey;
504
- getKeyForCoin(coin: CoinType): PrivateKey;
505
- getAddressForCoin(coin: CoinType): string;
506
- getKey(coin: CoinType, derivationPath: string): PrivateKey;
507
- getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
508
- getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
509
- getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
510
- getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
511
- getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
512
- getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
513
- getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
599
+ export class AnyAddress {
600
+ static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
601
+ static isValid(string: string, coin: CoinType): boolean;
602
+ static createWithString(string: string, coin: CoinType): AnyAddress;
603
+ static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
604
+ description(): string;
605
+ coin(): CoinType;
606
+ data(): Uint8Array;
514
607
  delete(): void;
515
608
  }
516
609
  export class StoredKey {
@@ -551,57 +644,9 @@ export class RippleXAddress {
551
644
  tag(): number;
552
645
  delete(): void;
553
646
  }
554
- export class EthereumAbiValue {
555
- static encodeBool(value: boolean): Uint8Array;
556
- static encodeInt32(value: number): Uint8Array;
557
- static encodeUInt32(value: number): Uint8Array;
558
- static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
559
- static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
560
- static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
561
- static encodeString(value: string): Uint8Array;
562
- static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
563
- static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
564
- static decodeUInt256(input: Uint8Array | Buffer): string;
565
- static decodeValue(input: Uint8Array | Buffer, type: string): string;
566
- static decodeArray(input: Uint8Array | Buffer, type: string): string;
567
- }
568
- export class AES {
569
- static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
570
- static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
571
- static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
572
- static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
573
- }
574
- export class AESPaddingMode {
575
- value: number;
576
- static zero: AESPaddingMode;
577
- static pkcs7: AESPaddingMode;
578
- }
579
- export class GroestlcoinAddress {
580
- static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
581
- static isValidString(string: string): boolean;
582
- static createWithString(string: string): GroestlcoinAddress;
583
- static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
584
- description(): string;
585
- delete(): void;
586
- }
587
- export class Account {
588
- static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
589
- address(): string;
590
- derivation(): Derivation;
591
- derivationPath(): string;
592
- publicKey(): string;
593
- extendedPublicKey(): string;
594
- coin(): CoinType;
595
- delete(): void;
596
- }
597
- export class Derivation {
598
- value: number;
599
- static default: Derivation;
600
- static custom: Derivation;
601
- static bitcoinSegwit: Derivation;
602
- static bitcoinLegacy: Derivation;
603
- static litecoinLegacy: Derivation;
604
- static solanaSolana: Derivation;
647
+ export class PBKDF2 {
648
+ static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
649
+ static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
605
650
  }
606
651
  export class PublicKey {
607
652
  static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
@@ -615,26 +660,6 @@ export class PublicKey {
615
660
  description(): string;
616
661
  verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
617
662
  verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
618
- verifySchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
619
- delete(): void;
620
- }
621
- export class DataVector {
622
- static create(): DataVector;
623
- static createWithData(data: Uint8Array | Buffer): DataVector;
624
- size(): number;
625
- add(data: Uint8Array | Buffer): void;
626
- get(index: number): Uint8Array;
663
+ verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
627
664
  delete(): void;
628
665
  }
629
- export class Curve {
630
- value: number;
631
- static secp256k1: Curve;
632
- static ed25519: Curve;
633
- static ed25519Blake2bNano: Curve;
634
- static curve25519: Curve;
635
- static nist256p1: Curve;
636
- static ed25519Extended: Curve;
637
- }
638
-
639
- declare function describeCurve(value: Curve): string;
640
-