@trustwallet/wallet-core 2.9.7 → 3.0.1
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/README.md +7 -0
- package/dist/generated/core_proto.d.ts +86 -1
- package/dist/generated/core_proto.js +235 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +7 -16
- package/dist/lib/wallet-core.js +181 -110
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/{lib/wallet-core.d.ts → wallet-core.d.ts} +475 -408
- package/package.json +3 -2
@@ -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;
|
@@ -225,118 +130,28 @@ export class CoinType {
|
|
225
130
|
static kavaEvm: CoinType;
|
226
131
|
static klaytn: CoinType;
|
227
132
|
static meter: CoinType;
|
133
|
+
static okxchain: CoinType;
|
228
134
|
}
|
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;
|
135
|
+
export class Cardano {
|
136
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
322
137
|
}
|
323
138
|
export class TransactionCompiler {
|
324
139
|
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
325
140
|
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
326
141
|
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
327
142
|
}
|
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;
|
143
|
+
export class SolanaAddress {
|
144
|
+
static createWithString(string: string): SolanaAddress;
|
337
145
|
description(): string;
|
146
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
338
147
|
delete(): void;
|
339
148
|
}
|
149
|
+
export class EthereumAbi {
|
150
|
+
static encode(fn: EthereumAbiFunction): Uint8Array;
|
151
|
+
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
152
|
+
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
153
|
+
static encodeTyped(messageJson: string): Uint8Array;
|
154
|
+
}
|
340
155
|
export class StellarVersionByte {
|
341
156
|
value: number;
|
342
157
|
static accountID: StellarVersionByte;
|
@@ -344,171 +159,7 @@ export class StellarVersionByte {
|
|
344
159
|
static preAuthTX: StellarVersionByte;
|
345
160
|
static sha256Hash: StellarVersionByte;
|
346
161
|
}
|
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 {
|
162
|
+
export class Blockchain {
|
512
163
|
value: number;
|
513
164
|
static bitcoin: Blockchain;
|
514
165
|
static ethereum: Blockchain;
|
@@ -550,8 +201,18 @@ export class Blockchain {
|
|
550
201
|
static ronin: Blockchain;
|
551
202
|
static kusama: Blockchain;
|
552
203
|
}
|
553
|
-
export class
|
554
|
-
|
204
|
+
export class StellarMemoType {
|
205
|
+
value: number;
|
206
|
+
static none: StellarMemoType;
|
207
|
+
static text: StellarMemoType;
|
208
|
+
static id: StellarMemoType;
|
209
|
+
static hash: StellarMemoType;
|
210
|
+
static return: StellarMemoType;
|
211
|
+
}
|
212
|
+
export class AESPaddingMode {
|
213
|
+
value: number;
|
214
|
+
static zero: AESPaddingMode;
|
215
|
+
static pkcs7: AESPaddingMode;
|
555
216
|
}
|
556
217
|
export class PrivateKey {
|
557
218
|
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
@@ -563,12 +224,25 @@ export class PrivateKey {
|
|
563
224
|
getPublicKeyNist256p1(): PublicKey;
|
564
225
|
getPublicKeyEd25519(): PublicKey;
|
565
226
|
getPublicKeyEd25519Blake2b(): PublicKey;
|
566
|
-
|
227
|
+
getPublicKeyEd25519Cardano(): PublicKey;
|
567
228
|
getPublicKeyCurve25519(): PublicKey;
|
568
229
|
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
569
230
|
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
570
|
-
signAsDER(digest: Uint8Array | Buffer
|
571
|
-
|
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;
|
572
246
|
delete(): void;
|
573
247
|
}
|
574
248
|
export class HDVersion {
|
@@ -589,6 +263,18 @@ export class HDVersion {
|
|
589
263
|
static dgub: HDVersion;
|
590
264
|
static dgpv: HDVersion;
|
591
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
|
+
}
|
592
278
|
export class BitcoinScript {
|
593
279
|
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
594
280
|
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
@@ -623,30 +309,411 @@ export class Purpose {
|
|
623
309
|
static bip84: Purpose;
|
624
310
|
static bip1852: Purpose;
|
625
311
|
}
|
626
|
-
export class
|
627
|
-
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
628
|
-
static isValid(string: string, coin: CoinType): boolean;
|
629
|
-
static createWithString(string: string, coin: CoinType): AnyAddress;
|
630
|
-
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
631
|
-
description(): string;
|
632
|
-
coin(): CoinType;
|
633
|
-
data(): Uint8Array;
|
634
|
-
delete(): void;
|
635
|
-
}
|
636
|
-
export class AESPaddingMode {
|
637
|
-
value: number;
|
638
|
-
static zero: AESPaddingMode;
|
639
|
-
static pkcs7: AESPaddingMode;
|
640
|
-
}
|
641
|
-
export class Curve {
|
312
|
+
export class StellarPassphrase {
|
642
313
|
value: number;
|
643
|
-
static
|
644
|
-
static
|
645
|
-
static ed25519Blake2bNano: Curve;
|
646
|
-
static curve25519: Curve;
|
647
|
-
static nist256p1: Curve;
|
648
|
-
static ed25519Extended: Curve;
|
314
|
+
static stellar: StellarPassphrase;
|
315
|
+
static kin: StellarPassphrase;
|
649
316
|
}
|
650
317
|
|
651
|
-
declare function
|
318
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
652
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
|
+
getKeyByCurve(curve: Curve, derivationPath: string): PrivateKey;
|
354
|
+
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
355
|
+
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
356
|
+
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
357
|
+
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
358
|
+
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
359
|
+
getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
360
|
+
getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
361
|
+
delete(): void;
|
362
|
+
}
|
363
|
+
export class SegwitAddress {
|
364
|
+
static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
|
365
|
+
static isValidString(string: string): boolean;
|
366
|
+
static createWithString(string: string): SegwitAddress;
|
367
|
+
static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
|
368
|
+
description(): string;
|
369
|
+
hrp(): HRP;
|
370
|
+
witnessVersion(): number;
|
371
|
+
witnessProgram(): Uint8Array;
|
372
|
+
delete(): void;
|
373
|
+
}
|
374
|
+
export class StoredKeyEncryptionLevel {
|
375
|
+
value: number;
|
376
|
+
static default: StoredKeyEncryptionLevel;
|
377
|
+
static minimal: StoredKeyEncryptionLevel;
|
378
|
+
static weak: StoredKeyEncryptionLevel;
|
379
|
+
static standard: StoredKeyEncryptionLevel;
|
380
|
+
}
|
381
|
+
export class Mnemonic {
|
382
|
+
static isValid(mnemonic: string): boolean;
|
383
|
+
static isValidWord(word: string): boolean;
|
384
|
+
static suggest(prefix: string): string;
|
385
|
+
}
|
386
|
+
export class THORChainSwap {
|
387
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
388
|
+
}
|
389
|
+
export class AES {
|
390
|
+
static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
391
|
+
static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
392
|
+
static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
393
|
+
static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
394
|
+
}
|
395
|
+
export class EthereumAbiFunction {
|
396
|
+
static createWithString(name: string): EthereumAbiFunction;
|
397
|
+
getType(): string;
|
398
|
+
addParamUInt8(val: number, isOutput: boolean): number;
|
399
|
+
addParamUInt16(val: number, isOutput: boolean): number;
|
400
|
+
addParamUInt32(val: number, isOutput: boolean): number;
|
401
|
+
addParamUInt64(val: number, isOutput: boolean): number;
|
402
|
+
addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
403
|
+
addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
404
|
+
addParamInt8(val: number, isOutput: boolean): number;
|
405
|
+
addParamInt16(val: number, isOutput: boolean): number;
|
406
|
+
addParamInt32(val: number, isOutput: boolean): number;
|
407
|
+
addParamInt64(val: number, isOutput: boolean): number;
|
408
|
+
addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
409
|
+
addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
410
|
+
addParamBool(val: boolean, isOutput: boolean): number;
|
411
|
+
addParamString(val: string, isOutput: boolean): number;
|
412
|
+
addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
|
413
|
+
addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
|
414
|
+
addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
415
|
+
addParamArray(isOutput: boolean): number;
|
416
|
+
getParamUInt8(idx: number, isOutput: boolean): number;
|
417
|
+
getParamUInt64(idx: number, isOutput: boolean): number;
|
418
|
+
getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
|
419
|
+
getParamBool(idx: number, isOutput: boolean): boolean;
|
420
|
+
getParamString(idx: number, isOutput: boolean): string;
|
421
|
+
getParamAddress(idx: number, isOutput: boolean): Uint8Array;
|
422
|
+
addInArrayParamUInt8(arrayIdx: number, val: number): number;
|
423
|
+
addInArrayParamUInt16(arrayIdx: number, val: number): number;
|
424
|
+
addInArrayParamUInt32(arrayIdx: number, val: number): number;
|
425
|
+
addInArrayParamUInt64(arrayIdx: number, val: number): number;
|
426
|
+
addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
427
|
+
addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
428
|
+
addInArrayParamInt8(arrayIdx: number, val: number): number;
|
429
|
+
addInArrayParamInt16(arrayIdx: number, val: number): number;
|
430
|
+
addInArrayParamInt32(arrayIdx: number, val: number): number;
|
431
|
+
addInArrayParamInt64(arrayIdx: number, val: number): number;
|
432
|
+
addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
433
|
+
addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
434
|
+
addInArrayParamBool(arrayIdx: number, val: boolean): number;
|
435
|
+
addInArrayParamString(arrayIdx: number, val: string): number;
|
436
|
+
addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
|
437
|
+
addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
|
438
|
+
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
439
|
+
delete(): void;
|
440
|
+
}
|
441
|
+
export class Curve {
|
442
|
+
value: number;
|
443
|
+
static secp256k1: Curve;
|
444
|
+
static ed25519: Curve;
|
445
|
+
static ed25519Blake2bNano: Curve;
|
446
|
+
static curve25519: Curve;
|
447
|
+
static nist256p1: Curve;
|
448
|
+
static ed25519ExtendedCardano: Curve;
|
449
|
+
}
|
450
|
+
|
451
|
+
declare function describeCurve(value: Curve): string;
|
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 FIOAccount {
|
462
|
+
static createWithString(string: string): FIOAccount;
|
463
|
+
description(): string;
|
464
|
+
delete(): void;
|
465
|
+
}
|
466
|
+
export class NEARAccount {
|
467
|
+
static createWithString(string: string): NEARAccount;
|
468
|
+
description(): string;
|
469
|
+
delete(): void;
|
470
|
+
}
|
471
|
+
export class BitcoinAddress {
|
472
|
+
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
473
|
+
static isValid(data: Uint8Array | Buffer): boolean;
|
474
|
+
static isValidString(string: string): boolean;
|
475
|
+
static createWithString(string: string): BitcoinAddress;
|
476
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
477
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
478
|
+
description(): string;
|
479
|
+
prefix(): number;
|
480
|
+
keyhash(): Uint8Array;
|
481
|
+
delete(): void;
|
482
|
+
}
|
483
|
+
export class Base58 {
|
484
|
+
static encode(data: Uint8Array | Buffer): string;
|
485
|
+
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
486
|
+
static decode(string: string): Uint8Array;
|
487
|
+
static decodeNoCheck(string: string): Uint8Array;
|
488
|
+
}
|
489
|
+
export class Derivation {
|
490
|
+
value: number;
|
491
|
+
static default: Derivation;
|
492
|
+
static custom: Derivation;
|
493
|
+
static bitcoinSegwit: Derivation;
|
494
|
+
static bitcoinLegacy: Derivation;
|
495
|
+
static litecoinLegacy: Derivation;
|
496
|
+
static solanaSolana: Derivation;
|
497
|
+
}
|
498
|
+
export class PublicKeyType {
|
499
|
+
value: number;
|
500
|
+
static secp256k1: PublicKeyType;
|
501
|
+
static secp256k1Extended: PublicKeyType;
|
502
|
+
static nist256p1: PublicKeyType;
|
503
|
+
static nist256p1Extended: PublicKeyType;
|
504
|
+
static ed25519: PublicKeyType;
|
505
|
+
static ed25519Blake2b: PublicKeyType;
|
506
|
+
static curve25519: PublicKeyType;
|
507
|
+
static ed25519Cardano: PublicKeyType;
|
508
|
+
}
|
509
|
+
export class BitcoinSigHashType {
|
510
|
+
value: number;
|
511
|
+
static all: BitcoinSigHashType;
|
512
|
+
static none: BitcoinSigHashType;
|
513
|
+
static single: BitcoinSigHashType;
|
514
|
+
static fork: BitcoinSigHashType;
|
515
|
+
static forkBTG: BitcoinSigHashType;
|
516
|
+
}
|
517
|
+
export class EthereumChainID {
|
518
|
+
value: number;
|
519
|
+
static ethereum: EthereumChainID;
|
520
|
+
static classic: EthereumChainID;
|
521
|
+
static poa: EthereumChainID;
|
522
|
+
static vechain: EthereumChainID;
|
523
|
+
static callisto: EthereumChainID;
|
524
|
+
static tomochain: EthereumChainID;
|
525
|
+
static polygon: EthereumChainID;
|
526
|
+
static okc: EthereumChainID;
|
527
|
+
static thundertoken: EthereumChainID;
|
528
|
+
static gochain: EthereumChainID;
|
529
|
+
static meter: EthereumChainID;
|
530
|
+
static celo: EthereumChainID;
|
531
|
+
static wanchain: EthereumChainID;
|
532
|
+
static cronos: EthereumChainID;
|
533
|
+
static optimism: EthereumChainID;
|
534
|
+
static xdai: EthereumChainID;
|
535
|
+
static smartbch: EthereumChainID;
|
536
|
+
static fantom: EthereumChainID;
|
537
|
+
static boba: EthereumChainID;
|
538
|
+
static kcc: EthereumChainID;
|
539
|
+
static heco: EthereumChainID;
|
540
|
+
static metis: EthereumChainID;
|
541
|
+
static moonbeam: EthereumChainID;
|
542
|
+
static moonriver: EthereumChainID;
|
543
|
+
static ronin: EthereumChainID;
|
544
|
+
static kavaevm: EthereumChainID;
|
545
|
+
static klaytn: EthereumChainID;
|
546
|
+
static avalanchec: EthereumChainID;
|
547
|
+
static evmos: EthereumChainID;
|
548
|
+
static arbitrum: EthereumChainID;
|
549
|
+
static smartchain: EthereumChainID;
|
550
|
+
static aurora: EthereumChainID;
|
551
|
+
}
|
552
|
+
export class HRP {
|
553
|
+
value: number;
|
554
|
+
static unknown: HRP;
|
555
|
+
static bitcoin: HRP;
|
556
|
+
static litecoin: HRP;
|
557
|
+
static viacoin: HRP;
|
558
|
+
static groestlcoin: HRP;
|
559
|
+
static digiByte: HRP;
|
560
|
+
static monacoin: HRP;
|
561
|
+
static cosmos: HRP;
|
562
|
+
static bitcoinCash: HRP;
|
563
|
+
static bitcoinGold: HRP;
|
564
|
+
static ioTeX: HRP;
|
565
|
+
static zilliqa: HRP;
|
566
|
+
static terra: HRP;
|
567
|
+
static cryptoOrg: HRP;
|
568
|
+
static kava: HRP;
|
569
|
+
static oasis: HRP;
|
570
|
+
static bluzelle: HRP;
|
571
|
+
static bandChain: HRP;
|
572
|
+
static elrond: HRP;
|
573
|
+
static binance: HRP;
|
574
|
+
static ecash: HRP;
|
575
|
+
static thorchain: HRP;
|
576
|
+
static harmony: HRP;
|
577
|
+
static cardano: HRP;
|
578
|
+
static qtum: HRP;
|
579
|
+
static osmosis: HRP;
|
580
|
+
static terraV2: HRP;
|
581
|
+
static nativeEvmos: HRP;
|
582
|
+
}
|
583
|
+
|
584
|
+
declare function describeHRP(value: HRP): string;
|
585
|
+
|
586
|
+
export class EthereumAbiValue {
|
587
|
+
static encodeBool(value: boolean): Uint8Array;
|
588
|
+
static encodeInt32(value: number): Uint8Array;
|
589
|
+
static encodeUInt32(value: number): Uint8Array;
|
590
|
+
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
591
|
+
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
592
|
+
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
593
|
+
static encodeString(value: string): Uint8Array;
|
594
|
+
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
595
|
+
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
596
|
+
static decodeUInt256(input: Uint8Array | Buffer): string;
|
597
|
+
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
598
|
+
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
599
|
+
}
|
600
|
+
export class AnyAddress {
|
601
|
+
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
602
|
+
static isValid(string: string, coin: CoinType): boolean;
|
603
|
+
static createWithString(string: string, coin: CoinType): AnyAddress;
|
604
|
+
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
605
|
+
description(): string;
|
606
|
+
coin(): CoinType;
|
607
|
+
data(): Uint8Array;
|
608
|
+
delete(): void;
|
609
|
+
}
|
610
|
+
export class StoredKey {
|
611
|
+
static load(path: string): StoredKey;
|
612
|
+
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
613
|
+
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
614
|
+
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
615
|
+
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
616
|
+
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
617
|
+
identifier(): string;
|
618
|
+
name(): string;
|
619
|
+
isMnemonic(): boolean;
|
620
|
+
accountCount(): number;
|
621
|
+
encryptionParameters(): string;
|
622
|
+
account(index: number): Account;
|
623
|
+
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
624
|
+
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
625
|
+
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
626
|
+
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
627
|
+
removeAccountForCoin(coin: CoinType): void;
|
628
|
+
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
629
|
+
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
630
|
+
store(path: string): boolean;
|
631
|
+
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
632
|
+
decryptMnemonic(password: Uint8Array | Buffer): string;
|
633
|
+
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
634
|
+
wallet(password: Uint8Array | Buffer): HDWallet;
|
635
|
+
exportJSON(): Uint8Array;
|
636
|
+
fixAddresses(password: Uint8Array | Buffer): boolean;
|
637
|
+
delete(): void;
|
638
|
+
}
|
639
|
+
export class RippleXAddress {
|
640
|
+
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
641
|
+
static isValidString(string: string): boolean;
|
642
|
+
static createWithString(string: string): RippleXAddress;
|
643
|
+
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
644
|
+
description(): string;
|
645
|
+
tag(): number;
|
646
|
+
delete(): void;
|
647
|
+
}
|
648
|
+
export class PBKDF2 {
|
649
|
+
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
650
|
+
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
651
|
+
}
|
652
|
+
export class PublicKey {
|
653
|
+
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
654
|
+
static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
|
655
|
+
static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
|
656
|
+
isCompressed(): boolean;
|
657
|
+
compressed(): PublicKey;
|
658
|
+
uncompressed(): PublicKey;
|
659
|
+
data(): Uint8Array;
|
660
|
+
keyType(): PublicKeyType;
|
661
|
+
description(): string;
|
662
|
+
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
663
|
+
verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
664
|
+
verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
665
|
+
delete(): void;
|
666
|
+
}
|
667
|
+
export interface WalletCore {
|
668
|
+
AnySigner: typeof AnySigner;
|
669
|
+
HexCoding: typeof HexCoding;
|
670
|
+
SS58AddressType: typeof SS58AddressType;
|
671
|
+
Account: typeof Account;
|
672
|
+
GroestlcoinAddress: typeof GroestlcoinAddress;
|
673
|
+
CoinType: typeof CoinType;
|
674
|
+
Cardano: typeof Cardano;
|
675
|
+
TransactionCompiler: typeof TransactionCompiler;
|
676
|
+
SolanaAddress: typeof SolanaAddress;
|
677
|
+
EthereumAbi: typeof EthereumAbi;
|
678
|
+
StellarVersionByte: typeof StellarVersionByte;
|
679
|
+
Blockchain: typeof Blockchain;
|
680
|
+
StellarMemoType: typeof StellarMemoType;
|
681
|
+
AESPaddingMode: typeof AESPaddingMode;
|
682
|
+
PrivateKey: typeof PrivateKey;
|
683
|
+
PrivateKeyType: typeof PrivateKeyType;
|
684
|
+
DataVector: typeof DataVector;
|
685
|
+
HDVersion: typeof HDVersion;
|
686
|
+
Base64: typeof Base64;
|
687
|
+
Base32: typeof Base32;
|
688
|
+
BitcoinScript: typeof BitcoinScript;
|
689
|
+
Purpose: typeof Purpose;
|
690
|
+
StellarPassphrase: typeof StellarPassphrase;
|
691
|
+
Hash: typeof Hash;
|
692
|
+
HDWallet: typeof HDWallet;
|
693
|
+
SegwitAddress: typeof SegwitAddress;
|
694
|
+
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
695
|
+
Mnemonic: typeof Mnemonic;
|
696
|
+
THORChainSwap: typeof THORChainSwap;
|
697
|
+
AES: typeof AES;
|
698
|
+
EthereumAbiFunction: typeof EthereumAbiFunction;
|
699
|
+
Curve: typeof Curve;
|
700
|
+
CoinTypeConfiguration: typeof CoinTypeConfiguration;
|
701
|
+
FIOAccount: typeof FIOAccount;
|
702
|
+
NEARAccount: typeof NEARAccount;
|
703
|
+
BitcoinAddress: typeof BitcoinAddress;
|
704
|
+
Base58: typeof Base58;
|
705
|
+
Derivation: typeof Derivation;
|
706
|
+
PublicKeyType: typeof PublicKeyType;
|
707
|
+
BitcoinSigHashType: typeof BitcoinSigHashType;
|
708
|
+
EthereumChainID: typeof EthereumChainID;
|
709
|
+
HRP: typeof HRP;
|
710
|
+
EthereumAbiValue: typeof EthereumAbiValue;
|
711
|
+
AnyAddress: typeof AnyAddress;
|
712
|
+
StoredKey: typeof StoredKey;
|
713
|
+
RippleXAddress: typeof RippleXAddress;
|
714
|
+
PBKDF2: typeof PBKDF2;
|
715
|
+
PublicKey: typeof PublicKey;
|
716
|
+
describeStellarPassphrase: typeof describeStellarPassphrase;
|
717
|
+
describeCurve: typeof describeCurve;
|
718
|
+
describeHRP: typeof describeHRP;
|
719
|
+
}
|