@trustwallet/wallet-core 3.0.4 → 3.0.5

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.
@@ -6,95 +6,103 @@
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 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;
22
- }
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;
14
+ export namespace HexCoding {
15
+ export function decode(hex: string): Uint8Array;
16
+ export function encode(buffer: Uint8Array | Buffer): string;
31
17
  }
32
- export class Purpose {
18
+ export class PublicKeyType {
33
19
  value: number;
34
- static bip44: Purpose;
35
- static bip49: Purpose;
36
- static bip84: Purpose;
37
- static bip1852: Purpose;
20
+ static secp256k1: PublicKeyType;
21
+ static secp256k1Extended: PublicKeyType;
22
+ static nist256p1: PublicKeyType;
23
+ static nist256p1Extended: PublicKeyType;
24
+ static ed25519: PublicKeyType;
25
+ static ed25519Blake2b: PublicKeyType;
26
+ static curve25519: PublicKeyType;
27
+ static ed25519Cardano: PublicKeyType;
38
28
  }
39
- export class Cardano {
40
- static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
41
- static getStakingAddress(baseAddress: string): string;
29
+ export class EthereumChainID {
30
+ value: number;
31
+ static ethereum: EthereumChainID;
32
+ static classic: EthereumChainID;
33
+ static poa: EthereumChainID;
34
+ static vechain: EthereumChainID;
35
+ static callisto: EthereumChainID;
36
+ static tomochain: EthereumChainID;
37
+ static polygon: EthereumChainID;
38
+ static okc: EthereumChainID;
39
+ static thundertoken: EthereumChainID;
40
+ static gochain: EthereumChainID;
41
+ static meter: EthereumChainID;
42
+ static celo: EthereumChainID;
43
+ static wanchain: EthereumChainID;
44
+ static cronos: EthereumChainID;
45
+ static optimism: EthereumChainID;
46
+ static xdai: EthereumChainID;
47
+ static smartbch: EthereumChainID;
48
+ static fantom: EthereumChainID;
49
+ static zksync: EthereumChainID;
50
+ static boba: EthereumChainID;
51
+ static kcc: EthereumChainID;
52
+ static heco: EthereumChainID;
53
+ static metis: EthereumChainID;
54
+ static moonbeam: EthereumChainID;
55
+ static moonriver: EthereumChainID;
56
+ static ronin: EthereumChainID;
57
+ static kavaevm: EthereumChainID;
58
+ static klaytn: EthereumChainID;
59
+ static avalanchec: EthereumChainID;
60
+ static evmos: EthereumChainID;
61
+ static arbitrum: EthereumChainID;
62
+ static smartchain: EthereumChainID;
63
+ static aurora: EthereumChainID;
42
64
  }
43
- export class GroestlcoinAddress {
44
- static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
45
- static isValidString(string: string): boolean;
46
- static createWithString(string: string): GroestlcoinAddress;
47
- static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
48
- description(): string;
65
+ export class StoredKey {
66
+ static load(path: string): StoredKey;
67
+ static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
68
+ static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
69
+ static importJSON(json: Uint8Array | Buffer): StoredKey;
70
+ static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
71
+ static create(name: string, password: Uint8Array | Buffer): StoredKey;
72
+ identifier(): string;
73
+ name(): string;
74
+ isMnemonic(): boolean;
75
+ accountCount(): number;
76
+ encryptionParameters(): string;
77
+ account(index: number): Account;
78
+ accountForCoin(coin: CoinType, wallet: HDWallet): Account;
79
+ accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
80
+ addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
81
+ addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
82
+ removeAccountForCoin(coin: CoinType): void;
83
+ removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
84
+ removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
85
+ store(path: string): boolean;
86
+ decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
87
+ decryptMnemonic(password: Uint8Array | Buffer): string;
88
+ privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
89
+ wallet(password: Uint8Array | Buffer): HDWallet;
90
+ exportJSON(): Uint8Array;
91
+ fixAddresses(password: Uint8Array | Buffer): boolean;
49
92
  delete(): void;
50
93
  }
51
- export class Hash {
52
- static sha1(data: Uint8Array | Buffer): Uint8Array;
53
- static sha256(data: Uint8Array | Buffer): Uint8Array;
54
- static sha512(data: Uint8Array | Buffer): Uint8Array;
55
- static sha512_256(data: Uint8Array | Buffer): Uint8Array;
56
- static keccak256(data: Uint8Array | Buffer): Uint8Array;
57
- static keccak512(data: Uint8Array | Buffer): Uint8Array;
58
- static sha3_256(data: Uint8Array | Buffer): Uint8Array;
59
- static sha3_512(data: Uint8Array | Buffer): Uint8Array;
60
- static ripemd(data: Uint8Array | Buffer): Uint8Array;
61
- static blake256(data: Uint8Array | Buffer): Uint8Array;
62
- static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
63
- static groestl512(data: Uint8Array | Buffer): Uint8Array;
64
- static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
65
- static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
66
- static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
67
- static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
68
- static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
69
- static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
70
- }
71
- export class Base58 {
72
- static encode(data: Uint8Array | Buffer): string;
73
- static encodeNoCheck(data: Uint8Array | Buffer): string;
74
- static decode(string: string): Uint8Array;
75
- static decodeNoCheck(string: string): Uint8Array;
76
- }
77
- export class PBKDF2 {
78
- static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
79
- static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
80
- }
81
- export class BitcoinSigHashType {
82
- value: number;
83
- static all: BitcoinSigHashType;
84
- static none: BitcoinSigHashType;
85
- static single: BitcoinSigHashType;
86
- static fork: BitcoinSigHashType;
87
- static forkBTG: BitcoinSigHashType;
88
- }
89
- export class Derivation {
94
+ export class Curve {
90
95
  value: number;
91
- static default: Derivation;
92
- static custom: Derivation;
93
- static bitcoinSegwit: Derivation;
94
- static bitcoinLegacy: Derivation;
95
- static litecoinLegacy: Derivation;
96
- static solanaSolana: Derivation;
96
+ static secp256k1: Curve;
97
+ static ed25519: Curve;
98
+ static ed25519Blake2bNano: Curve;
99
+ static curve25519: Curve;
100
+ static nist256p1: Curve;
101
+ static ed25519ExtendedCardano: Curve;
97
102
  }
103
+
104
+ declare function describeCurve(value: Curve): string;
105
+
98
106
  export class NervosAddress {
99
107
  static equal(lhs: NervosAddress, rhs: NervosAddress): boolean;
100
108
  static isValidString(string: string): boolean;
@@ -105,41 +113,130 @@ export class NervosAddress {
105
113
  args(): Uint8Array;
106
114
  delete(): void;
107
115
  }
108
- export class AES {
109
- static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
110
- static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
111
- static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
112
- static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
116
+ export class StellarVersionByte {
117
+ value: number;
118
+ static accountID: StellarVersionByte;
119
+ static seed: StellarVersionByte;
120
+ static preAuthTX: StellarVersionByte;
121
+ static sha256Hash: StellarVersionByte;
113
122
  }
114
- export class THORChainSwap {
115
- static buildSwap(input: Uint8Array | Buffer): Uint8Array;
123
+ export class PBKDF2 {
124
+ static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
125
+ static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
116
126
  }
117
- export class Base32 {
118
- static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
119
- static decode(string: string): Uint8Array;
120
- static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
121
- static encode(data: Uint8Array | Buffer): string;
127
+ export class SolanaAddress {
128
+ static createWithString(string: string): SolanaAddress;
129
+ description(): string;
130
+ defaultTokenAddress(tokenMintAddress: string): string;
131
+ delete(): void;
122
132
  }
123
- export class DataVector {
124
- static create(): DataVector;
125
- static createWithData(data: Uint8Array | Buffer): DataVector;
126
- size(): number;
127
- add(data: Uint8Array | Buffer): void;
128
- get(index: number): Uint8Array;
133
+ export class PublicKey {
134
+ static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
135
+ static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
136
+ static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
137
+ isCompressed(): boolean;
138
+ compressed(): PublicKey;
139
+ uncompressed(): PublicKey;
140
+ data(): Uint8Array;
141
+ keyType(): PublicKeyType;
142
+ description(): string;
143
+ verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
144
+ verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
145
+ verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
129
146
  delete(): void;
130
147
  }
131
- export class FIOAccount {
132
- static createWithString(string: string): FIOAccount;
148
+ export class TransactionCompiler {
149
+ static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
150
+ static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
151
+ static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
152
+ }
153
+ export class EthereumAbiValue {
154
+ static encodeBool(value: boolean): Uint8Array;
155
+ static encodeInt32(value: number): Uint8Array;
156
+ static encodeUInt32(value: number): Uint8Array;
157
+ static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
158
+ static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
159
+ static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
160
+ static encodeString(value: string): Uint8Array;
161
+ static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
162
+ static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
163
+ static decodeUInt256(input: Uint8Array | Buffer): string;
164
+ static decodeValue(input: Uint8Array | Buffer, type: string): string;
165
+ static decodeArray(input: Uint8Array | Buffer, type: string): string;
166
+ }
167
+ export class PrivateKey {
168
+ static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
169
+ static create(): PrivateKey;
170
+ static createWithData(data: Uint8Array | Buffer): PrivateKey;
171
+ static createCopy(key: PrivateKey): PrivateKey;
172
+ data(): Uint8Array;
173
+ getPublicKeySecp256k1(compressed: boolean): PublicKey;
174
+ getPublicKeyNist256p1(): PublicKey;
175
+ getPublicKeyEd25519(): PublicKey;
176
+ getPublicKeyEd25519Blake2b(): PublicKey;
177
+ getPublicKeyEd25519Cardano(): PublicKey;
178
+ getPublicKeyCurve25519(): PublicKey;
179
+ getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
180
+ sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
181
+ signAsDER(digest: Uint8Array | Buffer): Uint8Array;
182
+ signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
183
+ delete(): void;
184
+ }
185
+ export class SegwitAddress {
186
+ static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
187
+ static isValidString(string: string): boolean;
188
+ static createWithString(string: string): SegwitAddress;
189
+ static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
133
190
  description(): string;
191
+ hrp(): HRP;
192
+ witnessVersion(): number;
193
+ witnessProgram(): Uint8Array;
134
194
  delete(): void;
135
195
  }
136
- export class StellarMemoType {
196
+ export class AESPaddingMode {
137
197
  value: number;
138
- static none: StellarMemoType;
139
- static text: StellarMemoType;
140
- static id: StellarMemoType;
141
- static hash: StellarMemoType;
142
- static return: StellarMemoType;
198
+ static zero: AESPaddingMode;
199
+ static pkcs7: AESPaddingMode;
200
+ }
201
+ export class Base64 {
202
+ static decode(string: string): Uint8Array;
203
+ static decodeUrl(string: string): Uint8Array;
204
+ static encode(data: Uint8Array | Buffer): string;
205
+ static encodeUrl(data: Uint8Array | Buffer): string;
206
+ }
207
+ export class StoredKeyEncryptionLevel {
208
+ value: number;
209
+ static default: StoredKeyEncryptionLevel;
210
+ static minimal: StoredKeyEncryptionLevel;
211
+ static weak: StoredKeyEncryptionLevel;
212
+ static standard: StoredKeyEncryptionLevel;
213
+ }
214
+ export class BitcoinScript {
215
+ static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
216
+ static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
217
+ static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
218
+ static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
219
+ static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
220
+ static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
221
+ static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
222
+ static hashTypeForCoin(coinType: CoinType): number;
223
+ static create(): BitcoinScript;
224
+ static createWithData(data: Uint8Array | Buffer): BitcoinScript;
225
+ static createCopy(script: BitcoinScript): BitcoinScript;
226
+ size(): number;
227
+ data(): Uint8Array;
228
+ scriptHash(): Uint8Array;
229
+ isPayToScriptHash(): boolean;
230
+ isPayToWitnessScriptHash(): boolean;
231
+ isPayToWitnessPublicKeyHash(): boolean;
232
+ isWitnessProgram(): boolean;
233
+ matchPayToPubkey(): Uint8Array;
234
+ matchPayToPubkeyHash(): Uint8Array;
235
+ matchPayToScriptHash(): Uint8Array;
236
+ matchPayToWitnessPublicKeyHash(): Uint8Array;
237
+ matchPayToWitnessScriptHash(): Uint8Array;
238
+ encode(): Uint8Array;
239
+ delete(): void;
143
240
  }
144
241
  export class CoinType {
145
242
  value: number;
@@ -210,6 +307,7 @@ export class CoinType {
210
307
  static thorchain: CoinType;
211
308
  static bluzelle: CoinType;
212
309
  static optimism: CoinType;
310
+ static zksync: CoinType;
213
311
  static arbitrum: CoinType;
214
312
  static ecochain: CoinType;
215
313
  static avalancheCChain: CoinType;
@@ -236,129 +334,330 @@ export class CoinType {
236
334
  static okxchain: CoinType;
237
335
  static nervos: CoinType;
238
336
  static everscale: CoinType;
337
+ static aptos: CoinType;
239
338
  }
240
- export class PublicKeyType {
339
+ export class Blockchain {
241
340
  value: number;
242
- static secp256k1: PublicKeyType;
243
- static secp256k1Extended: PublicKeyType;
244
- static nist256p1: PublicKeyType;
245
- static nist256p1Extended: PublicKeyType;
246
- static ed25519: PublicKeyType;
247
- static ed25519Blake2b: PublicKeyType;
248
- static curve25519: PublicKeyType;
249
- static ed25519Cardano: PublicKeyType;
250
- }
251
- export class StoredKey {
252
- static load(path: string): StoredKey;
253
- static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
254
- static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
255
- static importJSON(json: Uint8Array | Buffer): StoredKey;
256
- static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
257
- static create(name: string, password: Uint8Array | Buffer): StoredKey;
258
- identifier(): string;
259
- name(): string;
260
- isMnemonic(): boolean;
261
- accountCount(): number;
262
- encryptionParameters(): string;
263
- account(index: number): Account;
264
- accountForCoin(coin: CoinType, wallet: HDWallet): Account;
265
- accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
266
- addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
267
- addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
268
- removeAccountForCoin(coin: CoinType): void;
269
- removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
270
- removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
271
- store(path: string): boolean;
272
- decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
273
- decryptMnemonic(password: Uint8Array | Buffer): string;
274
- privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
275
- wallet(password: Uint8Array | Buffer): HDWallet;
276
- exportJSON(): Uint8Array;
277
- fixAddresses(password: Uint8Array | Buffer): boolean;
278
- delete(): void;
279
- }
280
- export class Account {
281
- static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
282
- address(): string;
283
- derivation(): Derivation;
284
- derivationPath(): string;
285
- publicKey(): string;
286
- extendedPublicKey(): string;
287
- coin(): CoinType;
288
- delete(): void;
341
+ static bitcoin: Blockchain;
342
+ static ethereum: Blockchain;
343
+ static vechain: Blockchain;
344
+ static tron: Blockchain;
345
+ static icon: Blockchain;
346
+ static binance: Blockchain;
347
+ static ripple: Blockchain;
348
+ static tezos: Blockchain;
349
+ static nimiq: Blockchain;
350
+ static stellar: Blockchain;
351
+ static aion: Blockchain;
352
+ static cosmos: Blockchain;
353
+ static theta: Blockchain;
354
+ static ontology: Blockchain;
355
+ static zilliqa: Blockchain;
356
+ static ioTeX: Blockchain;
357
+ static eos: Blockchain;
358
+ static nano: Blockchain;
359
+ static nuls: Blockchain;
360
+ static waves: Blockchain;
361
+ static aeternity: Blockchain;
362
+ static nebulas: Blockchain;
363
+ static fio: Blockchain;
364
+ static solana: Blockchain;
365
+ static harmony: Blockchain;
366
+ static near: Blockchain;
367
+ static algorand: Blockchain;
368
+ static polkadot: Blockchain;
369
+ static cardano: Blockchain;
370
+ static neo: Blockchain;
371
+ static filecoin: Blockchain;
372
+ static elrondNetwork: Blockchain;
373
+ static oasisNetwork: Blockchain;
374
+ static decred: Blockchain;
375
+ static zcash: Blockchain;
376
+ static groestlcoin: Blockchain;
377
+ static thorchain: Blockchain;
378
+ static ronin: Blockchain;
379
+ static kusama: Blockchain;
380
+ static nervos: Blockchain;
381
+ static everscale: Blockchain;
382
+ static aptos: Blockchain;
289
383
  }
290
- export class SolanaAddress {
291
- static createWithString(string: string): SolanaAddress;
384
+ export class RippleXAddress {
385
+ static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
386
+ static isValidString(string: string): boolean;
387
+ static createWithString(string: string): RippleXAddress;
388
+ static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
292
389
  description(): string;
293
- defaultTokenAddress(tokenMintAddress: string): string;
390
+ tag(): number;
294
391
  delete(): void;
295
392
  }
296
- export class EthereumAbiValue {
297
- static encodeBool(value: boolean): Uint8Array;
298
- static encodeInt32(value: number): Uint8Array;
299
- static encodeUInt32(value: number): Uint8Array;
300
- static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
301
- static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
302
- static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
303
- static encodeString(value: string): Uint8Array;
304
- static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
305
- static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
306
- static decodeUInt256(input: Uint8Array | Buffer): string;
307
- static decodeValue(input: Uint8Array | Buffer, type: string): string;
308
- static decodeArray(input: Uint8Array | Buffer, type: string): string;
309
- }
310
- export class StellarPassphrase {
393
+ export class HRP {
311
394
  value: number;
312
- static stellar: StellarPassphrase;
313
- static kin: StellarPassphrase;
395
+ static unknown: HRP;
396
+ static bitcoin: HRP;
397
+ static litecoin: HRP;
398
+ static viacoin: HRP;
399
+ static groestlcoin: HRP;
400
+ static digiByte: HRP;
401
+ static monacoin: HRP;
402
+ static cosmos: HRP;
403
+ static bitcoinCash: HRP;
404
+ static bitcoinGold: HRP;
405
+ static ioTeX: HRP;
406
+ static nervos: HRP;
407
+ static zilliqa: HRP;
408
+ static terra: HRP;
409
+ static cryptoOrg: HRP;
410
+ static kava: HRP;
411
+ static oasis: HRP;
412
+ static bluzelle: HRP;
413
+ static bandChain: HRP;
414
+ static elrond: HRP;
415
+ static binance: HRP;
416
+ static ecash: HRP;
417
+ static thorchain: HRP;
418
+ static harmony: HRP;
419
+ static cardano: HRP;
420
+ static qtum: HRP;
421
+ static osmosis: HRP;
422
+ static terraV2: HRP;
423
+ static nativeEvmos: HRP;
314
424
  }
315
425
 
316
- declare function describeStellarPassphrase(value: StellarPassphrase): string;
426
+ declare function describeHRP(value: HRP): string;
317
427
 
318
- export class PublicKey {
319
- static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
320
- static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
321
- static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
322
- isCompressed(): boolean;
323
- compressed(): PublicKey;
324
- uncompressed(): PublicKey;
325
- data(): Uint8Array;
326
- keyType(): PublicKeyType;
327
- description(): string;
328
- verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
329
- verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
330
- verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
331
- delete(): void;
428
+ export class BitcoinSigHashType {
429
+ value: number;
430
+ static all: BitcoinSigHashType;
431
+ static none: BitcoinSigHashType;
432
+ static single: BitcoinSigHashType;
433
+ static fork: BitcoinSigHashType;
434
+ static forkBTG: BitcoinSigHashType;
332
435
  }
333
- export class SegwitAddress {
334
- static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
335
- static isValidString(string: string): boolean;
336
- static createWithString(string: string): SegwitAddress;
337
- static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
338
- description(): string;
339
- hrp(): HRP;
340
- witnessVersion(): number;
341
- witnessProgram(): Uint8Array;
342
- delete(): void;
436
+ export class Base32 {
437
+ static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
438
+ static decode(string: string): Uint8Array;
439
+ static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
440
+ static encode(data: Uint8Array | Buffer): string;
343
441
  }
344
- export class Curve {
442
+ export class HDVersion {
345
443
  value: number;
346
- static secp256k1: Curve;
347
- static ed25519: Curve;
348
- static ed25519Blake2bNano: Curve;
349
- static curve25519: Curve;
350
- static nist256p1: Curve;
351
- static ed25519ExtendedCardano: Curve;
444
+ static none: HDVersion;
445
+ static xpub: HDVersion;
446
+ static xprv: HDVersion;
447
+ static ypub: HDVersion;
448
+ static yprv: HDVersion;
449
+ static zpub: HDVersion;
450
+ static zprv: HDVersion;
451
+ static ltub: HDVersion;
452
+ static ltpv: HDVersion;
453
+ static mtub: HDVersion;
454
+ static mtpv: HDVersion;
455
+ static dpub: HDVersion;
456
+ static dprv: HDVersion;
457
+ static dgub: HDVersion;
458
+ static dgpv: HDVersion;
352
459
  }
353
-
354
- declare function describeCurve(value: Curve): string;
355
-
356
- export class EthereumAbi {
357
- static encode(fn: EthereumAbiFunction): Uint8Array;
460
+ export class DataVector {
461
+ static create(): DataVector;
462
+ static createWithData(data: Uint8Array | Buffer): DataVector;
463
+ size(): number;
464
+ add(data: Uint8Array | Buffer): void;
465
+ get(index: number): Uint8Array;
466
+ delete(): void;
467
+ }
468
+ export class AES {
469
+ static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
470
+ static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
471
+ static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
472
+ static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
473
+ }
474
+ export class Base58 {
475
+ static encode(data: Uint8Array | Buffer): string;
476
+ static encodeNoCheck(data: Uint8Array | Buffer): string;
477
+ static decode(string: string): Uint8Array;
478
+ static decodeNoCheck(string: string): Uint8Array;
479
+ }
480
+ export class NEARAccount {
481
+ static createWithString(string: string): NEARAccount;
482
+ description(): string;
483
+ delete(): void;
484
+ }
485
+ export class Hash {
486
+ static sha1(data: Uint8Array | Buffer): Uint8Array;
487
+ static sha256(data: Uint8Array | Buffer): Uint8Array;
488
+ static sha512(data: Uint8Array | Buffer): Uint8Array;
489
+ static sha512_256(data: Uint8Array | Buffer): Uint8Array;
490
+ static keccak256(data: Uint8Array | Buffer): Uint8Array;
491
+ static keccak512(data: Uint8Array | Buffer): Uint8Array;
492
+ static sha3_256(data: Uint8Array | Buffer): Uint8Array;
493
+ static sha3_512(data: Uint8Array | Buffer): Uint8Array;
494
+ static ripemd(data: Uint8Array | Buffer): Uint8Array;
495
+ static blake256(data: Uint8Array | Buffer): Uint8Array;
496
+ static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
497
+ static groestl512(data: Uint8Array | Buffer): Uint8Array;
498
+ static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
499
+ static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
500
+ static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
501
+ static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
502
+ static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
503
+ static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
504
+ }
505
+ export class Mnemonic {
506
+ static isValid(mnemonic: string): boolean;
507
+ static isValidWord(word: string): boolean;
508
+ static suggest(prefix: string): string;
509
+ }
510
+ export class CoinTypeConfiguration {
511
+ static getSymbol(type: CoinType): string;
512
+ static getDecimals(type: CoinType): number;
513
+ static getTransactionURL(type: CoinType, transactionID: string): string;
514
+ static getAccountURL(type: CoinType, accountID: string): string;
515
+ static getID(type: CoinType): string;
516
+ static getName(type: CoinType): string;
517
+ }
518
+ export class Derivation {
519
+ value: number;
520
+ static default: Derivation;
521
+ static custom: Derivation;
522
+ static bitcoinSegwit: Derivation;
523
+ static bitcoinLegacy: Derivation;
524
+ static litecoinLegacy: Derivation;
525
+ static solanaSolana: Derivation;
526
+ }
527
+ export class THORChainSwap {
528
+ static buildSwap(input: Uint8Array | Buffer): Uint8Array;
529
+ }
530
+ export class Cardano {
531
+ static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
532
+ static getStakingAddress(baseAddress: string): string;
533
+ }
534
+ export class EthereumAbi {
535
+ static encode(fn: EthereumAbiFunction): Uint8Array;
358
536
  static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
359
537
  static decodeCall(data: Uint8Array | Buffer, abi: string): string;
360
538
  static encodeTyped(messageJson: string): Uint8Array;
361
539
  }
540
+ export class BitcoinAddress {
541
+ static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
542
+ static isValid(data: Uint8Array | Buffer): boolean;
543
+ static isValidString(string: string): boolean;
544
+ static createWithString(string: string): BitcoinAddress;
545
+ static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
546
+ static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
547
+ description(): string;
548
+ prefix(): number;
549
+ keyhash(): Uint8Array;
550
+ delete(): void;
551
+ }
552
+ export class DerivationPath {
553
+ static create(purpose: Purpose, coin: number, account: number, change: number, address: number): DerivationPath;
554
+ static createWithString(string: string): DerivationPath;
555
+ purpose(): Purpose;
556
+ coin(): number;
557
+ account(): number;
558
+ change(): number;
559
+ address(): number;
560
+ description(): string;
561
+ indexAt(index: number): DerivationPathIndex;
562
+ indicesCount(): number;
563
+ delete(): void;
564
+ }
565
+ export class PrivateKeyType {
566
+ value: number;
567
+ static default: PrivateKeyType;
568
+ static cardano: PrivateKeyType;
569
+ }
570
+ export class StellarPassphrase {
571
+ value: number;
572
+ static stellar: StellarPassphrase;
573
+ static kin: StellarPassphrase;
574
+ }
575
+
576
+ declare function describeStellarPassphrase(value: StellarPassphrase): string;
577
+
578
+ export class Account {
579
+ static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
580
+ address(): string;
581
+ derivation(): Derivation;
582
+ derivationPath(): string;
583
+ publicKey(): string;
584
+ extendedPublicKey(): string;
585
+ coin(): CoinType;
586
+ delete(): void;
587
+ }
588
+ export class StellarMemoType {
589
+ value: number;
590
+ static none: StellarMemoType;
591
+ static text: StellarMemoType;
592
+ static id: StellarMemoType;
593
+ static hash: StellarMemoType;
594
+ static return: StellarMemoType;
595
+ }
596
+ export class Purpose {
597
+ value: number;
598
+ static bip44: Purpose;
599
+ static bip49: Purpose;
600
+ static bip84: Purpose;
601
+ static bip1852: Purpose;
602
+ }
603
+ export class SS58AddressType {
604
+ value: number;
605
+ static polkadot: SS58AddressType;
606
+ static kusama: SS58AddressType;
607
+ }
608
+ export class AnyAddress {
609
+ static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
610
+ static isValid(string: string, coin: CoinType): boolean;
611
+ static createWithString(string: string, coin: CoinType): AnyAddress;
612
+ static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
613
+ description(): string;
614
+ coin(): CoinType;
615
+ data(): Uint8Array;
616
+ delete(): void;
617
+ }
618
+ export class GroestlcoinAddress {
619
+ static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
620
+ static isValidString(string: string): boolean;
621
+ static createWithString(string: string): GroestlcoinAddress;
622
+ static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
623
+ description(): string;
624
+ delete(): void;
625
+ }
626
+ export class DerivationPathIndex {
627
+ static create(value: number, hardened: boolean): DerivationPathIndex;
628
+ value(): number;
629
+ hardened(): boolean;
630
+ description(): string;
631
+ delete(): void;
632
+ }
633
+ export class HDWallet {
634
+ static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
635
+ static create(strength: number, passphrase: string): HDWallet;
636
+ static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
637
+ static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
638
+ static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
639
+ seed(): Uint8Array;
640
+ mnemonic(): string;
641
+ entropy(): Uint8Array;
642
+ getMasterKey(curve: Curve): PrivateKey;
643
+ getKeyForCoin(coin: CoinType): PrivateKey;
644
+ getAddressForCoin(coin: CoinType): string;
645
+ getKey(coin: CoinType, derivationPath: string): PrivateKey;
646
+ getKeyByCurve(curve: Curve, derivationPath: string): PrivateKey;
647
+ getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
648
+ getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
649
+ getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
650
+ getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
651
+ getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
652
+ getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
653
+ getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
654
+ delete(): void;
655
+ }
656
+ export class FIOAccount {
657
+ static createWithString(string: string): FIOAccount;
658
+ description(): string;
659
+ delete(): void;
660
+ }
362
661
  export class EthereumAbiFunction {
363
662
  static createWithString(name: string): EthereumAbiFunction;
364
663
  getType(): string;
@@ -405,354 +704,59 @@ export class EthereumAbiFunction {
405
704
  addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
406
705
  delete(): void;
407
706
  }
408
- export class Base64 {
409
- static decode(string: string): Uint8Array;
410
- static decodeUrl(string: string): Uint8Array;
411
- static encode(data: Uint8Array | Buffer): string;
412
- static encodeUrl(data: Uint8Array | Buffer): string;
413
- }
414
- export class EthereumChainID {
415
- value: number;
416
- static ethereum: EthereumChainID;
417
- static classic: EthereumChainID;
418
- static poa: EthereumChainID;
419
- static vechain: EthereumChainID;
420
- static callisto: EthereumChainID;
421
- static tomochain: EthereumChainID;
422
- static polygon: EthereumChainID;
423
- static okc: EthereumChainID;
424
- static thundertoken: EthereumChainID;
425
- static gochain: EthereumChainID;
426
- static meter: EthereumChainID;
427
- static celo: EthereumChainID;
428
- static wanchain: EthereumChainID;
429
- static cronos: EthereumChainID;
430
- static optimism: EthereumChainID;
431
- static xdai: EthereumChainID;
432
- static smartbch: EthereumChainID;
433
- static fantom: EthereumChainID;
434
- static boba: EthereumChainID;
435
- static kcc: EthereumChainID;
436
- static heco: EthereumChainID;
437
- static metis: EthereumChainID;
438
- static moonbeam: EthereumChainID;
439
- static moonriver: EthereumChainID;
440
- static ronin: EthereumChainID;
441
- static kavaevm: EthereumChainID;
442
- static klaytn: EthereumChainID;
443
- static avalanchec: EthereumChainID;
444
- static evmos: EthereumChainID;
445
- static arbitrum: EthereumChainID;
446
- static smartchain: EthereumChainID;
447
- static aurora: EthereumChainID;
448
- }
449
- export class NEARAccount {
450
- static createWithString(string: string): NEARAccount;
451
- description(): string;
452
- delete(): void;
453
- }
454
- export class CoinTypeConfiguration {
455
- static getSymbol(type: CoinType): string;
456
- static getDecimals(type: CoinType): number;
457
- static getTransactionURL(type: CoinType, transactionID: string): string;
458
- static getAccountURL(type: CoinType, accountID: string): string;
459
- static getID(type: CoinType): string;
460
- static getName(type: CoinType): string;
461
- }
462
- export class HDWallet {
463
- static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
464
- static create(strength: number, passphrase: string): HDWallet;
465
- static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
466
- static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
467
- static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
468
- seed(): Uint8Array;
469
- mnemonic(): string;
470
- entropy(): Uint8Array;
471
- getMasterKey(curve: Curve): PrivateKey;
472
- getKeyForCoin(coin: CoinType): PrivateKey;
473
- getAddressForCoin(coin: CoinType): string;
474
- getKey(coin: CoinType, derivationPath: string): PrivateKey;
475
- getKeyByCurve(curve: Curve, derivationPath: string): PrivateKey;
476
- getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
477
- getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
478
- getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
479
- getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
480
- getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
481
- getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
482
- getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
483
- delete(): void;
484
- }
485
- export class AnyAddress {
486
- static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
487
- static isValid(string: string, coin: CoinType): boolean;
488
- static createWithString(string: string, coin: CoinType): AnyAddress;
489
- static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
490
- description(): string;
491
- coin(): CoinType;
492
- data(): Uint8Array;
493
- delete(): void;
494
- }
495
- export class AESPaddingMode {
496
- value: number;
497
- static zero: AESPaddingMode;
498
- static pkcs7: AESPaddingMode;
499
- }
500
- export class Mnemonic {
501
- static isValid(mnemonic: string): boolean;
502
- static isValidWord(word: string): boolean;
503
- static suggest(prefix: string): string;
504
- }
505
- export class Blockchain {
506
- value: number;
507
- static bitcoin: Blockchain;
508
- static ethereum: Blockchain;
509
- static vechain: Blockchain;
510
- static tron: Blockchain;
511
- static icon: Blockchain;
512
- static binance: Blockchain;
513
- static ripple: Blockchain;
514
- static tezos: Blockchain;
515
- static nimiq: Blockchain;
516
- static stellar: Blockchain;
517
- static aion: Blockchain;
518
- static cosmos: Blockchain;
519
- static theta: Blockchain;
520
- static ontology: Blockchain;
521
- static zilliqa: Blockchain;
522
- static ioTeX: Blockchain;
523
- static eos: Blockchain;
524
- static nano: Blockchain;
525
- static nuls: Blockchain;
526
- static waves: Blockchain;
527
- static aeternity: Blockchain;
528
- static nebulas: Blockchain;
529
- static fio: Blockchain;
530
- static solana: Blockchain;
531
- static harmony: Blockchain;
532
- static near: Blockchain;
533
- static algorand: Blockchain;
534
- static polkadot: Blockchain;
535
- static cardano: Blockchain;
536
- static neo: Blockchain;
537
- static filecoin: Blockchain;
538
- static elrondNetwork: Blockchain;
539
- static oasisNetwork: Blockchain;
540
- static decred: Blockchain;
541
- static zcash: Blockchain;
542
- static groestlcoin: Blockchain;
543
- static thorchain: Blockchain;
544
- static ronin: Blockchain;
545
- static kusama: Blockchain;
546
- static nervos: Blockchain;
547
- static everscale: Blockchain;
548
- }
549
- export class BitcoinAddress {
550
- static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
551
- static isValid(data: Uint8Array | Buffer): boolean;
552
- static isValidString(string: string): boolean;
553
- static createWithString(string: string): BitcoinAddress;
554
- static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
555
- static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
556
- description(): string;
557
- prefix(): number;
558
- keyhash(): Uint8Array;
559
- delete(): void;
560
- }
561
- export class DerivationPathIndex {
562
- static create(value: number, hardened: boolean): DerivationPathIndex;
563
- value(): number;
564
- hardened(): boolean;
565
- description(): string;
566
- delete(): void;
567
- }
568
- export class SS58AddressType {
569
- value: number;
570
- static polkadot: SS58AddressType;
571
- static kusama: SS58AddressType;
572
- }
573
- export class StellarVersionByte {
574
- value: number;
575
- static accountID: StellarVersionByte;
576
- static seed: StellarVersionByte;
577
- static preAuthTX: StellarVersionByte;
578
- static sha256Hash: StellarVersionByte;
579
- }
580
- export class StoredKeyEncryptionLevel {
581
- value: number;
582
- static default: StoredKeyEncryptionLevel;
583
- static minimal: StoredKeyEncryptionLevel;
584
- static weak: StoredKeyEncryptionLevel;
585
- static standard: StoredKeyEncryptionLevel;
586
- }
587
- export class BitcoinScript {
588
- static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
589
- static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
590
- static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
591
- static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
592
- static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
593
- static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
594
- static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
595
- static hashTypeForCoin(coinType: CoinType): number;
596
- static create(): BitcoinScript;
597
- static createWithData(data: Uint8Array | Buffer): BitcoinScript;
598
- static createCopy(script: BitcoinScript): BitcoinScript;
599
- size(): number;
600
- data(): Uint8Array;
601
- scriptHash(): Uint8Array;
602
- isPayToScriptHash(): boolean;
603
- isPayToWitnessScriptHash(): boolean;
604
- isPayToWitnessPublicKeyHash(): boolean;
605
- isWitnessProgram(): boolean;
606
- matchPayToPubkey(): Uint8Array;
607
- matchPayToPubkeyHash(): Uint8Array;
608
- matchPayToScriptHash(): Uint8Array;
609
- matchPayToWitnessPublicKeyHash(): Uint8Array;
610
- matchPayToWitnessScriptHash(): Uint8Array;
611
- encode(): Uint8Array;
612
- delete(): void;
613
- }
614
- export class PrivateKey {
615
- static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
616
- static create(): PrivateKey;
617
- static createWithData(data: Uint8Array | Buffer): PrivateKey;
618
- static createCopy(key: PrivateKey): PrivateKey;
619
- data(): Uint8Array;
620
- getPublicKeySecp256k1(compressed: boolean): PublicKey;
621
- getPublicKeyNist256p1(): PublicKey;
622
- getPublicKeyEd25519(): PublicKey;
623
- getPublicKeyEd25519Blake2b(): PublicKey;
624
- getPublicKeyEd25519Cardano(): PublicKey;
625
- getPublicKeyCurve25519(): PublicKey;
626
- getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
627
- sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
628
- signAsDER(digest: Uint8Array | Buffer): Uint8Array;
629
- signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
630
- delete(): void;
631
- }
632
- export class DerivationPath {
633
- static create(purpose: Purpose, coin: number, account: number, change: number, address: number): DerivationPath;
634
- static createWithString(string: string): DerivationPath;
635
- purpose(): Purpose;
636
- coin(): number;
637
- account(): number;
638
- change(): number;
639
- address(): number;
640
- description(): string;
641
- indexAt(index: number): DerivationPathIndex;
642
- indicesCount(): number;
643
- delete(): void;
644
- }
645
- export class HDVersion {
646
- value: number;
647
- static none: HDVersion;
648
- static xpub: HDVersion;
649
- static xprv: HDVersion;
650
- static ypub: HDVersion;
651
- static yprv: HDVersion;
652
- static zpub: HDVersion;
653
- static zprv: HDVersion;
654
- static ltub: HDVersion;
655
- static ltpv: HDVersion;
656
- static mtub: HDVersion;
657
- static mtpv: HDVersion;
658
- static dpub: HDVersion;
659
- static dprv: HDVersion;
660
- static dgub: HDVersion;
661
- static dgpv: HDVersion;
662
- }
663
- export class HRP {
664
- value: number;
665
- static unknown: HRP;
666
- static bitcoin: HRP;
667
- static litecoin: HRP;
668
- static viacoin: HRP;
669
- static groestlcoin: HRP;
670
- static digiByte: HRP;
671
- static monacoin: HRP;
672
- static cosmos: HRP;
673
- static bitcoinCash: HRP;
674
- static bitcoinGold: HRP;
675
- static ioTeX: HRP;
676
- static nervos: HRP;
677
- static zilliqa: HRP;
678
- static terra: HRP;
679
- static cryptoOrg: HRP;
680
- static kava: HRP;
681
- static oasis: HRP;
682
- static bluzelle: HRP;
683
- static bandChain: HRP;
684
- static elrond: HRP;
685
- static binance: HRP;
686
- static ecash: HRP;
687
- static thorchain: HRP;
688
- static harmony: HRP;
689
- static cardano: HRP;
690
- static qtum: HRP;
691
- static osmosis: HRP;
692
- static terraV2: HRP;
693
- static nativeEvmos: HRP;
694
- }
695
-
696
- declare function describeHRP(value: HRP): string;
697
-
698
- export class PrivateKeyType {
699
- value: number;
700
- static default: PrivateKeyType;
701
- static cardano: PrivateKeyType;
702
- }
703
707
  export interface WalletCore {
704
- HexCoding: typeof HexCoding;
705
708
  AnySigner: typeof AnySigner;
706
- TransactionCompiler: typeof TransactionCompiler;
707
- RippleXAddress: typeof RippleXAddress;
708
- Purpose: typeof Purpose;
709
- Cardano: typeof Cardano;
710
- GroestlcoinAddress: typeof GroestlcoinAddress;
711
- Hash: typeof Hash;
712
- Base58: typeof Base58;
713
- PBKDF2: typeof PBKDF2;
714
- BitcoinSigHashType: typeof BitcoinSigHashType;
715
- Derivation: typeof Derivation;
716
- NervosAddress: typeof NervosAddress;
717
- AES: typeof AES;
718
- THORChainSwap: typeof THORChainSwap;
719
- Base32: typeof Base32;
720
- DataVector: typeof DataVector;
721
- FIOAccount: typeof FIOAccount;
722
- StellarMemoType: typeof StellarMemoType;
723
- CoinType: typeof CoinType;
709
+ HexCoding: typeof HexCoding;
724
710
  PublicKeyType: typeof PublicKeyType;
711
+ EthereumChainID: typeof EthereumChainID;
725
712
  StoredKey: typeof StoredKey;
726
- Account: typeof Account;
713
+ Curve: typeof Curve;
714
+ NervosAddress: typeof NervosAddress;
715
+ StellarVersionByte: typeof StellarVersionByte;
716
+ PBKDF2: typeof PBKDF2;
727
717
  SolanaAddress: typeof SolanaAddress;
728
- EthereumAbiValue: typeof EthereumAbiValue;
729
- StellarPassphrase: typeof StellarPassphrase;
730
718
  PublicKey: typeof PublicKey;
719
+ TransactionCompiler: typeof TransactionCompiler;
720
+ EthereumAbiValue: typeof EthereumAbiValue;
721
+ PrivateKey: typeof PrivateKey;
731
722
  SegwitAddress: typeof SegwitAddress;
732
- Curve: typeof Curve;
733
- EthereumAbi: typeof EthereumAbi;
734
- EthereumAbiFunction: typeof EthereumAbiFunction;
723
+ AESPaddingMode: typeof AESPaddingMode;
735
724
  Base64: typeof Base64;
736
- EthereumChainID: typeof EthereumChainID;
725
+ StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
726
+ BitcoinScript: typeof BitcoinScript;
727
+ CoinType: typeof CoinType;
728
+ Blockchain: typeof Blockchain;
729
+ RippleXAddress: typeof RippleXAddress;
730
+ HRP: typeof HRP;
731
+ BitcoinSigHashType: typeof BitcoinSigHashType;
732
+ Base32: typeof Base32;
733
+ HDVersion: typeof HDVersion;
734
+ DataVector: typeof DataVector;
735
+ AES: typeof AES;
736
+ Base58: typeof Base58;
737
737
  NEARAccount: typeof NEARAccount;
738
- CoinTypeConfiguration: typeof CoinTypeConfiguration;
739
- HDWallet: typeof HDWallet;
740
- AnyAddress: typeof AnyAddress;
741
- AESPaddingMode: typeof AESPaddingMode;
738
+ Hash: typeof Hash;
742
739
  Mnemonic: typeof Mnemonic;
743
- Blockchain: typeof Blockchain;
740
+ CoinTypeConfiguration: typeof CoinTypeConfiguration;
741
+ Derivation: typeof Derivation;
742
+ THORChainSwap: typeof THORChainSwap;
743
+ Cardano: typeof Cardano;
744
+ EthereumAbi: typeof EthereumAbi;
744
745
  BitcoinAddress: typeof BitcoinAddress;
745
- DerivationPathIndex: typeof DerivationPathIndex;
746
- SS58AddressType: typeof SS58AddressType;
747
- StellarVersionByte: typeof StellarVersionByte;
748
- StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
749
- BitcoinScript: typeof BitcoinScript;
750
- PrivateKey: typeof PrivateKey;
751
746
  DerivationPath: typeof DerivationPath;
752
- HDVersion: typeof HDVersion;
753
- HRP: typeof HRP;
754
747
  PrivateKeyType: typeof PrivateKeyType;
755
- describeStellarPassphrase: typeof describeStellarPassphrase;
748
+ StellarPassphrase: typeof StellarPassphrase;
749
+ Account: typeof Account;
750
+ StellarMemoType: typeof StellarMemoType;
751
+ Purpose: typeof Purpose;
752
+ SS58AddressType: typeof SS58AddressType;
753
+ AnyAddress: typeof AnyAddress;
754
+ GroestlcoinAddress: typeof GroestlcoinAddress;
755
+ DerivationPathIndex: typeof DerivationPathIndex;
756
+ HDWallet: typeof HDWallet;
757
+ FIOAccount: typeof FIOAccount;
758
+ EthereumAbiFunction: typeof EthereumAbiFunction;
756
759
  describeCurve: typeof describeCurve;
757
760
  describeHRP: typeof describeHRP;
761
+ describeStellarPassphrase: typeof describeStellarPassphrase;
758
762
  }