@trustwallet/wallet-core 2.9.7 → 2.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/wallet-core.d.ts +393 -393
- package/package.json +1 -1
@@ -6,132 +6,37 @@
|
|
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
|
-
}
|
13
9
|
export class AnySigner {
|
14
10
|
static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
15
11
|
static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
16
12
|
static supportsJSON(coin: CoinType): boolean;
|
17
13
|
}
|
18
|
-
export
|
19
|
-
|
20
|
-
|
21
|
-
static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
|
22
|
-
isCompressed(): boolean;
|
23
|
-
compressed(): PublicKey;
|
24
|
-
uncompressed(): PublicKey;
|
25
|
-
data(): Uint8Array;
|
26
|
-
keyType(): PublicKeyType;
|
27
|
-
description(): string;
|
28
|
-
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
29
|
-
verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
30
|
-
verifySchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
31
|
-
delete(): void;
|
32
|
-
}
|
33
|
-
export class BitcoinAddress {
|
34
|
-
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
35
|
-
static isValid(data: Uint8Array | Buffer): boolean;
|
36
|
-
static isValidString(string: string): boolean;
|
37
|
-
static createWithString(string: string): BitcoinAddress;
|
38
|
-
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
39
|
-
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
40
|
-
description(): string;
|
41
|
-
prefix(): number;
|
42
|
-
keyhash(): Uint8Array;
|
43
|
-
delete(): void;
|
44
|
-
}
|
45
|
-
export class StellarPassphrase {
|
46
|
-
value: number;
|
47
|
-
static stellar: StellarPassphrase;
|
48
|
-
static kin: StellarPassphrase;
|
14
|
+
export namespace HexCoding {
|
15
|
+
export function decode(hex: string): Uint8Array;
|
16
|
+
export function encode(buffer: Uint8Array | Buffer): string;
|
49
17
|
}
|
50
|
-
|
51
|
-
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
52
|
-
|
53
18
|
export class SS58AddressType {
|
54
19
|
value: number;
|
55
20
|
static polkadot: SS58AddressType;
|
56
21
|
static kusama: SS58AddressType;
|
57
22
|
}
|
58
|
-
export class
|
59
|
-
static
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
static sha3_512(data: Uint8Array | Buffer): Uint8Array;
|
67
|
-
static ripemd(data: Uint8Array | Buffer): Uint8Array;
|
68
|
-
static blake256(data: Uint8Array | Buffer): Uint8Array;
|
69
|
-
static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
|
70
|
-
static groestl512(data: Uint8Array | Buffer): Uint8Array;
|
71
|
-
static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
|
72
|
-
static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
73
|
-
static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
74
|
-
static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
|
75
|
-
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
76
|
-
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
77
|
-
}
|
78
|
-
export class EthereumAbiFunction {
|
79
|
-
static createWithString(name: string): EthereumAbiFunction;
|
80
|
-
getType(): string;
|
81
|
-
addParamUInt8(val: number, isOutput: boolean): number;
|
82
|
-
addParamUInt16(val: number, isOutput: boolean): number;
|
83
|
-
addParamUInt32(val: number, isOutput: boolean): number;
|
84
|
-
addParamUInt64(val: number, isOutput: boolean): number;
|
85
|
-
addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
86
|
-
addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
87
|
-
addParamInt8(val: number, isOutput: boolean): number;
|
88
|
-
addParamInt16(val: number, isOutput: boolean): number;
|
89
|
-
addParamInt32(val: number, isOutput: boolean): number;
|
90
|
-
addParamInt64(val: number, isOutput: boolean): number;
|
91
|
-
addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
92
|
-
addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
93
|
-
addParamBool(val: boolean, isOutput: boolean): number;
|
94
|
-
addParamString(val: string, isOutput: boolean): number;
|
95
|
-
addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
|
96
|
-
addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
|
97
|
-
addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
98
|
-
addParamArray(isOutput: boolean): number;
|
99
|
-
getParamUInt8(idx: number, isOutput: boolean): number;
|
100
|
-
getParamUInt64(idx: number, isOutput: boolean): number;
|
101
|
-
getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
|
102
|
-
getParamBool(idx: number, isOutput: boolean): boolean;
|
103
|
-
getParamString(idx: number, isOutput: boolean): string;
|
104
|
-
getParamAddress(idx: number, isOutput: boolean): Uint8Array;
|
105
|
-
addInArrayParamUInt8(arrayIdx: number, val: number): number;
|
106
|
-
addInArrayParamUInt16(arrayIdx: number, val: number): number;
|
107
|
-
addInArrayParamUInt32(arrayIdx: number, val: number): number;
|
108
|
-
addInArrayParamUInt64(arrayIdx: number, val: number): number;
|
109
|
-
addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
110
|
-
addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
111
|
-
addInArrayParamInt8(arrayIdx: number, val: number): number;
|
112
|
-
addInArrayParamInt16(arrayIdx: number, val: number): number;
|
113
|
-
addInArrayParamInt32(arrayIdx: number, val: number): number;
|
114
|
-
addInArrayParamInt64(arrayIdx: number, val: number): number;
|
115
|
-
addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
116
|
-
addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
117
|
-
addInArrayParamBool(arrayIdx: number, val: boolean): number;
|
118
|
-
addInArrayParamString(arrayIdx: number, val: string): number;
|
119
|
-
addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
|
120
|
-
addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
|
121
|
-
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;
|
122
31
|
delete(): void;
|
123
32
|
}
|
124
|
-
export class
|
125
|
-
static
|
126
|
-
static
|
127
|
-
static
|
128
|
-
static
|
129
|
-
|
130
|
-
|
131
|
-
static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
132
|
-
static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
133
|
-
static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
134
|
-
static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
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;
|
135
40
|
}
|
136
41
|
export class CoinType {
|
137
42
|
value: number;
|
@@ -226,117 +131,26 @@ export class CoinType {
|
|
226
131
|
static klaytn: CoinType;
|
227
132
|
static meter: CoinType;
|
228
133
|
}
|
229
|
-
export class
|
230
|
-
|
231
|
-
static none: StellarMemoType;
|
232
|
-
static text: StellarMemoType;
|
233
|
-
static id: StellarMemoType;
|
234
|
-
static hash: StellarMemoType;
|
235
|
-
static return: StellarMemoType;
|
236
|
-
}
|
237
|
-
export class THORChainSwap {
|
238
|
-
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
239
|
-
}
|
240
|
-
export class PBKDF2 {
|
241
|
-
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
242
|
-
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
243
|
-
}
|
244
|
-
export class HDWallet {
|
245
|
-
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
246
|
-
static create(strength: number, passphrase: string): HDWallet;
|
247
|
-
static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
|
248
|
-
static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
|
249
|
-
static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
|
250
|
-
seed(): Uint8Array;
|
251
|
-
mnemonic(): string;
|
252
|
-
entropy(): Uint8Array;
|
253
|
-
getMasterKey(curve: Curve): PrivateKey;
|
254
|
-
getKeyForCoin(coin: CoinType): PrivateKey;
|
255
|
-
getAddressForCoin(coin: CoinType): string;
|
256
|
-
getKey(coin: CoinType, derivationPath: string): PrivateKey;
|
257
|
-
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
258
|
-
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
259
|
-
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
260
|
-
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
261
|
-
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
262
|
-
getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
263
|
-
getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
264
|
-
delete(): void;
|
265
|
-
}
|
266
|
-
export class RippleXAddress {
|
267
|
-
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
268
|
-
static isValidString(string: string): boolean;
|
269
|
-
static createWithString(string: string): RippleXAddress;
|
270
|
-
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
271
|
-
description(): string;
|
272
|
-
tag(): number;
|
273
|
-
delete(): void;
|
274
|
-
}
|
275
|
-
export class HRP {
|
276
|
-
value: number;
|
277
|
-
static unknown: HRP;
|
278
|
-
static bitcoin: HRP;
|
279
|
-
static litecoin: HRP;
|
280
|
-
static viacoin: HRP;
|
281
|
-
static groestlcoin: HRP;
|
282
|
-
static digiByte: HRP;
|
283
|
-
static monacoin: HRP;
|
284
|
-
static cosmos: HRP;
|
285
|
-
static bitcoinCash: HRP;
|
286
|
-
static bitcoinGold: HRP;
|
287
|
-
static ioTeX: HRP;
|
288
|
-
static zilliqa: HRP;
|
289
|
-
static terra: HRP;
|
290
|
-
static cryptoOrg: HRP;
|
291
|
-
static kava: HRP;
|
292
|
-
static oasis: HRP;
|
293
|
-
static bluzelle: HRP;
|
294
|
-
static bandChain: HRP;
|
295
|
-
static elrond: HRP;
|
296
|
-
static binance: HRP;
|
297
|
-
static ecash: HRP;
|
298
|
-
static thorchain: HRP;
|
299
|
-
static harmony: HRP;
|
300
|
-
static cardano: HRP;
|
301
|
-
static qtum: HRP;
|
302
|
-
static osmosis: HRP;
|
303
|
-
static terraV2: HRP;
|
304
|
-
static nativeEvmos: HRP;
|
305
|
-
}
|
306
|
-
|
307
|
-
declare function describeHRP(value: HRP): string;
|
308
|
-
|
309
|
-
export class EthereumAbiValue {
|
310
|
-
static encodeBool(value: boolean): Uint8Array;
|
311
|
-
static encodeInt32(value: number): Uint8Array;
|
312
|
-
static encodeUInt32(value: number): Uint8Array;
|
313
|
-
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
314
|
-
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
315
|
-
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
316
|
-
static encodeString(value: string): Uint8Array;
|
317
|
-
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
318
|
-
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
319
|
-
static decodeUInt256(input: Uint8Array | Buffer): string;
|
320
|
-
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
321
|
-
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
134
|
+
export class Cardano {
|
135
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
322
136
|
}
|
323
137
|
export class TransactionCompiler {
|
324
138
|
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
325
139
|
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
326
140
|
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
327
141
|
}
|
328
|
-
export class
|
329
|
-
|
330
|
-
static default: StoredKeyEncryptionLevel;
|
331
|
-
static minimal: StoredKeyEncryptionLevel;
|
332
|
-
static weak: StoredKeyEncryptionLevel;
|
333
|
-
static standard: StoredKeyEncryptionLevel;
|
334
|
-
}
|
335
|
-
export class NEARAccount {
|
336
|
-
static createWithString(string: string): NEARAccount;
|
142
|
+
export class SolanaAddress {
|
143
|
+
static createWithString(string: string): SolanaAddress;
|
337
144
|
description(): string;
|
145
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
338
146
|
delete(): void;
|
339
147
|
}
|
148
|
+
export class EthereumAbi {
|
149
|
+
static encode(fn: EthereumAbiFunction): Uint8Array;
|
150
|
+
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
151
|
+
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
152
|
+
static encodeTyped(messageJson: string): Uint8Array;
|
153
|
+
}
|
340
154
|
export class StellarVersionByte {
|
341
155
|
value: number;
|
342
156
|
static accountID: StellarVersionByte;
|
@@ -344,171 +158,7 @@ export class StellarVersionByte {
|
|
344
158
|
static preAuthTX: StellarVersionByte;
|
345
159
|
static sha256Hash: StellarVersionByte;
|
346
160
|
}
|
347
|
-
export class
|
348
|
-
value: number;
|
349
|
-
static default: Derivation;
|
350
|
-
static custom: Derivation;
|
351
|
-
static bitcoinSegwit: Derivation;
|
352
|
-
static bitcoinLegacy: Derivation;
|
353
|
-
static litecoinLegacy: Derivation;
|
354
|
-
static solanaSolana: Derivation;
|
355
|
-
}
|
356
|
-
export class PublicKeyType {
|
357
|
-
value: number;
|
358
|
-
static secp256k1: PublicKeyType;
|
359
|
-
static secp256k1Extended: PublicKeyType;
|
360
|
-
static nist256p1: PublicKeyType;
|
361
|
-
static nist256p1Extended: PublicKeyType;
|
362
|
-
static ed25519: PublicKeyType;
|
363
|
-
static ed25519Blake2b: PublicKeyType;
|
364
|
-
static curve25519: PublicKeyType;
|
365
|
-
static ed25519Extended: PublicKeyType;
|
366
|
-
}
|
367
|
-
export class Account {
|
368
|
-
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
369
|
-
address(): string;
|
370
|
-
derivation(): Derivation;
|
371
|
-
derivationPath(): string;
|
372
|
-
publicKey(): string;
|
373
|
-
extendedPublicKey(): string;
|
374
|
-
coin(): CoinType;
|
375
|
-
delete(): void;
|
376
|
-
}
|
377
|
-
export class Base58 {
|
378
|
-
static encode(data: Uint8Array | Buffer): string;
|
379
|
-
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
380
|
-
static decode(string: string): Uint8Array;
|
381
|
-
static decodeNoCheck(string: string): Uint8Array;
|
382
|
-
}
|
383
|
-
export class FIOAccount {
|
384
|
-
static createWithString(string: string): FIOAccount;
|
385
|
-
description(): string;
|
386
|
-
delete(): void;
|
387
|
-
}
|
388
|
-
export class SegwitAddress {
|
389
|
-
static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
|
390
|
-
static isValidString(string: string): boolean;
|
391
|
-
static createWithString(string: string): SegwitAddress;
|
392
|
-
static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
|
393
|
-
description(): string;
|
394
|
-
hrp(): HRP;
|
395
|
-
witnessVersion(): number;
|
396
|
-
witnessProgram(): Uint8Array;
|
397
|
-
delete(): void;
|
398
|
-
}
|
399
|
-
export class Mnemonic {
|
400
|
-
static isValid(mnemonic: string): boolean;
|
401
|
-
static isValidWord(word: string): boolean;
|
402
|
-
static suggest(prefix: string): string;
|
403
|
-
}
|
404
|
-
export class EthereumAbi {
|
405
|
-
static encode(fn: EthereumAbiFunction): Uint8Array;
|
406
|
-
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
407
|
-
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
408
|
-
static encodeTyped(messageJson: string): Uint8Array;
|
409
|
-
}
|
410
|
-
export class CoinTypeConfiguration {
|
411
|
-
static getSymbol(type: CoinType): string;
|
412
|
-
static getDecimals(type: CoinType): number;
|
413
|
-
static getTransactionURL(type: CoinType, transactionID: string): string;
|
414
|
-
static getAccountURL(type: CoinType, accountID: string): string;
|
415
|
-
static getID(type: CoinType): string;
|
416
|
-
static getName(type: CoinType): string;
|
417
|
-
}
|
418
|
-
export class StoredKey {
|
419
|
-
static load(path: string): StoredKey;
|
420
|
-
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
421
|
-
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
422
|
-
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
423
|
-
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
424
|
-
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
425
|
-
identifier(): string;
|
426
|
-
name(): string;
|
427
|
-
isMnemonic(): boolean;
|
428
|
-
accountCount(): number;
|
429
|
-
encryptionParameters(): string;
|
430
|
-
account(index: number): Account;
|
431
|
-
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
432
|
-
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
433
|
-
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
434
|
-
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
435
|
-
removeAccountForCoin(coin: CoinType): void;
|
436
|
-
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
437
|
-
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
438
|
-
store(path: string): boolean;
|
439
|
-
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
440
|
-
decryptMnemonic(password: Uint8Array | Buffer): string;
|
441
|
-
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
442
|
-
wallet(password: Uint8Array | Buffer): HDWallet;
|
443
|
-
exportJSON(): Uint8Array;
|
444
|
-
fixAddresses(password: Uint8Array | Buffer): boolean;
|
445
|
-
delete(): void;
|
446
|
-
}
|
447
|
-
export class BitcoinSigHashType {
|
448
|
-
value: number;
|
449
|
-
static all: BitcoinSigHashType;
|
450
|
-
static none: BitcoinSigHashType;
|
451
|
-
static single: BitcoinSigHashType;
|
452
|
-
static fork: BitcoinSigHashType;
|
453
|
-
static forkBTG: BitcoinSigHashType;
|
454
|
-
}
|
455
|
-
export class EthereumChainID {
|
456
|
-
value: number;
|
457
|
-
static ethereum: EthereumChainID;
|
458
|
-
static classic: EthereumChainID;
|
459
|
-
static poa: EthereumChainID;
|
460
|
-
static vechain: EthereumChainID;
|
461
|
-
static callisto: EthereumChainID;
|
462
|
-
static tomochain: EthereumChainID;
|
463
|
-
static polygon: EthereumChainID;
|
464
|
-
static thundertoken: EthereumChainID;
|
465
|
-
static gochain: EthereumChainID;
|
466
|
-
static meter: EthereumChainID;
|
467
|
-
static celo: EthereumChainID;
|
468
|
-
static wanchain: EthereumChainID;
|
469
|
-
static cronos: EthereumChainID;
|
470
|
-
static optimism: EthereumChainID;
|
471
|
-
static xdai: EthereumChainID;
|
472
|
-
static smartbch: EthereumChainID;
|
473
|
-
static fantom: EthereumChainID;
|
474
|
-
static boba: EthereumChainID;
|
475
|
-
static kcc: EthereumChainID;
|
476
|
-
static heco: EthereumChainID;
|
477
|
-
static metis: EthereumChainID;
|
478
|
-
static moonbeam: EthereumChainID;
|
479
|
-
static moonriver: EthereumChainID;
|
480
|
-
static ronin: EthereumChainID;
|
481
|
-
static kavaevm: EthereumChainID;
|
482
|
-
static klaytn: EthereumChainID;
|
483
|
-
static avalanchec: EthereumChainID;
|
484
|
-
static evmos: EthereumChainID;
|
485
|
-
static arbitrum: EthereumChainID;
|
486
|
-
static smartchain: EthereumChainID;
|
487
|
-
static aurora: EthereumChainID;
|
488
|
-
}
|
489
|
-
export class DataVector {
|
490
|
-
static create(): DataVector;
|
491
|
-
static createWithData(data: Uint8Array | Buffer): DataVector;
|
492
|
-
size(): number;
|
493
|
-
add(data: Uint8Array | Buffer): void;
|
494
|
-
get(index: number): Uint8Array;
|
495
|
-
delete(): void;
|
496
|
-
}
|
497
|
-
export class SolanaAddress {
|
498
|
-
static createWithString(string: string): SolanaAddress;
|
499
|
-
description(): string;
|
500
|
-
defaultTokenAddress(tokenMintAddress: string): string;
|
501
|
-
delete(): void;
|
502
|
-
}
|
503
|
-
export class GroestlcoinAddress {
|
504
|
-
static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
|
505
|
-
static isValidString(string: string): boolean;
|
506
|
-
static createWithString(string: string): GroestlcoinAddress;
|
507
|
-
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
508
|
-
description(): string;
|
509
|
-
delete(): void;
|
510
|
-
}
|
511
|
-
export class Blockchain {
|
161
|
+
export class Blockchain {
|
512
162
|
value: number;
|
513
163
|
static bitcoin: Blockchain;
|
514
164
|
static ethereum: Blockchain;
|
@@ -550,8 +200,18 @@ export class Blockchain {
|
|
550
200
|
static ronin: Blockchain;
|
551
201
|
static kusama: Blockchain;
|
552
202
|
}
|
553
|
-
export class
|
554
|
-
|
203
|
+
export class StellarMemoType {
|
204
|
+
value: number;
|
205
|
+
static none: StellarMemoType;
|
206
|
+
static text: StellarMemoType;
|
207
|
+
static id: StellarMemoType;
|
208
|
+
static hash: StellarMemoType;
|
209
|
+
static return: StellarMemoType;
|
210
|
+
}
|
211
|
+
export class AESPaddingMode {
|
212
|
+
value: number;
|
213
|
+
static zero: AESPaddingMode;
|
214
|
+
static pkcs7: AESPaddingMode;
|
555
215
|
}
|
556
216
|
export class PrivateKey {
|
557
217
|
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
@@ -571,6 +231,14 @@ export class PrivateKey {
|
|
571
231
|
signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
572
232
|
delete(): void;
|
573
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;
|
240
|
+
delete(): void;
|
241
|
+
}
|
574
242
|
export class HDVersion {
|
575
243
|
value: number;
|
576
244
|
static none: HDVersion;
|
@@ -589,6 +257,12 @@ export class HDVersion {
|
|
589
257
|
static dgub: HDVersion;
|
590
258
|
static dgpv: HDVersion;
|
591
259
|
}
|
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
|
+
}
|
592
266
|
export class BitcoinScript {
|
593
267
|
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
594
268
|
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
@@ -623,22 +297,135 @@ export class Purpose {
|
|
623
297
|
static bip84: Purpose;
|
624
298
|
static bip1852: Purpose;
|
625
299
|
}
|
626
|
-
export class
|
627
|
-
|
628
|
-
static
|
629
|
-
static
|
630
|
-
|
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;
|
631
355
|
description(): string;
|
632
|
-
|
633
|
-
|
356
|
+
hrp(): HRP;
|
357
|
+
witnessVersion(): number;
|
358
|
+
witnessProgram(): Uint8Array;
|
634
359
|
delete(): void;
|
635
360
|
}
|
636
|
-
export class
|
361
|
+
export class StoredKeyEncryptionLevel {
|
637
362
|
value: number;
|
638
|
-
static
|
639
|
-
static
|
363
|
+
static default: StoredKeyEncryptionLevel;
|
364
|
+
static minimal: StoredKeyEncryptionLevel;
|
365
|
+
static weak: StoredKeyEncryptionLevel;
|
366
|
+
static standard: StoredKeyEncryptionLevel;
|
640
367
|
}
|
641
|
-
export class
|
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 {
|
642
429
|
value: number;
|
643
430
|
static secp256k1: Curve;
|
644
431
|
static ed25519: Curve;
|
@@ -650,3 +437,216 @@ export class Curve {
|
|
650
437
|
|
651
438
|
declare function describeCurve(value: Curve): string;
|
652
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 {
|
539
|
+
value: number;
|
540
|
+
static unknown: HRP;
|
541
|
+
static bitcoin: HRP;
|
542
|
+
static litecoin: HRP;
|
543
|
+
static viacoin: HRP;
|
544
|
+
static groestlcoin: HRP;
|
545
|
+
static digiByte: HRP;
|
546
|
+
static monacoin: HRP;
|
547
|
+
static cosmos: HRP;
|
548
|
+
static bitcoinCash: HRP;
|
549
|
+
static bitcoinGold: HRP;
|
550
|
+
static ioTeX: HRP;
|
551
|
+
static zilliqa: HRP;
|
552
|
+
static terra: HRP;
|
553
|
+
static cryptoOrg: HRP;
|
554
|
+
static kava: HRP;
|
555
|
+
static oasis: HRP;
|
556
|
+
static bluzelle: HRP;
|
557
|
+
static bandChain: HRP;
|
558
|
+
static elrond: HRP;
|
559
|
+
static binance: HRP;
|
560
|
+
static ecash: HRP;
|
561
|
+
static thorchain: HRP;
|
562
|
+
static harmony: HRP;
|
563
|
+
static cardano: HRP;
|
564
|
+
static qtum: HRP;
|
565
|
+
static osmosis: HRP;
|
566
|
+
static terraV2: HRP;
|
567
|
+
static nativeEvmos: HRP;
|
568
|
+
}
|
569
|
+
|
570
|
+
declare function describeHRP(value: HRP): string;
|
571
|
+
|
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;
|
652
|
+
}
|