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