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