@trustwallet/wallet-core 2.9.4 → 2.9.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.
@@ -14452,6 +14452,9 @@ export namespace TW {
|
|
14452
14452
|
|
14453
14453
|
/** SigningOutput signedTransaction */
|
14454
14454
|
signedTransaction?: (Uint8Array|null);
|
14455
|
+
|
14456
|
+
/** SigningOutput hash */
|
14457
|
+
hash?: (Uint8Array|null);
|
14455
14458
|
}
|
14456
14459
|
|
14457
14460
|
/** Represents a SigningOutput. */
|
@@ -14466,6 +14469,9 @@ export namespace TW {
|
|
14466
14469
|
/** SigningOutput signedTransaction. */
|
14467
14470
|
public signedTransaction: Uint8Array;
|
14468
14471
|
|
14472
|
+
/** SigningOutput hash. */
|
14473
|
+
public hash: Uint8Array;
|
14474
|
+
|
14469
14475
|
/**
|
14470
14476
|
* Creates a new SigningOutput instance using the specified properties.
|
14471
14477
|
* @param [properties] Properties to set
|
@@ -42351,6 +42351,7 @@
|
|
42351
42351
|
* @memberof TW.NEAR.Proto
|
42352
42352
|
* @interface ISigningOutput
|
42353
42353
|
* @property {Uint8Array|null} [signedTransaction] SigningOutput signedTransaction
|
42354
|
+
* @property {Uint8Array|null} [hash] SigningOutput hash
|
42354
42355
|
*/
|
42355
42356
|
|
42356
42357
|
/**
|
@@ -42376,6 +42377,14 @@
|
|
42376
42377
|
*/
|
42377
42378
|
SigningOutput.prototype.signedTransaction = $util.newBuffer([]);
|
42378
42379
|
|
42380
|
+
/**
|
42381
|
+
* SigningOutput hash.
|
42382
|
+
* @member {Uint8Array} hash
|
42383
|
+
* @memberof TW.NEAR.Proto.SigningOutput
|
42384
|
+
* @instance
|
42385
|
+
*/
|
42386
|
+
SigningOutput.prototype.hash = $util.newBuffer([]);
|
42387
|
+
|
42379
42388
|
/**
|
42380
42389
|
* Creates a new SigningOutput instance using the specified properties.
|
42381
42390
|
* @function create
|
@@ -42402,6 +42411,8 @@
|
|
42402
42411
|
writer = $Writer.create();
|
42403
42412
|
if (message.signedTransaction != null && Object.hasOwnProperty.call(message, "signedTransaction"))
|
42404
42413
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signedTransaction);
|
42414
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
42415
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
|
42405
42416
|
return writer;
|
42406
42417
|
};
|
42407
42418
|
|
@@ -42426,6 +42437,9 @@
|
|
42426
42437
|
case 1:
|
42427
42438
|
message.signedTransaction = reader.bytes();
|
42428
42439
|
break;
|
42440
|
+
case 2:
|
42441
|
+
message.hash = reader.bytes();
|
42442
|
+
break;
|
42429
42443
|
default:
|
42430
42444
|
reader.skipType(tag & 7);
|
42431
42445
|
break;
|
@@ -42448,6 +42462,9 @@
|
|
42448
42462
|
if (message.signedTransaction != null && message.hasOwnProperty("signedTransaction"))
|
42449
42463
|
if (!(message.signedTransaction && typeof message.signedTransaction.length === "number" || $util.isString(message.signedTransaction)))
|
42450
42464
|
return "signedTransaction: buffer expected";
|
42465
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
42466
|
+
if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
|
42467
|
+
return "hash: buffer expected";
|
42451
42468
|
return null;
|
42452
42469
|
};
|
42453
42470
|
|
@@ -42468,6 +42485,11 @@
|
|
42468
42485
|
$util.base64.decode(object.signedTransaction, message.signedTransaction = $util.newBuffer($util.base64.length(object.signedTransaction)), 0);
|
42469
42486
|
else if (object.signedTransaction.length)
|
42470
42487
|
message.signedTransaction = object.signedTransaction;
|
42488
|
+
if (object.hash != null)
|
42489
|
+
if (typeof object.hash === "string")
|
42490
|
+
$util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
|
42491
|
+
else if (object.hash.length)
|
42492
|
+
message.hash = object.hash;
|
42471
42493
|
return message;
|
42472
42494
|
};
|
42473
42495
|
|
@@ -42484,7 +42506,7 @@
|
|
42484
42506
|
if (!options)
|
42485
42507
|
options = {};
|
42486
42508
|
var object = {};
|
42487
|
-
if (options.defaults)
|
42509
|
+
if (options.defaults) {
|
42488
42510
|
if (options.bytes === String)
|
42489
42511
|
object.signedTransaction = "";
|
42490
42512
|
else {
|
@@ -42492,8 +42514,18 @@
|
|
42492
42514
|
if (options.bytes !== Array)
|
42493
42515
|
object.signedTransaction = $util.newBuffer(object.signedTransaction);
|
42494
42516
|
}
|
42517
|
+
if (options.bytes === String)
|
42518
|
+
object.hash = "";
|
42519
|
+
else {
|
42520
|
+
object.hash = [];
|
42521
|
+
if (options.bytes !== Array)
|
42522
|
+
object.hash = $util.newBuffer(object.hash);
|
42523
|
+
}
|
42524
|
+
}
|
42495
42525
|
if (message.signedTransaction != null && message.hasOwnProperty("signedTransaction"))
|
42496
42526
|
object.signedTransaction = options.bytes === String ? $util.base64.encode(message.signedTransaction, 0, message.signedTransaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.signedTransaction) : message.signedTransaction;
|
42527
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
42528
|
+
object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
|
42497
42529
|
return object;
|
42498
42530
|
};
|
42499
42531
|
|
@@ -0,0 +1,638 @@
|
|
1
|
+
// Copyright © 2017-2022 Trust Wallet.
|
2
|
+
//
|
3
|
+
// This file is part of Trust. The full Trust copyright notice, including
|
4
|
+
// terms governing use, modification, and redistribution, is contained in the
|
5
|
+
// file LICENSE at the root of the source code distribution tree.
|
6
|
+
//
|
7
|
+
// This is a GENERATED FILE, changes made here WILL BE LOST.
|
8
|
+
//
|
9
|
+
export class AnySigner {
|
10
|
+
static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
11
|
+
static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
12
|
+
static supportsJSON(coin: CoinType): boolean;
|
13
|
+
}
|
14
|
+
export namespace HexCoding {
|
15
|
+
export function decode(hex: string): Uint8Array;
|
16
|
+
export function encode(buffer: Uint8Array | Buffer): string;
|
17
|
+
}
|
18
|
+
export class HDWallet {
|
19
|
+
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
20
|
+
static create(strength: number, passphrase: string): HDWallet;
|
21
|
+
static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
|
22
|
+
static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
|
23
|
+
static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
|
24
|
+
seed(): Uint8Array;
|
25
|
+
mnemonic(): string;
|
26
|
+
entropy(): Uint8Array;
|
27
|
+
getMasterKey(curve: Curve): PrivateKey;
|
28
|
+
getKeyForCoin(coin: CoinType): PrivateKey;
|
29
|
+
getAddressForCoin(coin: CoinType): string;
|
30
|
+
getKey(coin: CoinType, derivationPath: string): PrivateKey;
|
31
|
+
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
32
|
+
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
33
|
+
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
34
|
+
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, version: HDVersion, account: number): string;
|
35
|
+
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, version: HDVersion, account: number): string;
|
36
|
+
delete(): void;
|
37
|
+
}
|
38
|
+
export class SolanaAddress {
|
39
|
+
static createWithString(string: string): SolanaAddress;
|
40
|
+
description(): string;
|
41
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
42
|
+
delete(): void;
|
43
|
+
}
|
44
|
+
export class PrivateKey {
|
45
|
+
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
46
|
+
static create(): PrivateKey;
|
47
|
+
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
48
|
+
static createCopy(key: PrivateKey): PrivateKey;
|
49
|
+
data(): Uint8Array;
|
50
|
+
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
51
|
+
getPublicKeyNist256p1(): PublicKey;
|
52
|
+
getPublicKeyEd25519(): PublicKey;
|
53
|
+
getPublicKeyEd25519Blake2b(): PublicKey;
|
54
|
+
getPublicKeyEd25519Extended(): PublicKey;
|
55
|
+
getPublicKeyCurve25519(): PublicKey;
|
56
|
+
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
57
|
+
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
58
|
+
signAsDER(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
59
|
+
signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
60
|
+
delete(): void;
|
61
|
+
}
|
62
|
+
export class BitcoinScript {
|
63
|
+
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
64
|
+
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
65
|
+
static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
66
|
+
static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
67
|
+
static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
68
|
+
static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
69
|
+
static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
|
70
|
+
static hashTypeForCoin(coinType: CoinType): number;
|
71
|
+
static create(): BitcoinScript;
|
72
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinScript;
|
73
|
+
static createCopy(script: BitcoinScript): BitcoinScript;
|
74
|
+
size(): number;
|
75
|
+
data(): Uint8Array;
|
76
|
+
scriptHash(): Uint8Array;
|
77
|
+
isPayToScriptHash(): boolean;
|
78
|
+
isPayToWitnessScriptHash(): boolean;
|
79
|
+
isPayToWitnessPublicKeyHash(): boolean;
|
80
|
+
isWitnessProgram(): boolean;
|
81
|
+
matchPayToPubkey(): Uint8Array;
|
82
|
+
matchPayToPubkeyHash(): Uint8Array;
|
83
|
+
matchPayToScriptHash(): Uint8Array;
|
84
|
+
matchPayToWitnessPublicKeyHash(): Uint8Array;
|
85
|
+
matchPayToWitnessScriptHash(): Uint8Array;
|
86
|
+
encode(): Uint8Array;
|
87
|
+
delete(): void;
|
88
|
+
}
|
89
|
+
export class Derivation {
|
90
|
+
value: number;
|
91
|
+
static default: Derivation;
|
92
|
+
static custom: Derivation;
|
93
|
+
static bitcoinSegwit: Derivation;
|
94
|
+
static bitcoinLegacy: Derivation;
|
95
|
+
static litecoinLegacy: Derivation;
|
96
|
+
static solanaSolana: Derivation;
|
97
|
+
}
|
98
|
+
export class AnyAddress {
|
99
|
+
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
100
|
+
static isValid(string: string, coin: CoinType): boolean;
|
101
|
+
static createWithString(string: string, coin: CoinType): AnyAddress;
|
102
|
+
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
103
|
+
description(): string;
|
104
|
+
coin(): CoinType;
|
105
|
+
data(): Uint8Array;
|
106
|
+
delete(): void;
|
107
|
+
}
|
108
|
+
export class Account {
|
109
|
+
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
110
|
+
address(): string;
|
111
|
+
derivation(): Derivation;
|
112
|
+
derivationPath(): string;
|
113
|
+
publicKey(): string;
|
114
|
+
extendedPublicKey(): string;
|
115
|
+
coin(): CoinType;
|
116
|
+
delete(): void;
|
117
|
+
}
|
118
|
+
export class DataVector {
|
119
|
+
static create(): DataVector;
|
120
|
+
static createWithData(data: Uint8Array | Buffer): DataVector;
|
121
|
+
size(): number;
|
122
|
+
add(data: Uint8Array | Buffer): void;
|
123
|
+
get(index: number): Uint8Array;
|
124
|
+
delete(): void;
|
125
|
+
}
|
126
|
+
export class Curve {
|
127
|
+
value: number;
|
128
|
+
static secp256k1: Curve;
|
129
|
+
static ed25519: Curve;
|
130
|
+
static ed25519Blake2bNano: Curve;
|
131
|
+
static curve25519: Curve;
|
132
|
+
static nist256p1: Curve;
|
133
|
+
static ed25519Extended: Curve;
|
134
|
+
}
|
135
|
+
|
136
|
+
declare function describeCurve(value: Curve): string;
|
137
|
+
|
138
|
+
export class RippleXAddress {
|
139
|
+
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
140
|
+
static isValidString(string: string): boolean;
|
141
|
+
static createWithString(string: string): RippleXAddress;
|
142
|
+
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
143
|
+
description(): string;
|
144
|
+
tag(): number;
|
145
|
+
delete(): void;
|
146
|
+
}
|
147
|
+
export class EthereumAbiValue {
|
148
|
+
static encodeBool(value: boolean): Uint8Array;
|
149
|
+
static encodeInt32(value: number): Uint8Array;
|
150
|
+
static encodeUInt32(value: number): Uint8Array;
|
151
|
+
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
152
|
+
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
153
|
+
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
154
|
+
static encodeString(value: string): Uint8Array;
|
155
|
+
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
156
|
+
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
157
|
+
static decodeUInt256(input: Uint8Array | Buffer): string;
|
158
|
+
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
159
|
+
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
160
|
+
}
|
161
|
+
export class TransactionCompiler {
|
162
|
+
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
163
|
+
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
164
|
+
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
165
|
+
}
|
166
|
+
export class AESPaddingMode {
|
167
|
+
value: number;
|
168
|
+
static zero: AESPaddingMode;
|
169
|
+
static pkcs7: AESPaddingMode;
|
170
|
+
}
|
171
|
+
export class EthereumAbi {
|
172
|
+
static encode(fn: EthereumAbiFunction): Uint8Array;
|
173
|
+
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
174
|
+
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
175
|
+
static encodeTyped(messageJson: string): Uint8Array;
|
176
|
+
}
|
177
|
+
export class PBKDF2 {
|
178
|
+
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
179
|
+
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
180
|
+
}
|
181
|
+
export class FIOAccount {
|
182
|
+
static createWithString(string: string): FIOAccount;
|
183
|
+
description(): string;
|
184
|
+
delete(): void;
|
185
|
+
}
|
186
|
+
export class HRP {
|
187
|
+
value: number;
|
188
|
+
static unknown: HRP;
|
189
|
+
static bitcoin: HRP;
|
190
|
+
static litecoin: HRP;
|
191
|
+
static viacoin: HRP;
|
192
|
+
static groestlcoin: HRP;
|
193
|
+
static digiByte: HRP;
|
194
|
+
static monacoin: HRP;
|
195
|
+
static cosmos: HRP;
|
196
|
+
static bitcoinCash: HRP;
|
197
|
+
static bitcoinGold: HRP;
|
198
|
+
static ioTeX: HRP;
|
199
|
+
static zilliqa: HRP;
|
200
|
+
static terra: HRP;
|
201
|
+
static cryptoOrg: HRP;
|
202
|
+
static kava: HRP;
|
203
|
+
static oasis: HRP;
|
204
|
+
static bluzelle: HRP;
|
205
|
+
static bandChain: HRP;
|
206
|
+
static elrond: HRP;
|
207
|
+
static binance: HRP;
|
208
|
+
static ecash: HRP;
|
209
|
+
static thorchain: HRP;
|
210
|
+
static harmony: HRP;
|
211
|
+
static cardano: HRP;
|
212
|
+
static qtum: HRP;
|
213
|
+
static osmosis: HRP;
|
214
|
+
static nativeEvmos: HRP;
|
215
|
+
}
|
216
|
+
|
217
|
+
declare function describeHRP(value: HRP): string;
|
218
|
+
|
219
|
+
export class AES {
|
220
|
+
static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
221
|
+
static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
222
|
+
static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
223
|
+
static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
224
|
+
}
|
225
|
+
export class SS58AddressType {
|
226
|
+
value: number;
|
227
|
+
static polkadot: SS58AddressType;
|
228
|
+
static kusama: SS58AddressType;
|
229
|
+
}
|
230
|
+
export class THORChainSwap {
|
231
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
232
|
+
}
|
233
|
+
export class Blockchain {
|
234
|
+
value: number;
|
235
|
+
static bitcoin: Blockchain;
|
236
|
+
static ethereum: Blockchain;
|
237
|
+
static vechain: Blockchain;
|
238
|
+
static tron: Blockchain;
|
239
|
+
static icon: Blockchain;
|
240
|
+
static binance: Blockchain;
|
241
|
+
static ripple: Blockchain;
|
242
|
+
static tezos: Blockchain;
|
243
|
+
static nimiq: Blockchain;
|
244
|
+
static stellar: Blockchain;
|
245
|
+
static aion: Blockchain;
|
246
|
+
static cosmos: Blockchain;
|
247
|
+
static theta: Blockchain;
|
248
|
+
static ontology: Blockchain;
|
249
|
+
static zilliqa: Blockchain;
|
250
|
+
static ioTeX: Blockchain;
|
251
|
+
static eos: Blockchain;
|
252
|
+
static nano: Blockchain;
|
253
|
+
static nuls: Blockchain;
|
254
|
+
static waves: Blockchain;
|
255
|
+
static aeternity: Blockchain;
|
256
|
+
static nebulas: Blockchain;
|
257
|
+
static fio: Blockchain;
|
258
|
+
static solana: Blockchain;
|
259
|
+
static harmony: Blockchain;
|
260
|
+
static near: Blockchain;
|
261
|
+
static algorand: Blockchain;
|
262
|
+
static polkadot: Blockchain;
|
263
|
+
static cardano: Blockchain;
|
264
|
+
static neo: Blockchain;
|
265
|
+
static filecoin: Blockchain;
|
266
|
+
static elrondNetwork: Blockchain;
|
267
|
+
static oasisNetwork: Blockchain;
|
268
|
+
static decred: Blockchain;
|
269
|
+
static zcash: Blockchain;
|
270
|
+
static groestlcoin: Blockchain;
|
271
|
+
static thorchain: Blockchain;
|
272
|
+
static ronin: Blockchain;
|
273
|
+
static kusama: Blockchain;
|
274
|
+
}
|
275
|
+
export class GroestlcoinAddress {
|
276
|
+
static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
|
277
|
+
static isValidString(string: string): boolean;
|
278
|
+
static createWithString(string: string): GroestlcoinAddress;
|
279
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
280
|
+
description(): string;
|
281
|
+
delete(): void;
|
282
|
+
}
|
283
|
+
export class HDVersion {
|
284
|
+
value: number;
|
285
|
+
static none: HDVersion;
|
286
|
+
static xpub: HDVersion;
|
287
|
+
static xprv: HDVersion;
|
288
|
+
static ypub: HDVersion;
|
289
|
+
static yprv: HDVersion;
|
290
|
+
static zpub: HDVersion;
|
291
|
+
static zprv: HDVersion;
|
292
|
+
static ltub: HDVersion;
|
293
|
+
static ltpv: HDVersion;
|
294
|
+
static mtub: HDVersion;
|
295
|
+
static mtpv: HDVersion;
|
296
|
+
static dpub: HDVersion;
|
297
|
+
static dprv: HDVersion;
|
298
|
+
static dgub: HDVersion;
|
299
|
+
static dgpv: HDVersion;
|
300
|
+
}
|
301
|
+
export class PublicKeyType {
|
302
|
+
value: number;
|
303
|
+
static secp256k1: PublicKeyType;
|
304
|
+
static secp256k1Extended: PublicKeyType;
|
305
|
+
static nist256p1: PublicKeyType;
|
306
|
+
static nist256p1Extended: PublicKeyType;
|
307
|
+
static ed25519: PublicKeyType;
|
308
|
+
static ed25519Blake2b: PublicKeyType;
|
309
|
+
static curve25519: PublicKeyType;
|
310
|
+
static ed25519Extended: PublicKeyType;
|
311
|
+
}
|
312
|
+
export class Hash {
|
313
|
+
static sha1(data: Uint8Array | Buffer): Uint8Array;
|
314
|
+
static sha256(data: Uint8Array | Buffer): Uint8Array;
|
315
|
+
static sha512(data: Uint8Array | Buffer): Uint8Array;
|
316
|
+
static sha512_256(data: Uint8Array | Buffer): Uint8Array;
|
317
|
+
static keccak256(data: Uint8Array | Buffer): Uint8Array;
|
318
|
+
static keccak512(data: Uint8Array | Buffer): Uint8Array;
|
319
|
+
static sha3_256(data: Uint8Array | Buffer): Uint8Array;
|
320
|
+
static sha3_512(data: Uint8Array | Buffer): Uint8Array;
|
321
|
+
static ripemd(data: Uint8Array | Buffer): Uint8Array;
|
322
|
+
static blake256(data: Uint8Array | Buffer): Uint8Array;
|
323
|
+
static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
|
324
|
+
static groestl512(data: Uint8Array | Buffer): Uint8Array;
|
325
|
+
static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
|
326
|
+
static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
327
|
+
static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
328
|
+
static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
|
329
|
+
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
330
|
+
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
331
|
+
}
|
332
|
+
export class Cardano {
|
333
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
334
|
+
}
|
335
|
+
export class StellarVersionByte {
|
336
|
+
value: number;
|
337
|
+
static accountID: StellarVersionByte;
|
338
|
+
static seed: StellarVersionByte;
|
339
|
+
static preAuthTX: StellarVersionByte;
|
340
|
+
static sha256Hash: StellarVersionByte;
|
341
|
+
}
|
342
|
+
export class StellarPassphrase {
|
343
|
+
value: number;
|
344
|
+
static stellar: StellarPassphrase;
|
345
|
+
static kin: StellarPassphrase;
|
346
|
+
}
|
347
|
+
|
348
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
349
|
+
|
350
|
+
export class CoinType {
|
351
|
+
value: number;
|
352
|
+
static aeternity: CoinType;
|
353
|
+
static aion: CoinType;
|
354
|
+
static binance: CoinType;
|
355
|
+
static bitcoin: CoinType;
|
356
|
+
static bitcoinCash: CoinType;
|
357
|
+
static bitcoinGold: CoinType;
|
358
|
+
static callisto: CoinType;
|
359
|
+
static cardano: CoinType;
|
360
|
+
static cosmos: CoinType;
|
361
|
+
static dash: CoinType;
|
362
|
+
static decred: CoinType;
|
363
|
+
static digiByte: CoinType;
|
364
|
+
static dogecoin: CoinType;
|
365
|
+
static eos: CoinType;
|
366
|
+
static ethereum: CoinType;
|
367
|
+
static ethereumClassic: CoinType;
|
368
|
+
static fio: CoinType;
|
369
|
+
static goChain: CoinType;
|
370
|
+
static groestlcoin: CoinType;
|
371
|
+
static icon: CoinType;
|
372
|
+
static ioTeX: CoinType;
|
373
|
+
static kava: CoinType;
|
374
|
+
static kin: CoinType;
|
375
|
+
static litecoin: CoinType;
|
376
|
+
static monacoin: CoinType;
|
377
|
+
static nebulas: CoinType;
|
378
|
+
static nuls: CoinType;
|
379
|
+
static nano: CoinType;
|
380
|
+
static near: CoinType;
|
381
|
+
static nimiq: CoinType;
|
382
|
+
static ontology: CoinType;
|
383
|
+
static poanetwork: CoinType;
|
384
|
+
static qtum: CoinType;
|
385
|
+
static xrp: CoinType;
|
386
|
+
static solana: CoinType;
|
387
|
+
static stellar: CoinType;
|
388
|
+
static tezos: CoinType;
|
389
|
+
static theta: CoinType;
|
390
|
+
static thunderToken: CoinType;
|
391
|
+
static neo: CoinType;
|
392
|
+
static tomoChain: CoinType;
|
393
|
+
static tron: CoinType;
|
394
|
+
static veChain: CoinType;
|
395
|
+
static viacoin: CoinType;
|
396
|
+
static wanchain: CoinType;
|
397
|
+
static zcash: CoinType;
|
398
|
+
static firo: CoinType;
|
399
|
+
static zilliqa: CoinType;
|
400
|
+
static zelcash: CoinType;
|
401
|
+
static ravencoin: CoinType;
|
402
|
+
static waves: CoinType;
|
403
|
+
static terra: CoinType;
|
404
|
+
static harmony: CoinType;
|
405
|
+
static algorand: CoinType;
|
406
|
+
static kusama: CoinType;
|
407
|
+
static polkadot: CoinType;
|
408
|
+
static filecoin: CoinType;
|
409
|
+
static elrond: CoinType;
|
410
|
+
static bandChain: CoinType;
|
411
|
+
static smartChainLegacy: CoinType;
|
412
|
+
static smartChain: CoinType;
|
413
|
+
static oasis: CoinType;
|
414
|
+
static polygon: CoinType;
|
415
|
+
static thorchain: CoinType;
|
416
|
+
static bluzelle: CoinType;
|
417
|
+
static optimism: CoinType;
|
418
|
+
static arbitrum: CoinType;
|
419
|
+
static ecochain: CoinType;
|
420
|
+
static avalancheCChain: CoinType;
|
421
|
+
static xdai: CoinType;
|
422
|
+
static fantom: CoinType;
|
423
|
+
static cryptoOrg: CoinType;
|
424
|
+
static celo: CoinType;
|
425
|
+
static ronin: CoinType;
|
426
|
+
static osmosis: CoinType;
|
427
|
+
static ecash: CoinType;
|
428
|
+
static cronosChain: CoinType;
|
429
|
+
static smartBitcoinCash: CoinType;
|
430
|
+
static kuCoinCommunityChain: CoinType;
|
431
|
+
static boba: CoinType;
|
432
|
+
static metis: CoinType;
|
433
|
+
static aurora: CoinType;
|
434
|
+
static evmos: CoinType;
|
435
|
+
static nativeEvmos: CoinType;
|
436
|
+
static moonriver: CoinType;
|
437
|
+
static moonbeam: CoinType;
|
438
|
+
static klaytn: CoinType;
|
439
|
+
}
|
440
|
+
export class StoredKeyEncryptionLevel {
|
441
|
+
value: number;
|
442
|
+
static default: StoredKeyEncryptionLevel;
|
443
|
+
static minimal: StoredKeyEncryptionLevel;
|
444
|
+
static weak: StoredKeyEncryptionLevel;
|
445
|
+
static standard: StoredKeyEncryptionLevel;
|
446
|
+
}
|
447
|
+
export class EthereumAbiFunction {
|
448
|
+
static createWithString(name: string): EthereumAbiFunction;
|
449
|
+
getType(): string;
|
450
|
+
addParamUInt8(val: number, isOutput: boolean): number;
|
451
|
+
addParamUInt16(val: number, isOutput: boolean): number;
|
452
|
+
addParamUInt32(val: number, isOutput: boolean): number;
|
453
|
+
addParamUInt64(val: number, isOutput: boolean): number;
|
454
|
+
addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
455
|
+
addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
456
|
+
addParamInt8(val: number, isOutput: boolean): number;
|
457
|
+
addParamInt16(val: number, isOutput: boolean): number;
|
458
|
+
addParamInt32(val: number, isOutput: boolean): number;
|
459
|
+
addParamInt64(val: number, isOutput: boolean): number;
|
460
|
+
addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
461
|
+
addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
462
|
+
addParamBool(val: boolean, isOutput: boolean): number;
|
463
|
+
addParamString(val: string, isOutput: boolean): number;
|
464
|
+
addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
|
465
|
+
addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
|
466
|
+
addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
467
|
+
addParamArray(isOutput: boolean): number;
|
468
|
+
getParamUInt8(idx: number, isOutput: boolean): number;
|
469
|
+
getParamUInt64(idx: number, isOutput: boolean): number;
|
470
|
+
getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
|
471
|
+
getParamBool(idx: number, isOutput: boolean): boolean;
|
472
|
+
getParamString(idx: number, isOutput: boolean): string;
|
473
|
+
getParamAddress(idx: number, isOutput: boolean): Uint8Array;
|
474
|
+
addInArrayParamUInt8(arrayIdx: number, val: number): number;
|
475
|
+
addInArrayParamUInt16(arrayIdx: number, val: number): number;
|
476
|
+
addInArrayParamUInt32(arrayIdx: number, val: number): number;
|
477
|
+
addInArrayParamUInt64(arrayIdx: number, val: number): number;
|
478
|
+
addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
479
|
+
addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
480
|
+
addInArrayParamInt8(arrayIdx: number, val: number): number;
|
481
|
+
addInArrayParamInt16(arrayIdx: number, val: number): number;
|
482
|
+
addInArrayParamInt32(arrayIdx: number, val: number): number;
|
483
|
+
addInArrayParamInt64(arrayIdx: number, val: number): number;
|
484
|
+
addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
485
|
+
addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
486
|
+
addInArrayParamBool(arrayIdx: number, val: boolean): number;
|
487
|
+
addInArrayParamString(arrayIdx: number, val: string): number;
|
488
|
+
addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
|
489
|
+
addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
|
490
|
+
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
491
|
+
delete(): void;
|
492
|
+
}
|
493
|
+
export class CoinTypeConfiguration {
|
494
|
+
static getSymbol(type: CoinType): string;
|
495
|
+
static getDecimals(type: CoinType): number;
|
496
|
+
static getTransactionURL(type: CoinType, transactionID: string): string;
|
497
|
+
static getAccountURL(type: CoinType, accountID: string): string;
|
498
|
+
static getID(type: CoinType): string;
|
499
|
+
static getName(type: CoinType): string;
|
500
|
+
}
|
501
|
+
export class BitcoinAddress {
|
502
|
+
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
503
|
+
static isValid(data: Uint8Array | Buffer): boolean;
|
504
|
+
static isValidString(string: string): boolean;
|
505
|
+
static createWithString(string: string): BitcoinAddress;
|
506
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
507
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
508
|
+
description(): string;
|
509
|
+
prefix(): number;
|
510
|
+
keyhash(): Uint8Array;
|
511
|
+
delete(): void;
|
512
|
+
}
|
513
|
+
export class SegwitAddress {
|
514
|
+
static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
|
515
|
+
static isValidString(string: string): boolean;
|
516
|
+
static createWithString(string: string): SegwitAddress;
|
517
|
+
static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
|
518
|
+
description(): string;
|
519
|
+
hrp(): HRP;
|
520
|
+
witnessVersion(): number;
|
521
|
+
witnessProgram(): Uint8Array;
|
522
|
+
delete(): void;
|
523
|
+
}
|
524
|
+
export class StellarMemoType {
|
525
|
+
value: number;
|
526
|
+
static none: StellarMemoType;
|
527
|
+
static text: StellarMemoType;
|
528
|
+
static id: StellarMemoType;
|
529
|
+
static hash: StellarMemoType;
|
530
|
+
static return: StellarMemoType;
|
531
|
+
}
|
532
|
+
export class Mnemonic {
|
533
|
+
static isValid(mnemonic: string): boolean;
|
534
|
+
static isValidWord(word: string): boolean;
|
535
|
+
static suggest(prefix: string): string;
|
536
|
+
}
|
537
|
+
export class NEARAccount {
|
538
|
+
static createWithString(string: string): NEARAccount;
|
539
|
+
description(): string;
|
540
|
+
delete(): void;
|
541
|
+
}
|
542
|
+
export class StoredKey {
|
543
|
+
static load(path: string): StoredKey;
|
544
|
+
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
545
|
+
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
546
|
+
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
547
|
+
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
548
|
+
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
549
|
+
identifier(): string;
|
550
|
+
name(): string;
|
551
|
+
isMnemonic(): boolean;
|
552
|
+
accountCount(): number;
|
553
|
+
encryptionParameters(): string;
|
554
|
+
account(index: number): Account;
|
555
|
+
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
556
|
+
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
557
|
+
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
558
|
+
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
559
|
+
removeAccountForCoin(coin: CoinType): void;
|
560
|
+
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
561
|
+
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
562
|
+
store(path: string): boolean;
|
563
|
+
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
564
|
+
decryptMnemonic(password: Uint8Array | Buffer): string;
|
565
|
+
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
566
|
+
wallet(password: Uint8Array | Buffer): HDWallet;
|
567
|
+
exportJSON(): Uint8Array;
|
568
|
+
fixAddresses(password: Uint8Array | Buffer): boolean;
|
569
|
+
delete(): void;
|
570
|
+
}
|
571
|
+
export class PublicKey {
|
572
|
+
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
573
|
+
static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
|
574
|
+
static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
|
575
|
+
isCompressed(): boolean;
|
576
|
+
compressed(): PublicKey;
|
577
|
+
uncompressed(): PublicKey;
|
578
|
+
data(): Uint8Array;
|
579
|
+
keyType(): PublicKeyType;
|
580
|
+
description(): string;
|
581
|
+
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
582
|
+
verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
583
|
+
verifySchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
584
|
+
delete(): void;
|
585
|
+
}
|
586
|
+
export class EthereumChainID {
|
587
|
+
value: number;
|
588
|
+
static ethereum: EthereumChainID;
|
589
|
+
static classic: EthereumChainID;
|
590
|
+
static poa: EthereumChainID;
|
591
|
+
static vechain: EthereumChainID;
|
592
|
+
static callisto: EthereumChainID;
|
593
|
+
static tomochain: EthereumChainID;
|
594
|
+
static polygon: EthereumChainID;
|
595
|
+
static thundertoken: EthereumChainID;
|
596
|
+
static gochain: EthereumChainID;
|
597
|
+
static celo: EthereumChainID;
|
598
|
+
static wanchain: EthereumChainID;
|
599
|
+
static cronos: EthereumChainID;
|
600
|
+
static optimism: EthereumChainID;
|
601
|
+
static xdai: EthereumChainID;
|
602
|
+
static smartbch: EthereumChainID;
|
603
|
+
static fantom: EthereumChainID;
|
604
|
+
static boba: EthereumChainID;
|
605
|
+
static kcc: EthereumChainID;
|
606
|
+
static heco: EthereumChainID;
|
607
|
+
static metis: EthereumChainID;
|
608
|
+
static moonbeam: EthereumChainID;
|
609
|
+
static moonriver: EthereumChainID;
|
610
|
+
static ronin: EthereumChainID;
|
611
|
+
static klaytn: EthereumChainID;
|
612
|
+
static avalanchec: EthereumChainID;
|
613
|
+
static evmos: EthereumChainID;
|
614
|
+
static arbitrum: EthereumChainID;
|
615
|
+
static smartchain: EthereumChainID;
|
616
|
+
static aurora: EthereumChainID;
|
617
|
+
}
|
618
|
+
export class BitcoinSigHashType {
|
619
|
+
value: number;
|
620
|
+
static all: BitcoinSigHashType;
|
621
|
+
static none: BitcoinSigHashType;
|
622
|
+
static single: BitcoinSigHashType;
|
623
|
+
static fork: BitcoinSigHashType;
|
624
|
+
static forkBTG: BitcoinSigHashType;
|
625
|
+
}
|
626
|
+
export class Base58 {
|
627
|
+
static encode(data: Uint8Array | Buffer): string;
|
628
|
+
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
629
|
+
static decode(string: string): Uint8Array;
|
630
|
+
static decodeNoCheck(string: string): Uint8Array;
|
631
|
+
}
|
632
|
+
export class Purpose {
|
633
|
+
value: number;
|
634
|
+
static bip44: Purpose;
|
635
|
+
static bip49: Purpose;
|
636
|
+
static bip84: Purpose;
|
637
|
+
static bip1852: Purpose;
|
638
|
+
}
|
Binary file
|