@trustwallet/wallet-core 3.0.4 → 3.0.6
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 +1059 -102
- package/dist/generated/core_proto.js +2877 -163
- package/dist/lib/wallet-core.js +148 -160
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +552 -542
- package/package.json +1 -1
@@ -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
|
19
|
-
|
20
|
-
|
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
|
18
|
+
export class PublicKeyType {
|
33
19
|
value: number;
|
34
|
-
static
|
35
|
-
static
|
36
|
-
static
|
37
|
-
static
|
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
|
40
|
-
|
41
|
-
static
|
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
|
44
|
-
static
|
45
|
-
static
|
46
|
-
static
|
47
|
-
static
|
48
|
-
|
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
|
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
|
92
|
-
static
|
93
|
-
static
|
94
|
-
static
|
95
|
-
static
|
96
|
-
static
|
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
|
109
|
-
|
110
|
-
static
|
111
|
-
static
|
112
|
-
static
|
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
|
115
|
-
static
|
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
|
118
|
-
static
|
119
|
-
|
120
|
-
|
121
|
-
|
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
|
124
|
-
static
|
125
|
-
static
|
126
|
-
|
127
|
-
|
128
|
-
|
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
|
132
|
-
static
|
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
|
196
|
+
export class AESPaddingMode {
|
137
197
|
value: number;
|
138
|
-
static
|
139
|
-
static
|
140
|
-
|
141
|
-
|
142
|
-
static
|
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,335 @@ 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
|
339
|
+
export class Blockchain {
|
241
340
|
value: number;
|
242
|
-
static
|
243
|
-
static
|
244
|
-
static
|
245
|
-
static
|
246
|
-
static
|
247
|
-
static
|
248
|
-
static
|
249
|
-
static
|
250
|
-
|
251
|
-
|
252
|
-
static
|
253
|
-
static
|
254
|
-
static
|
255
|
-
static
|
256
|
-
static
|
257
|
-
static
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
static
|
282
|
-
|
283
|
-
|
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
|
291
|
-
static
|
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
|
-
|
390
|
+
tag(): number;
|
294
391
|
delete(): void;
|
295
392
|
}
|
296
|
-
export class
|
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
|
313
|
-
static
|
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
|
426
|
+
declare function describeHRP(value: HRP): string;
|
317
427
|
|
318
|
-
export class
|
319
|
-
|
320
|
-
static
|
321
|
-
static
|
322
|
-
|
323
|
-
|
324
|
-
|
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
|
334
|
-
static
|
335
|
-
static
|
336
|
-
static
|
337
|
-
static
|
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
|
442
|
+
export class HDVersion {
|
345
443
|
value: number;
|
346
|
-
static
|
347
|
-
static
|
348
|
-
static
|
349
|
-
static
|
350
|
-
static
|
351
|
-
static
|
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
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
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 bitcoinTestnet: Derivation;
|
525
|
+
static litecoinLegacy: Derivation;
|
526
|
+
static solanaSolana: Derivation;
|
527
|
+
}
|
528
|
+
export class THORChainSwap {
|
529
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
530
|
+
}
|
531
|
+
export class Cardano {
|
532
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
533
|
+
static getStakingAddress(baseAddress: string): string;
|
534
|
+
}
|
535
|
+
export class EthereumAbi {
|
536
|
+
static encode(fn: EthereumAbiFunction): Uint8Array;
|
358
537
|
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
359
538
|
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
360
539
|
static encodeTyped(messageJson: string): Uint8Array;
|
361
540
|
}
|
541
|
+
export class BitcoinAddress {
|
542
|
+
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
543
|
+
static isValid(data: Uint8Array | Buffer): boolean;
|
544
|
+
static isValidString(string: string): boolean;
|
545
|
+
static createWithString(string: string): BitcoinAddress;
|
546
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
547
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
548
|
+
description(): string;
|
549
|
+
prefix(): number;
|
550
|
+
keyhash(): Uint8Array;
|
551
|
+
delete(): void;
|
552
|
+
}
|
553
|
+
export class DerivationPath {
|
554
|
+
static create(purpose: Purpose, coin: number, account: number, change: number, address: number): DerivationPath;
|
555
|
+
static createWithString(string: string): DerivationPath;
|
556
|
+
purpose(): Purpose;
|
557
|
+
coin(): number;
|
558
|
+
account(): number;
|
559
|
+
change(): number;
|
560
|
+
address(): number;
|
561
|
+
description(): string;
|
562
|
+
indexAt(index: number): DerivationPathIndex;
|
563
|
+
indicesCount(): number;
|
564
|
+
delete(): void;
|
565
|
+
}
|
566
|
+
export class PrivateKeyType {
|
567
|
+
value: number;
|
568
|
+
static default: PrivateKeyType;
|
569
|
+
static cardano: PrivateKeyType;
|
570
|
+
}
|
571
|
+
export class StellarPassphrase {
|
572
|
+
value: number;
|
573
|
+
static stellar: StellarPassphrase;
|
574
|
+
static kin: StellarPassphrase;
|
575
|
+
}
|
576
|
+
|
577
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
578
|
+
|
579
|
+
export class Account {
|
580
|
+
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
581
|
+
address(): string;
|
582
|
+
derivation(): Derivation;
|
583
|
+
derivationPath(): string;
|
584
|
+
publicKey(): string;
|
585
|
+
extendedPublicKey(): string;
|
586
|
+
coin(): CoinType;
|
587
|
+
delete(): void;
|
588
|
+
}
|
589
|
+
export class StellarMemoType {
|
590
|
+
value: number;
|
591
|
+
static none: StellarMemoType;
|
592
|
+
static text: StellarMemoType;
|
593
|
+
static id: StellarMemoType;
|
594
|
+
static hash: StellarMemoType;
|
595
|
+
static return: StellarMemoType;
|
596
|
+
}
|
597
|
+
export class Purpose {
|
598
|
+
value: number;
|
599
|
+
static bip44: Purpose;
|
600
|
+
static bip49: Purpose;
|
601
|
+
static bip84: Purpose;
|
602
|
+
static bip1852: Purpose;
|
603
|
+
}
|
604
|
+
export class SS58AddressType {
|
605
|
+
value: number;
|
606
|
+
static polkadot: SS58AddressType;
|
607
|
+
static kusama: SS58AddressType;
|
608
|
+
}
|
609
|
+
export class AnyAddress {
|
610
|
+
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
611
|
+
static isValid(string: string, coin: CoinType): boolean;
|
612
|
+
static createWithString(string: string, coin: CoinType): AnyAddress;
|
613
|
+
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
614
|
+
description(): string;
|
615
|
+
coin(): CoinType;
|
616
|
+
data(): Uint8Array;
|
617
|
+
delete(): void;
|
618
|
+
}
|
619
|
+
export class GroestlcoinAddress {
|
620
|
+
static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
|
621
|
+
static isValidString(string: string): boolean;
|
622
|
+
static createWithString(string: string): GroestlcoinAddress;
|
623
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
624
|
+
description(): string;
|
625
|
+
delete(): void;
|
626
|
+
}
|
627
|
+
export class DerivationPathIndex {
|
628
|
+
static create(value: number, hardened: boolean): DerivationPathIndex;
|
629
|
+
value(): number;
|
630
|
+
hardened(): boolean;
|
631
|
+
description(): string;
|
632
|
+
delete(): void;
|
633
|
+
}
|
634
|
+
export class HDWallet {
|
635
|
+
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
636
|
+
static create(strength: number, passphrase: string): HDWallet;
|
637
|
+
static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
|
638
|
+
static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
|
639
|
+
static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
|
640
|
+
seed(): Uint8Array;
|
641
|
+
mnemonic(): string;
|
642
|
+
entropy(): Uint8Array;
|
643
|
+
getMasterKey(curve: Curve): PrivateKey;
|
644
|
+
getKeyForCoin(coin: CoinType): PrivateKey;
|
645
|
+
getAddressForCoin(coin: CoinType): string;
|
646
|
+
getKey(coin: CoinType, derivationPath: string): PrivateKey;
|
647
|
+
getKeyByCurve(curve: Curve, derivationPath: string): PrivateKey;
|
648
|
+
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
649
|
+
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
650
|
+
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
651
|
+
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
652
|
+
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
653
|
+
getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
654
|
+
getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
655
|
+
delete(): void;
|
656
|
+
}
|
657
|
+
export class BitcoinMessageSigner {
|
658
|
+
static signMessage(privateKey: PrivateKey, address: string, message: string): string;
|
659
|
+
static verifyMessage(address: string, message: string, signature: string): boolean;
|
660
|
+
}
|
661
|
+
export class FIOAccount {
|
662
|
+
static createWithString(string: string): FIOAccount;
|
663
|
+
description(): string;
|
664
|
+
delete(): void;
|
665
|
+
}
|
362
666
|
export class EthereumAbiFunction {
|
363
667
|
static createWithString(name: string): EthereumAbiFunction;
|
364
668
|
getType(): string;
|
@@ -405,354 +709,60 @@ export class EthereumAbiFunction {
|
|
405
709
|
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
406
710
|
delete(): void;
|
407
711
|
}
|
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
712
|
export interface WalletCore {
|
704
|
-
HexCoding: typeof HexCoding;
|
705
713
|
AnySigner: typeof AnySigner;
|
706
|
-
|
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;
|
714
|
+
HexCoding: typeof HexCoding;
|
724
715
|
PublicKeyType: typeof PublicKeyType;
|
716
|
+
EthereumChainID: typeof EthereumChainID;
|
725
717
|
StoredKey: typeof StoredKey;
|
726
|
-
|
718
|
+
Curve: typeof Curve;
|
719
|
+
NervosAddress: typeof NervosAddress;
|
720
|
+
StellarVersionByte: typeof StellarVersionByte;
|
721
|
+
PBKDF2: typeof PBKDF2;
|
727
722
|
SolanaAddress: typeof SolanaAddress;
|
728
|
-
EthereumAbiValue: typeof EthereumAbiValue;
|
729
|
-
StellarPassphrase: typeof StellarPassphrase;
|
730
723
|
PublicKey: typeof PublicKey;
|
724
|
+
TransactionCompiler: typeof TransactionCompiler;
|
725
|
+
EthereumAbiValue: typeof EthereumAbiValue;
|
726
|
+
PrivateKey: typeof PrivateKey;
|
731
727
|
SegwitAddress: typeof SegwitAddress;
|
732
|
-
|
733
|
-
EthereumAbi: typeof EthereumAbi;
|
734
|
-
EthereumAbiFunction: typeof EthereumAbiFunction;
|
728
|
+
AESPaddingMode: typeof AESPaddingMode;
|
735
729
|
Base64: typeof Base64;
|
736
|
-
|
730
|
+
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
731
|
+
BitcoinScript: typeof BitcoinScript;
|
732
|
+
CoinType: typeof CoinType;
|
733
|
+
Blockchain: typeof Blockchain;
|
734
|
+
RippleXAddress: typeof RippleXAddress;
|
735
|
+
HRP: typeof HRP;
|
736
|
+
BitcoinSigHashType: typeof BitcoinSigHashType;
|
737
|
+
Base32: typeof Base32;
|
738
|
+
HDVersion: typeof HDVersion;
|
739
|
+
DataVector: typeof DataVector;
|
740
|
+
AES: typeof AES;
|
741
|
+
Base58: typeof Base58;
|
737
742
|
NEARAccount: typeof NEARAccount;
|
738
|
-
|
739
|
-
HDWallet: typeof HDWallet;
|
740
|
-
AnyAddress: typeof AnyAddress;
|
741
|
-
AESPaddingMode: typeof AESPaddingMode;
|
743
|
+
Hash: typeof Hash;
|
742
744
|
Mnemonic: typeof Mnemonic;
|
743
|
-
|
745
|
+
CoinTypeConfiguration: typeof CoinTypeConfiguration;
|
746
|
+
Derivation: typeof Derivation;
|
747
|
+
THORChainSwap: typeof THORChainSwap;
|
748
|
+
Cardano: typeof Cardano;
|
749
|
+
EthereumAbi: typeof EthereumAbi;
|
744
750
|
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
751
|
DerivationPath: typeof DerivationPath;
|
752
|
-
HDVersion: typeof HDVersion;
|
753
|
-
HRP: typeof HRP;
|
754
752
|
PrivateKeyType: typeof PrivateKeyType;
|
755
|
-
|
753
|
+
StellarPassphrase: typeof StellarPassphrase;
|
754
|
+
Account: typeof Account;
|
755
|
+
StellarMemoType: typeof StellarMemoType;
|
756
|
+
Purpose: typeof Purpose;
|
757
|
+
SS58AddressType: typeof SS58AddressType;
|
758
|
+
AnyAddress: typeof AnyAddress;
|
759
|
+
GroestlcoinAddress: typeof GroestlcoinAddress;
|
760
|
+
DerivationPathIndex: typeof DerivationPathIndex;
|
761
|
+
HDWallet: typeof HDWallet;
|
762
|
+
BitcoinMessageSigner: typeof BitcoinMessageSigner;
|
763
|
+
FIOAccount: typeof FIOAccount;
|
764
|
+
EthereumAbiFunction: typeof EthereumAbiFunction;
|
756
765
|
describeCurve: typeof describeCurve;
|
757
766
|
describeHRP: typeof describeHRP;
|
767
|
+
describeStellarPassphrase: typeof describeStellarPassphrase;
|
758
768
|
}
|