@trustwallet/wallet-core 2.9.6 → 2.9.7
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/generated/core_proto.d.ts +312 -3
- package/dist/generated/core_proto.js +1073 -151
- package/dist/lib/wallet-core.d.ts +366 -354
- package/dist/lib/wallet-core.js +5 -5
- package/dist/lib/wallet-core.wasm +0 -0
- package/package.json +1 -1
@@ -6,14 +6,54 @@
|
|
6
6
|
//
|
7
7
|
// This is a GENERATED FILE, changes made here WILL BE LOST.
|
8
8
|
//
|
9
|
+
export namespace HexCoding {
|
10
|
+
export function decode(hex: string): Uint8Array;
|
11
|
+
export function encode(buffer: Uint8Array | Buffer): string;
|
12
|
+
}
|
9
13
|
export class AnySigner {
|
10
14
|
static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
11
15
|
static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
12
16
|
static supportsJSON(coin: CoinType): boolean;
|
13
17
|
}
|
14
|
-
export
|
15
|
-
|
16
|
-
|
18
|
+
export class PublicKey {
|
19
|
+
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
20
|
+
static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
|
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;
|
49
|
+
}
|
50
|
+
|
51
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
52
|
+
|
53
|
+
export class SS58AddressType {
|
54
|
+
value: number;
|
55
|
+
static polkadot: SS58AddressType;
|
56
|
+
static kusama: SS58AddressType;
|
17
57
|
}
|
18
58
|
export class Hash {
|
19
59
|
static sha1(data: Uint8Array | Buffer): Uint8Array;
|
@@ -35,91 +75,6 @@ export class Hash {
|
|
35
75
|
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
36
76
|
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
37
77
|
}
|
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
|
-
export class SS58AddressType {
|
116
|
-
value: number;
|
117
|
-
static polkadot: SS58AddressType;
|
118
|
-
static kusama: SS58AddressType;
|
119
|
-
}
|
120
|
-
export class Cardano {
|
121
|
-
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
122
|
-
}
|
123
78
|
export class EthereumAbiFunction {
|
124
79
|
static createWithString(name: string): EthereumAbiFunction;
|
125
80
|
getType(): string;
|
@@ -166,19 +121,17 @@ export class EthereumAbiFunction {
|
|
166
121
|
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
167
122
|
delete(): void;
|
168
123
|
}
|
169
|
-
export class
|
170
|
-
static
|
124
|
+
export class Base32 {
|
125
|
+
static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
|
126
|
+
static decode(string: string): Uint8Array;
|
127
|
+
static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
|
128
|
+
static encode(data: Uint8Array | Buffer): string;
|
171
129
|
}
|
172
|
-
export class
|
173
|
-
|
174
|
-
static
|
175
|
-
static
|
176
|
-
static
|
177
|
-
static nist256p1Extended: PublicKeyType;
|
178
|
-
static ed25519: PublicKeyType;
|
179
|
-
static ed25519Blake2b: PublicKeyType;
|
180
|
-
static curve25519: PublicKeyType;
|
181
|
-
static ed25519Extended: PublicKeyType;
|
130
|
+
export class AES {
|
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;
|
182
135
|
}
|
183
136
|
export class CoinType {
|
184
137
|
value: number;
|
@@ -234,6 +187,7 @@ export class CoinType {
|
|
234
187
|
static ravencoin: CoinType;
|
235
188
|
static waves: CoinType;
|
236
189
|
static terra: CoinType;
|
190
|
+
static terraV2: CoinType;
|
237
191
|
static harmony: CoinType;
|
238
192
|
static algorand: CoinType;
|
239
193
|
static kusama: CoinType;
|
@@ -268,151 +222,235 @@ export class CoinType {
|
|
268
222
|
static nativeEvmos: CoinType;
|
269
223
|
static moonriver: CoinType;
|
270
224
|
static moonbeam: CoinType;
|
225
|
+
static kavaEvm: CoinType;
|
271
226
|
static klaytn: CoinType;
|
227
|
+
static meter: CoinType;
|
272
228
|
}
|
273
|
-
export class
|
229
|
+
export class StellarMemoType {
|
274
230
|
value: number;
|
275
|
-
static none:
|
276
|
-
static
|
277
|
-
static
|
278
|
-
static
|
279
|
-
static
|
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;
|
231
|
+
static none: StellarMemoType;
|
232
|
+
static text: StellarMemoType;
|
233
|
+
static id: StellarMemoType;
|
234
|
+
static hash: StellarMemoType;
|
235
|
+
static return: StellarMemoType;
|
290
236
|
}
|
291
|
-
export class
|
292
|
-
|
293
|
-
static bip44: Purpose;
|
294
|
-
static bip49: Purpose;
|
295
|
-
static bip84: Purpose;
|
296
|
-
static bip1852: Purpose;
|
237
|
+
export class THORChainSwap {
|
238
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
297
239
|
}
|
298
240
|
export class PBKDF2 {
|
299
241
|
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
300
242
|
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
301
243
|
}
|
302
|
-
export class
|
303
|
-
static
|
304
|
-
static
|
305
|
-
static
|
306
|
-
static
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
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;
|
312
265
|
}
|
313
|
-
export class
|
314
|
-
static equal(lhs:
|
266
|
+
export class RippleXAddress {
|
267
|
+
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
315
268
|
static isValidString(string: string): boolean;
|
316
|
-
static createWithString(string: string):
|
317
|
-
static createWithPublicKey(
|
269
|
+
static createWithString(string: string): RippleXAddress;
|
270
|
+
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
318
271
|
description(): string;
|
319
|
-
|
320
|
-
witnessVersion(): number;
|
321
|
-
witnessProgram(): Uint8Array;
|
272
|
+
tag(): number;
|
322
273
|
delete(): void;
|
323
274
|
}
|
324
|
-
export class
|
275
|
+
export class HRP {
|
325
276
|
value: number;
|
326
|
-
static
|
327
|
-
static
|
328
|
-
static
|
329
|
-
static
|
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;
|
330
305
|
}
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
static
|
336
|
-
static
|
337
|
-
static
|
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;
|
322
|
+
}
|
323
|
+
export class TransactionCompiler {
|
324
|
+
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
325
|
+
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
326
|
+
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
327
|
+
}
|
328
|
+
export class StoredKeyEncryptionLevel {
|
329
|
+
value: number;
|
330
|
+
static default: StoredKeyEncryptionLevel;
|
331
|
+
static minimal: StoredKeyEncryptionLevel;
|
332
|
+
static weak: StoredKeyEncryptionLevel;
|
333
|
+
static standard: StoredKeyEncryptionLevel;
|
338
334
|
}
|
339
335
|
export class NEARAccount {
|
340
336
|
static createWithString(string: string): NEARAccount;
|
341
337
|
description(): string;
|
342
338
|
delete(): void;
|
343
339
|
}
|
344
|
-
export class
|
345
|
-
|
346
|
-
static
|
340
|
+
export class StellarVersionByte {
|
341
|
+
value: number;
|
342
|
+
static accountID: StellarVersionByte;
|
343
|
+
static seed: StellarVersionByte;
|
344
|
+
static preAuthTX: StellarVersionByte;
|
345
|
+
static sha256Hash: StellarVersionByte;
|
346
|
+
}
|
347
|
+
export class Derivation {
|
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;
|
347
390
|
static isValidString(string: string): boolean;
|
348
|
-
static createWithString(string: string):
|
349
|
-
static
|
350
|
-
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
391
|
+
static createWithString(string: string): SegwitAddress;
|
392
|
+
static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
|
351
393
|
description(): string;
|
352
|
-
|
353
|
-
|
394
|
+
hrp(): HRP;
|
395
|
+
witnessVersion(): number;
|
396
|
+
witnessProgram(): Uint8Array;
|
354
397
|
delete(): void;
|
355
398
|
}
|
399
|
+
export class Mnemonic {
|
400
|
+
static isValid(mnemonic: string): boolean;
|
401
|
+
static isValidWord(word: string): boolean;
|
402
|
+
static suggest(prefix: string): string;
|
403
|
+
}
|
356
404
|
export class EthereumAbi {
|
357
405
|
static encode(fn: EthereumAbiFunction): Uint8Array;
|
358
406
|
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
359
407
|
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
360
408
|
static encodeTyped(messageJson: string): Uint8Array;
|
361
409
|
}
|
362
|
-
export class
|
363
|
-
|
364
|
-
static
|
365
|
-
static
|
366
|
-
static
|
367
|
-
static
|
368
|
-
static
|
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;
|
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;
|
391
417
|
}
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
static
|
398
|
-
static
|
399
|
-
|
400
|
-
|
401
|
-
|
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;
|
402
446
|
}
|
403
|
-
export class
|
447
|
+
export class BitcoinSigHashType {
|
404
448
|
value: number;
|
405
|
-
static
|
406
|
-
static
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
export class SolanaAddress {
|
412
|
-
static createWithString(string: string): SolanaAddress;
|
413
|
-
description(): string;
|
414
|
-
defaultTokenAddress(tokenMintAddress: string): string;
|
415
|
-
delete(): void;
|
449
|
+
static all: BitcoinSigHashType;
|
450
|
+
static none: BitcoinSigHashType;
|
451
|
+
static single: BitcoinSigHashType;
|
452
|
+
static fork: BitcoinSigHashType;
|
453
|
+
static forkBTG: BitcoinSigHashType;
|
416
454
|
}
|
417
455
|
export class EthereumChainID {
|
418
456
|
value: number;
|
@@ -425,6 +463,7 @@ export class EthereumChainID {
|
|
425
463
|
static polygon: EthereumChainID;
|
426
464
|
static thundertoken: EthereumChainID;
|
427
465
|
static gochain: EthereumChainID;
|
466
|
+
static meter: EthereumChainID;
|
428
467
|
static celo: EthereumChainID;
|
429
468
|
static wanchain: EthereumChainID;
|
430
469
|
static cronos: EthereumChainID;
|
@@ -439,6 +478,7 @@ export class EthereumChainID {
|
|
439
478
|
static moonbeam: EthereumChainID;
|
440
479
|
static moonriver: EthereumChainID;
|
441
480
|
static ronin: EthereumChainID;
|
481
|
+
static kavaevm: EthereumChainID;
|
442
482
|
static klaytn: EthereumChainID;
|
443
483
|
static avalanchec: EthereumChainID;
|
444
484
|
static evmos: EthereumChainID;
|
@@ -446,6 +486,109 @@ export class EthereumChainID {
|
|
446
486
|
static smartchain: EthereumChainID;
|
447
487
|
static aurora: EthereumChainID;
|
448
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 {
|
512
|
+
value: number;
|
513
|
+
static bitcoin: Blockchain;
|
514
|
+
static ethereum: Blockchain;
|
515
|
+
static vechain: Blockchain;
|
516
|
+
static tron: Blockchain;
|
517
|
+
static icon: Blockchain;
|
518
|
+
static binance: Blockchain;
|
519
|
+
static ripple: Blockchain;
|
520
|
+
static tezos: Blockchain;
|
521
|
+
static nimiq: Blockchain;
|
522
|
+
static stellar: Blockchain;
|
523
|
+
static aion: Blockchain;
|
524
|
+
static cosmos: Blockchain;
|
525
|
+
static theta: Blockchain;
|
526
|
+
static ontology: Blockchain;
|
527
|
+
static zilliqa: Blockchain;
|
528
|
+
static ioTeX: Blockchain;
|
529
|
+
static eos: Blockchain;
|
530
|
+
static nano: Blockchain;
|
531
|
+
static nuls: Blockchain;
|
532
|
+
static waves: Blockchain;
|
533
|
+
static aeternity: Blockchain;
|
534
|
+
static nebulas: Blockchain;
|
535
|
+
static fio: Blockchain;
|
536
|
+
static solana: Blockchain;
|
537
|
+
static harmony: Blockchain;
|
538
|
+
static near: Blockchain;
|
539
|
+
static algorand: Blockchain;
|
540
|
+
static polkadot: Blockchain;
|
541
|
+
static cardano: Blockchain;
|
542
|
+
static neo: Blockchain;
|
543
|
+
static filecoin: Blockchain;
|
544
|
+
static elrondNetwork: Blockchain;
|
545
|
+
static oasisNetwork: Blockchain;
|
546
|
+
static decred: Blockchain;
|
547
|
+
static zcash: Blockchain;
|
548
|
+
static groestlcoin: Blockchain;
|
549
|
+
static thorchain: Blockchain;
|
550
|
+
static ronin: Blockchain;
|
551
|
+
static kusama: Blockchain;
|
552
|
+
}
|
553
|
+
export class Cardano {
|
554
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
555
|
+
}
|
556
|
+
export class PrivateKey {
|
557
|
+
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
558
|
+
static create(): PrivateKey;
|
559
|
+
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
560
|
+
static createCopy(key: PrivateKey): PrivateKey;
|
561
|
+
data(): Uint8Array;
|
562
|
+
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
563
|
+
getPublicKeyNist256p1(): PublicKey;
|
564
|
+
getPublicKeyEd25519(): PublicKey;
|
565
|
+
getPublicKeyEd25519Blake2b(): PublicKey;
|
566
|
+
getPublicKeyEd25519Extended(): PublicKey;
|
567
|
+
getPublicKeyCurve25519(): PublicKey;
|
568
|
+
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
569
|
+
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
570
|
+
signAsDER(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
571
|
+
signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
572
|
+
delete(): void;
|
573
|
+
}
|
574
|
+
export class HDVersion {
|
575
|
+
value: number;
|
576
|
+
static none: HDVersion;
|
577
|
+
static xpub: HDVersion;
|
578
|
+
static xprv: HDVersion;
|
579
|
+
static ypub: HDVersion;
|
580
|
+
static yprv: HDVersion;
|
581
|
+
static zpub: HDVersion;
|
582
|
+
static zprv: HDVersion;
|
583
|
+
static ltub: HDVersion;
|
584
|
+
static ltpv: HDVersion;
|
585
|
+
static mtub: HDVersion;
|
586
|
+
static mtpv: HDVersion;
|
587
|
+
static dpub: HDVersion;
|
588
|
+
static dprv: HDVersion;
|
589
|
+
static dgub: HDVersion;
|
590
|
+
static dgpv: HDVersion;
|
591
|
+
}
|
449
592
|
export class BitcoinScript {
|
450
593
|
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
451
594
|
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
@@ -473,159 +616,28 @@ export class BitcoinScript {
|
|
473
616
|
encode(): Uint8Array;
|
474
617
|
delete(): void;
|
475
618
|
}
|
476
|
-
export class
|
477
|
-
|
478
|
-
static
|
479
|
-
static
|
480
|
-
static
|
481
|
-
|
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;
|
493
|
-
}
|
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;
|
514
|
-
delete(): void;
|
515
|
-
}
|
516
|
-
export class StoredKey {
|
517
|
-
static load(path: string): StoredKey;
|
518
|
-
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
519
|
-
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
520
|
-
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
521
|
-
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
522
|
-
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
523
|
-
identifier(): string;
|
524
|
-
name(): string;
|
525
|
-
isMnemonic(): boolean;
|
526
|
-
accountCount(): number;
|
527
|
-
encryptionParameters(): string;
|
528
|
-
account(index: number): Account;
|
529
|
-
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
530
|
-
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
531
|
-
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
532
|
-
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
533
|
-
removeAccountForCoin(coin: CoinType): void;
|
534
|
-
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
535
|
-
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
536
|
-
store(path: string): boolean;
|
537
|
-
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
538
|
-
decryptMnemonic(password: Uint8Array | Buffer): string;
|
539
|
-
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
540
|
-
wallet(password: Uint8Array | Buffer): HDWallet;
|
541
|
-
exportJSON(): Uint8Array;
|
542
|
-
fixAddresses(password: Uint8Array | Buffer): boolean;
|
543
|
-
delete(): void;
|
619
|
+
export class Purpose {
|
620
|
+
value: number;
|
621
|
+
static bip44: Purpose;
|
622
|
+
static bip49: Purpose;
|
623
|
+
static bip84: Purpose;
|
624
|
+
static bip1852: Purpose;
|
544
625
|
}
|
545
|
-
export class
|
546
|
-
static equal(lhs:
|
547
|
-
static
|
548
|
-
static createWithString(string: string):
|
549
|
-
static createWithPublicKey(publicKey: PublicKey,
|
626
|
+
export class AnyAddress {
|
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;
|
550
631
|
description(): string;
|
551
|
-
|
632
|
+
coin(): CoinType;
|
633
|
+
data(): Uint8Array;
|
552
634
|
delete(): void;
|
553
635
|
}
|
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
636
|
export class AESPaddingMode {
|
575
637
|
value: number;
|
576
638
|
static zero: AESPaddingMode;
|
577
639
|
static pkcs7: AESPaddingMode;
|
578
640
|
}
|
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;
|
605
|
-
}
|
606
|
-
export class PublicKey {
|
607
|
-
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
608
|
-
static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
|
609
|
-
static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
|
610
|
-
isCompressed(): boolean;
|
611
|
-
compressed(): PublicKey;
|
612
|
-
uncompressed(): PublicKey;
|
613
|
-
data(): Uint8Array;
|
614
|
-
keyType(): PublicKeyType;
|
615
|
-
description(): string;
|
616
|
-
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
617
|
-
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;
|
627
|
-
delete(): void;
|
628
|
-
}
|
629
641
|
export class Curve {
|
630
642
|
value: number;
|
631
643
|
static secp256k1: Curve;
|