@trustwallet/wallet-core 3.0.3 → 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.
- package/dist/generated/core_proto.d.ts +1044 -120
- package/dist/generated/core_proto.js +9658 -7056
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/lib/wallet-core.js +148 -160
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/keystore/default-impl.d.ts +19 -0
- package/dist/src/keystore/default-impl.js +127 -0
- package/dist/src/keystore/extension-storage.d.ts +12 -0
- package/dist/src/keystore/extension-storage.js +74 -0
- package/dist/src/keystore/fs-storage.d.ts +10 -0
- package/dist/src/keystore/fs-storage.js +39 -0
- package/dist/src/keystore/index.d.ts +4 -0
- package/dist/src/keystore/index.js +29 -0
- package/dist/src/keystore/types.d.ts +47 -0
- package/dist/src/keystore/types.js +24 -0
- package/dist/{wallet-core.d.ts → src/wallet-core.d.ts} +548 -521
- package/package.json +4 -2
@@ -6,94 +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
|
-
|
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;
|
41
64
|
}
|
42
|
-
export class
|
43
|
-
static
|
44
|
-
static
|
45
|
-
static
|
46
|
-
static
|
47
|
-
|
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;
|
48
92
|
delete(): void;
|
49
93
|
}
|
50
|
-
export class
|
51
|
-
static sha1(data: Uint8Array | Buffer): Uint8Array;
|
52
|
-
static sha256(data: Uint8Array | Buffer): Uint8Array;
|
53
|
-
static sha512(data: Uint8Array | Buffer): Uint8Array;
|
54
|
-
static sha512_256(data: Uint8Array | Buffer): Uint8Array;
|
55
|
-
static keccak256(data: Uint8Array | Buffer): Uint8Array;
|
56
|
-
static keccak512(data: Uint8Array | Buffer): Uint8Array;
|
57
|
-
static sha3_256(data: Uint8Array | Buffer): Uint8Array;
|
58
|
-
static sha3_512(data: Uint8Array | Buffer): Uint8Array;
|
59
|
-
static ripemd(data: Uint8Array | Buffer): Uint8Array;
|
60
|
-
static blake256(data: Uint8Array | Buffer): Uint8Array;
|
61
|
-
static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
|
62
|
-
static groestl512(data: Uint8Array | Buffer): Uint8Array;
|
63
|
-
static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
|
64
|
-
static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
65
|
-
static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
66
|
-
static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
|
67
|
-
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
68
|
-
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
69
|
-
}
|
70
|
-
export class Base58 {
|
71
|
-
static encode(data: Uint8Array | Buffer): string;
|
72
|
-
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
73
|
-
static decode(string: string): Uint8Array;
|
74
|
-
static decodeNoCheck(string: string): Uint8Array;
|
75
|
-
}
|
76
|
-
export class PBKDF2 {
|
77
|
-
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
78
|
-
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
79
|
-
}
|
80
|
-
export class BitcoinSigHashType {
|
81
|
-
value: number;
|
82
|
-
static all: BitcoinSigHashType;
|
83
|
-
static none: BitcoinSigHashType;
|
84
|
-
static single: BitcoinSigHashType;
|
85
|
-
static fork: BitcoinSigHashType;
|
86
|
-
static forkBTG: BitcoinSigHashType;
|
87
|
-
}
|
88
|
-
export class Derivation {
|
94
|
+
export class Curve {
|
89
95
|
value: number;
|
90
|
-
static
|
91
|
-
static
|
92
|
-
static
|
93
|
-
static
|
94
|
-
static
|
95
|
-
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;
|
96
102
|
}
|
103
|
+
|
104
|
+
declare function describeCurve(value: Curve): string;
|
105
|
+
|
97
106
|
export class NervosAddress {
|
98
107
|
static equal(lhs: NervosAddress, rhs: NervosAddress): boolean;
|
99
108
|
static isValidString(string: string): boolean;
|
@@ -104,41 +113,130 @@ export class NervosAddress {
|
|
104
113
|
args(): Uint8Array;
|
105
114
|
delete(): void;
|
106
115
|
}
|
107
|
-
export class
|
108
|
-
|
109
|
-
static
|
110
|
-
static
|
111
|
-
static
|
116
|
+
export class StellarVersionByte {
|
117
|
+
value: number;
|
118
|
+
static accountID: StellarVersionByte;
|
119
|
+
static seed: StellarVersionByte;
|
120
|
+
static preAuthTX: StellarVersionByte;
|
121
|
+
static sha256Hash: StellarVersionByte;
|
112
122
|
}
|
113
|
-
export class
|
114
|
-
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;
|
115
126
|
}
|
116
|
-
export class
|
117
|
-
static
|
118
|
-
|
119
|
-
|
120
|
-
|
127
|
+
export class SolanaAddress {
|
128
|
+
static createWithString(string: string): SolanaAddress;
|
129
|
+
description(): string;
|
130
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
131
|
+
delete(): void;
|
121
132
|
}
|
122
|
-
export class
|
123
|
-
static
|
124
|
-
static
|
125
|
-
|
126
|
-
|
127
|
-
|
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;
|
128
146
|
delete(): void;
|
129
147
|
}
|
130
|
-
export class
|
131
|
-
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;
|
132
190
|
description(): string;
|
191
|
+
hrp(): HRP;
|
192
|
+
witnessVersion(): number;
|
193
|
+
witnessProgram(): Uint8Array;
|
133
194
|
delete(): void;
|
134
195
|
}
|
135
|
-
export class
|
196
|
+
export class AESPaddingMode {
|
136
197
|
value: number;
|
137
|
-
static
|
138
|
-
static
|
139
|
-
|
140
|
-
|
141
|
-
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;
|
142
240
|
}
|
143
241
|
export class CoinType {
|
144
242
|
value: number;
|
@@ -209,6 +307,7 @@ export class CoinType {
|
|
209
307
|
static thorchain: CoinType;
|
210
308
|
static bluzelle: CoinType;
|
211
309
|
static optimism: CoinType;
|
310
|
+
static zksync: CoinType;
|
212
311
|
static arbitrum: CoinType;
|
213
312
|
static ecochain: CoinType;
|
214
313
|
static avalancheCChain: CoinType;
|
@@ -235,129 +334,330 @@ export class CoinType {
|
|
235
334
|
static okxchain: CoinType;
|
236
335
|
static nervos: CoinType;
|
237
336
|
static everscale: CoinType;
|
337
|
+
static aptos: CoinType;
|
238
338
|
}
|
239
|
-
export class
|
339
|
+
export class Blockchain {
|
240
340
|
value: number;
|
241
|
-
static
|
242
|
-
static
|
243
|
-
static
|
244
|
-
static
|
245
|
-
static
|
246
|
-
static
|
247
|
-
static
|
248
|
-
static
|
249
|
-
|
250
|
-
|
251
|
-
static
|
252
|
-
static
|
253
|
-
static
|
254
|
-
static
|
255
|
-
static
|
256
|
-
static
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
static
|
281
|
-
|
282
|
-
|
283
|
-
derivationPath(): string;
|
284
|
-
publicKey(): string;
|
285
|
-
extendedPublicKey(): string;
|
286
|
-
coin(): CoinType;
|
287
|
-
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;
|
288
383
|
}
|
289
|
-
export class
|
290
|
-
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;
|
291
389
|
description(): string;
|
292
|
-
|
390
|
+
tag(): number;
|
293
391
|
delete(): void;
|
294
392
|
}
|
295
|
-
export class
|
296
|
-
static encodeBool(value: boolean): Uint8Array;
|
297
|
-
static encodeInt32(value: number): Uint8Array;
|
298
|
-
static encodeUInt32(value: number): Uint8Array;
|
299
|
-
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
300
|
-
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
301
|
-
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
302
|
-
static encodeString(value: string): Uint8Array;
|
303
|
-
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
304
|
-
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
305
|
-
static decodeUInt256(input: Uint8Array | Buffer): string;
|
306
|
-
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
307
|
-
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
308
|
-
}
|
309
|
-
export class StellarPassphrase {
|
393
|
+
export class HRP {
|
310
394
|
value: number;
|
311
|
-
static
|
312
|
-
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;
|
313
424
|
}
|
314
425
|
|
315
|
-
declare function
|
426
|
+
declare function describeHRP(value: HRP): string;
|
316
427
|
|
317
|
-
export class
|
318
|
-
|
319
|
-
static
|
320
|
-
static
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
data(): Uint8Array;
|
325
|
-
keyType(): PublicKeyType;
|
326
|
-
description(): string;
|
327
|
-
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
328
|
-
verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
329
|
-
verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
330
|
-
delete(): void;
|
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;
|
331
435
|
}
|
332
|
-
export class
|
333
|
-
static
|
334
|
-
static
|
335
|
-
static
|
336
|
-
static
|
337
|
-
description(): string;
|
338
|
-
hrp(): HRP;
|
339
|
-
witnessVersion(): number;
|
340
|
-
witnessProgram(): Uint8Array;
|
341
|
-
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;
|
342
441
|
}
|
343
|
-
export class
|
442
|
+
export class HDVersion {
|
344
443
|
value: number;
|
345
|
-
static
|
346
|
-
static
|
347
|
-
static
|
348
|
-
static
|
349
|
-
static
|
350
|
-
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;
|
351
459
|
}
|
352
|
-
|
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 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;
|
536
|
+
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
358
537
|
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
359
538
|
static encodeTyped(messageJson: string): Uint8Array;
|
360
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
|
+
}
|
361
661
|
export class EthereumAbiFunction {
|
362
662
|
static createWithString(name: string): EthereumAbiFunction;
|
363
663
|
getType(): string;
|
@@ -404,332 +704,59 @@ export class EthereumAbiFunction {
|
|
404
704
|
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
405
705
|
delete(): void;
|
406
706
|
}
|
407
|
-
export class Base64 {
|
408
|
-
static decode(string: string): Uint8Array;
|
409
|
-
static decodeUrl(string: string): Uint8Array;
|
410
|
-
static encode(data: Uint8Array | Buffer): string;
|
411
|
-
static encodeUrl(data: Uint8Array | Buffer): string;
|
412
|
-
}
|
413
|
-
export class EthereumChainID {
|
414
|
-
value: number;
|
415
|
-
static ethereum: EthereumChainID;
|
416
|
-
static classic: EthereumChainID;
|
417
|
-
static poa: EthereumChainID;
|
418
|
-
static vechain: EthereumChainID;
|
419
|
-
static callisto: EthereumChainID;
|
420
|
-
static tomochain: EthereumChainID;
|
421
|
-
static polygon: EthereumChainID;
|
422
|
-
static okc: EthereumChainID;
|
423
|
-
static thundertoken: EthereumChainID;
|
424
|
-
static gochain: EthereumChainID;
|
425
|
-
static meter: EthereumChainID;
|
426
|
-
static celo: EthereumChainID;
|
427
|
-
static wanchain: EthereumChainID;
|
428
|
-
static cronos: EthereumChainID;
|
429
|
-
static optimism: EthereumChainID;
|
430
|
-
static xdai: EthereumChainID;
|
431
|
-
static smartbch: EthereumChainID;
|
432
|
-
static fantom: EthereumChainID;
|
433
|
-
static boba: EthereumChainID;
|
434
|
-
static kcc: EthereumChainID;
|
435
|
-
static heco: EthereumChainID;
|
436
|
-
static metis: EthereumChainID;
|
437
|
-
static moonbeam: EthereumChainID;
|
438
|
-
static moonriver: EthereumChainID;
|
439
|
-
static ronin: EthereumChainID;
|
440
|
-
static kavaevm: EthereumChainID;
|
441
|
-
static klaytn: EthereumChainID;
|
442
|
-
static avalanchec: EthereumChainID;
|
443
|
-
static evmos: EthereumChainID;
|
444
|
-
static arbitrum: EthereumChainID;
|
445
|
-
static smartchain: EthereumChainID;
|
446
|
-
static aurora: EthereumChainID;
|
447
|
-
}
|
448
|
-
export class NEARAccount {
|
449
|
-
static createWithString(string: string): NEARAccount;
|
450
|
-
description(): string;
|
451
|
-
delete(): void;
|
452
|
-
}
|
453
|
-
export class CoinTypeConfiguration {
|
454
|
-
static getSymbol(type: CoinType): string;
|
455
|
-
static getDecimals(type: CoinType): number;
|
456
|
-
static getTransactionURL(type: CoinType, transactionID: string): string;
|
457
|
-
static getAccountURL(type: CoinType, accountID: string): string;
|
458
|
-
static getID(type: CoinType): string;
|
459
|
-
static getName(type: CoinType): string;
|
460
|
-
}
|
461
|
-
export class HDWallet {
|
462
|
-
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
463
|
-
static create(strength: number, passphrase: string): HDWallet;
|
464
|
-
static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
|
465
|
-
static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
|
466
|
-
static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
|
467
|
-
seed(): Uint8Array;
|
468
|
-
mnemonic(): string;
|
469
|
-
entropy(): Uint8Array;
|
470
|
-
getMasterKey(curve: Curve): PrivateKey;
|
471
|
-
getKeyForCoin(coin: CoinType): PrivateKey;
|
472
|
-
getAddressForCoin(coin: CoinType): string;
|
473
|
-
getKey(coin: CoinType, derivationPath: string): PrivateKey;
|
474
|
-
getKeyByCurve(curve: Curve, derivationPath: string): PrivateKey;
|
475
|
-
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
476
|
-
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
477
|
-
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
478
|
-
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
479
|
-
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
480
|
-
getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
481
|
-
getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
482
|
-
delete(): void;
|
483
|
-
}
|
484
|
-
export class AnyAddress {
|
485
|
-
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
486
|
-
static isValid(string: string, coin: CoinType): boolean;
|
487
|
-
static createWithString(string: string, coin: CoinType): AnyAddress;
|
488
|
-
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
489
|
-
description(): string;
|
490
|
-
coin(): CoinType;
|
491
|
-
data(): Uint8Array;
|
492
|
-
delete(): void;
|
493
|
-
}
|
494
|
-
export class AESPaddingMode {
|
495
|
-
value: number;
|
496
|
-
static zero: AESPaddingMode;
|
497
|
-
static pkcs7: AESPaddingMode;
|
498
|
-
}
|
499
|
-
export class Mnemonic {
|
500
|
-
static isValid(mnemonic: string): boolean;
|
501
|
-
static isValidWord(word: string): boolean;
|
502
|
-
static suggest(prefix: string): string;
|
503
|
-
}
|
504
|
-
export class Blockchain {
|
505
|
-
value: number;
|
506
|
-
static bitcoin: Blockchain;
|
507
|
-
static ethereum: Blockchain;
|
508
|
-
static vechain: Blockchain;
|
509
|
-
static tron: Blockchain;
|
510
|
-
static icon: Blockchain;
|
511
|
-
static binance: Blockchain;
|
512
|
-
static ripple: Blockchain;
|
513
|
-
static tezos: Blockchain;
|
514
|
-
static nimiq: Blockchain;
|
515
|
-
static stellar: Blockchain;
|
516
|
-
static aion: Blockchain;
|
517
|
-
static cosmos: Blockchain;
|
518
|
-
static theta: Blockchain;
|
519
|
-
static ontology: Blockchain;
|
520
|
-
static zilliqa: Blockchain;
|
521
|
-
static ioTeX: Blockchain;
|
522
|
-
static eos: Blockchain;
|
523
|
-
static nano: Blockchain;
|
524
|
-
static nuls: Blockchain;
|
525
|
-
static waves: Blockchain;
|
526
|
-
static aeternity: Blockchain;
|
527
|
-
static nebulas: Blockchain;
|
528
|
-
static fio: Blockchain;
|
529
|
-
static solana: Blockchain;
|
530
|
-
static harmony: Blockchain;
|
531
|
-
static near: Blockchain;
|
532
|
-
static algorand: Blockchain;
|
533
|
-
static polkadot: Blockchain;
|
534
|
-
static cardano: Blockchain;
|
535
|
-
static neo: Blockchain;
|
536
|
-
static filecoin: Blockchain;
|
537
|
-
static elrondNetwork: Blockchain;
|
538
|
-
static oasisNetwork: Blockchain;
|
539
|
-
static decred: Blockchain;
|
540
|
-
static zcash: Blockchain;
|
541
|
-
static groestlcoin: Blockchain;
|
542
|
-
static thorchain: Blockchain;
|
543
|
-
static ronin: Blockchain;
|
544
|
-
static kusama: Blockchain;
|
545
|
-
static nervos: Blockchain;
|
546
|
-
static everscale: Blockchain;
|
547
|
-
}
|
548
|
-
export class BitcoinAddress {
|
549
|
-
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
550
|
-
static isValid(data: Uint8Array | Buffer): boolean;
|
551
|
-
static isValidString(string: string): boolean;
|
552
|
-
static createWithString(string: string): BitcoinAddress;
|
553
|
-
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
554
|
-
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
555
|
-
description(): string;
|
556
|
-
prefix(): number;
|
557
|
-
keyhash(): Uint8Array;
|
558
|
-
delete(): void;
|
559
|
-
}
|
560
|
-
export class SS58AddressType {
|
561
|
-
value: number;
|
562
|
-
static polkadot: SS58AddressType;
|
563
|
-
static kusama: SS58AddressType;
|
564
|
-
}
|
565
|
-
export class StellarVersionByte {
|
566
|
-
value: number;
|
567
|
-
static accountID: StellarVersionByte;
|
568
|
-
static seed: StellarVersionByte;
|
569
|
-
static preAuthTX: StellarVersionByte;
|
570
|
-
static sha256Hash: StellarVersionByte;
|
571
|
-
}
|
572
|
-
export class StoredKeyEncryptionLevel {
|
573
|
-
value: number;
|
574
|
-
static default: StoredKeyEncryptionLevel;
|
575
|
-
static minimal: StoredKeyEncryptionLevel;
|
576
|
-
static weak: StoredKeyEncryptionLevel;
|
577
|
-
static standard: StoredKeyEncryptionLevel;
|
578
|
-
}
|
579
|
-
export class BitcoinScript {
|
580
|
-
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
581
|
-
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
582
|
-
static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
583
|
-
static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
584
|
-
static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
585
|
-
static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
586
|
-
static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
|
587
|
-
static hashTypeForCoin(coinType: CoinType): number;
|
588
|
-
static create(): BitcoinScript;
|
589
|
-
static createWithData(data: Uint8Array | Buffer): BitcoinScript;
|
590
|
-
static createCopy(script: BitcoinScript): BitcoinScript;
|
591
|
-
size(): number;
|
592
|
-
data(): Uint8Array;
|
593
|
-
scriptHash(): Uint8Array;
|
594
|
-
isPayToScriptHash(): boolean;
|
595
|
-
isPayToWitnessScriptHash(): boolean;
|
596
|
-
isPayToWitnessPublicKeyHash(): boolean;
|
597
|
-
isWitnessProgram(): boolean;
|
598
|
-
matchPayToPubkey(): Uint8Array;
|
599
|
-
matchPayToPubkeyHash(): Uint8Array;
|
600
|
-
matchPayToScriptHash(): Uint8Array;
|
601
|
-
matchPayToWitnessPublicKeyHash(): Uint8Array;
|
602
|
-
matchPayToWitnessScriptHash(): Uint8Array;
|
603
|
-
encode(): Uint8Array;
|
604
|
-
delete(): void;
|
605
|
-
}
|
606
|
-
export class PrivateKey {
|
607
|
-
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
608
|
-
static create(): PrivateKey;
|
609
|
-
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
610
|
-
static createCopy(key: PrivateKey): PrivateKey;
|
611
|
-
data(): Uint8Array;
|
612
|
-
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
613
|
-
getPublicKeyNist256p1(): PublicKey;
|
614
|
-
getPublicKeyEd25519(): PublicKey;
|
615
|
-
getPublicKeyEd25519Blake2b(): PublicKey;
|
616
|
-
getPublicKeyEd25519Cardano(): PublicKey;
|
617
|
-
getPublicKeyCurve25519(): PublicKey;
|
618
|
-
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
619
|
-
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
620
|
-
signAsDER(digest: Uint8Array | Buffer): Uint8Array;
|
621
|
-
signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
|
622
|
-
delete(): void;
|
623
|
-
}
|
624
|
-
export class HDVersion {
|
625
|
-
value: number;
|
626
|
-
static none: HDVersion;
|
627
|
-
static xpub: HDVersion;
|
628
|
-
static xprv: HDVersion;
|
629
|
-
static ypub: HDVersion;
|
630
|
-
static yprv: HDVersion;
|
631
|
-
static zpub: HDVersion;
|
632
|
-
static zprv: HDVersion;
|
633
|
-
static ltub: HDVersion;
|
634
|
-
static ltpv: HDVersion;
|
635
|
-
static mtub: HDVersion;
|
636
|
-
static mtpv: HDVersion;
|
637
|
-
static dpub: HDVersion;
|
638
|
-
static dprv: HDVersion;
|
639
|
-
static dgub: HDVersion;
|
640
|
-
static dgpv: HDVersion;
|
641
|
-
}
|
642
|
-
export class HRP {
|
643
|
-
value: number;
|
644
|
-
static unknown: HRP;
|
645
|
-
static bitcoin: HRP;
|
646
|
-
static litecoin: HRP;
|
647
|
-
static viacoin: HRP;
|
648
|
-
static groestlcoin: HRP;
|
649
|
-
static digiByte: HRP;
|
650
|
-
static monacoin: HRP;
|
651
|
-
static cosmos: HRP;
|
652
|
-
static bitcoinCash: HRP;
|
653
|
-
static bitcoinGold: HRP;
|
654
|
-
static ioTeX: HRP;
|
655
|
-
static nervos: HRP;
|
656
|
-
static zilliqa: HRP;
|
657
|
-
static terra: HRP;
|
658
|
-
static cryptoOrg: HRP;
|
659
|
-
static kava: HRP;
|
660
|
-
static oasis: HRP;
|
661
|
-
static bluzelle: HRP;
|
662
|
-
static bandChain: HRP;
|
663
|
-
static elrond: HRP;
|
664
|
-
static binance: HRP;
|
665
|
-
static ecash: HRP;
|
666
|
-
static thorchain: HRP;
|
667
|
-
static harmony: HRP;
|
668
|
-
static cardano: HRP;
|
669
|
-
static qtum: HRP;
|
670
|
-
static osmosis: HRP;
|
671
|
-
static terraV2: HRP;
|
672
|
-
static nativeEvmos: HRP;
|
673
|
-
}
|
674
|
-
|
675
|
-
declare function describeHRP(value: HRP): string;
|
676
|
-
|
677
|
-
export class PrivateKeyType {
|
678
|
-
value: number;
|
679
|
-
static default: PrivateKeyType;
|
680
|
-
static cardano: PrivateKeyType;
|
681
|
-
}
|
682
707
|
export interface WalletCore {
|
683
|
-
HexCoding: typeof HexCoding;
|
684
708
|
AnySigner: typeof AnySigner;
|
685
|
-
|
686
|
-
RippleXAddress: typeof RippleXAddress;
|
687
|
-
Purpose: typeof Purpose;
|
688
|
-
Cardano: typeof Cardano;
|
689
|
-
GroestlcoinAddress: typeof GroestlcoinAddress;
|
690
|
-
Hash: typeof Hash;
|
691
|
-
Base58: typeof Base58;
|
692
|
-
PBKDF2: typeof PBKDF2;
|
693
|
-
BitcoinSigHashType: typeof BitcoinSigHashType;
|
694
|
-
Derivation: typeof Derivation;
|
695
|
-
NervosAddress: typeof NervosAddress;
|
696
|
-
AES: typeof AES;
|
697
|
-
THORChainSwap: typeof THORChainSwap;
|
698
|
-
Base32: typeof Base32;
|
699
|
-
DataVector: typeof DataVector;
|
700
|
-
FIOAccount: typeof FIOAccount;
|
701
|
-
StellarMemoType: typeof StellarMemoType;
|
702
|
-
CoinType: typeof CoinType;
|
709
|
+
HexCoding: typeof HexCoding;
|
703
710
|
PublicKeyType: typeof PublicKeyType;
|
711
|
+
EthereumChainID: typeof EthereumChainID;
|
704
712
|
StoredKey: typeof StoredKey;
|
705
|
-
|
713
|
+
Curve: typeof Curve;
|
714
|
+
NervosAddress: typeof NervosAddress;
|
715
|
+
StellarVersionByte: typeof StellarVersionByte;
|
716
|
+
PBKDF2: typeof PBKDF2;
|
706
717
|
SolanaAddress: typeof SolanaAddress;
|
707
|
-
EthereumAbiValue: typeof EthereumAbiValue;
|
708
|
-
StellarPassphrase: typeof StellarPassphrase;
|
709
718
|
PublicKey: typeof PublicKey;
|
719
|
+
TransactionCompiler: typeof TransactionCompiler;
|
720
|
+
EthereumAbiValue: typeof EthereumAbiValue;
|
721
|
+
PrivateKey: typeof PrivateKey;
|
710
722
|
SegwitAddress: typeof SegwitAddress;
|
711
|
-
Curve: typeof Curve;
|
712
|
-
EthereumAbi: typeof EthereumAbi;
|
713
|
-
EthereumAbiFunction: typeof EthereumAbiFunction;
|
714
|
-
Base64: typeof Base64;
|
715
|
-
EthereumChainID: typeof EthereumChainID;
|
716
|
-
NEARAccount: typeof NEARAccount;
|
717
|
-
CoinTypeConfiguration: typeof CoinTypeConfiguration;
|
718
|
-
HDWallet: typeof HDWallet;
|
719
|
-
AnyAddress: typeof AnyAddress;
|
720
723
|
AESPaddingMode: typeof AESPaddingMode;
|
721
|
-
|
722
|
-
Blockchain: typeof Blockchain;
|
723
|
-
BitcoinAddress: typeof BitcoinAddress;
|
724
|
-
SS58AddressType: typeof SS58AddressType;
|
725
|
-
StellarVersionByte: typeof StellarVersionByte;
|
724
|
+
Base64: typeof Base64;
|
726
725
|
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
727
726
|
BitcoinScript: typeof BitcoinScript;
|
728
|
-
|
729
|
-
|
727
|
+
CoinType: typeof CoinType;
|
728
|
+
Blockchain: typeof Blockchain;
|
729
|
+
RippleXAddress: typeof RippleXAddress;
|
730
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
|
+
NEARAccount: typeof NEARAccount;
|
738
|
+
Hash: typeof Hash;
|
739
|
+
Mnemonic: typeof Mnemonic;
|
740
|
+
CoinTypeConfiguration: typeof CoinTypeConfiguration;
|
741
|
+
Derivation: typeof Derivation;
|
742
|
+
THORChainSwap: typeof THORChainSwap;
|
743
|
+
Cardano: typeof Cardano;
|
744
|
+
EthereumAbi: typeof EthereumAbi;
|
745
|
+
BitcoinAddress: typeof BitcoinAddress;
|
746
|
+
DerivationPath: typeof DerivationPath;
|
731
747
|
PrivateKeyType: typeof PrivateKeyType;
|
732
|
-
|
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;
|
733
759
|
describeCurve: typeof describeCurve;
|
734
760
|
describeHRP: typeof describeHRP;
|
761
|
+
describeStellarPassphrase: typeof describeStellarPassphrase;
|
735
762
|
}
|