-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMainWindow.txt
488 lines (390 loc) · 26 KB
/
MainWindow.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
mainWindow регестрируется в javascript по имени mainWindow
### How to work with TMH wallets
```shell
Q_INVOKABLE void createWallet(QString requestId, QString password);
# Generates Metahash wallet, puts this generated wallet to ~/.metahash_wallets/ named address.
# javascript is called after completion of this function
createWalletResultJs(requestid, publickey, address, exampleMessage, signature, errorNum, errorMessage, fullKeyPath)
Q_INVOKABLE void createWalletWatch(QString requestId, QString address);
# Creates Metahash watch wallet with address, puts this file wallet to ~/.metahash_wallets/ named address with .watch suffix.
# javascript is called after completion of this function
createWalletWatchResultJs(requestid, address, errorNum, errorMessage, fullKeyPath)
Q_INVOKABLE void checkWalletExists(QString requestId, QString address);
# Checks is wallet (any type) with address exists.
# javascript is called after completion of this function res: true/false
checkWalletExistsResultJs(requestid, res, errorNum, errorMessage)
Q_INVOKABLE void removeWalletWatch(QString requestId, QString address);
# Removes Metahash watch wallet with address, file wallet to ~/.metahash_wallets/ named address with .watch suffix.
# javascript is called after completion of this function
removeWalletWatchResultJs(requestid, address, errorNum, errorMessage)
Q_INVOKABLE void checkWalletPassword(QString requestId, QString keyName, QString password);
# Проверяет правильность пароля от данного кошелька
# javascript is called after completion of this function
checkWalletPasswordResultJs(requestid, "Ok"/"Not ok", errorNum, errorMessage)
Q_INVOKABLE QString getAllWalletsJson();
# Gets the list of all metahash accounts.
# Result returns as a json array
Q_INVOKABLE QString getAllWalletsAndPathsJson();
# Gets the list of all metahash accounts. Result returns as a json array [{"address":"addr","path":"path"}]
Q_INVOKABLE QString getAllWalletsInfoJson();
# Gets the list of all metahash accounts. Result returns as a json array [{"address":"addr", "type":type, "path":"path"}]
# Type 1 - wallet with key
# Type 2 - watch wallet
Q_INVOKABLE void signMessage(QString requestId, QString address, QString text, QString password);
# Message's signing.
# javascript is called after completion of this function
signMessageResultJs(requestId, signature, publicKey, errorNum, errorMessage)
Q_INVOKABLE void signMessageV2(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString dataHex);
# signs the transaction in a new binary format
# value, fee, nonce - a string with decimal number
# Result returns to
signMessageV2ResultJs(requestId, signature, publicKey, txHex, errorNum, errorMessage)
Q_INVOKABLE void signMessageV3(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString dataHex, QString paramsJson);
# Sends transaction with C++ (like signMessageDelegate, but differs because of the data field)
# Result returns to
# if nonce empty, then calc nonce
signMessageV3ResultJs(requestId, "Ok/Not ok", errorNum, errorMessage)
# If Ok returns, events from transactions are to be expected (txsSendedTxJs etc.). Ok status doesn't guarantee that the transaction has been processed correctly on the server.
Q_INVOKABLE void signMessageDelegate(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString valueDelegate, QString paramsJson);
# signs the transaction in a new binary format with delegate data
# if nonce empty, then calc nonce
paramsJson - json of {"countServersSend": 3, "countServersGet": 3, "typeSend": "proxy", "typeGet": "torrent", "timeout_sec": 6} type
# Result returns to
signMessageDelegateResultJs(requestId, "Ok/Not ok", errorNum, errorMessage)
# If Ok returns, events from transactions are to be expected (txsSendedTxJs etc.). Ok status doesn't guarantee that the transaction has been processed correctly on the server.
Q_INVOKABLE void signMessageUnDelegate(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString valueDelegate, QString paramsJson);
# signs the transaction in a new binary format with delegate data
# if nonce empty, then calc nonce
paramsJson - json of {"countServersSend": 3, "countServersGet": 3, "typeSend": "proxy", "typeGet": "torrent", "timeout_sec": 6} type
# Result returns to
signMessageUnDelegateResultJs(requestId, "Ok/Not ok", errorNum, errorMessage)
# If Ok returns, events from transactions are to be expected (txsSendedTxJs etc.). Ok status doesn't guarantee that the transaction has been processed correctly on the server.
Q_INVOKABLE void checkAddress(QString requestId, QString address);
# To check the address for correctness. The result will return to the function:
checkAddressResultJs(requestId, "ok"/"not valid", errorNum, errorMessage)
Q_INVOKABLE void getOnePrivateKey(QString requestId, QString keyName, bool isCompact);
# Returns private key to the function
getOnePrivateKeyResultJs(requestId, key, errorNum, errorMessage)
# The isCompact parameter is used if you need a more compact format.
Q_INVOKABLE void createRsaKey(QString requestId, QString address, QString password);
# Generates rsa key for specified address.
# javascript is called after completion of this function
createRsaKeyResultJs(requestId, publicKeyHex, errorNum, errorMessage)
Q_INVOKABLE void copyRsaKey(QString requestId, QString address, QString pathPub, QString pathPriv);
# Копирует ключи по указанному пути в свой каталог.
# javascript is called after completion of this function
copyRsaKeyResultJs(requestId, "Ok", errorNum, errorMessage)
Q_INVOKABLE void copyRsaKeyToFolder(QString requestId, QString address, QString path);
# Копирует rsa ключи в указанный каталог.
# javascript is called after completion of this function
copyRsaKeyToFolderResultJs(requestId, "Ok", errorNum, errorMessage)
Q_INVOKABLE void getRsaPublicKey(QString requestId, QString address);
# Returns public key from rsa key
getRsaPublicKeyResultJs(requestId, publicKeyHex, errorNum, errorMessage)
Q_INVOKABLE void encryptMessage(QString requestId, QString publicKeyHex, QString message);
# Encrypt message generated via rsa public key
# javascript is called after completion of this function
encryptMessageResultJs(requestId, message, errorNum, errorMessage)
Q_INVOKABLE void decryptMessage(QString requestId, QString addr, QString password, QString encryptedMessageHex);
# Decrypts message generated via rsa key
# javascript is called after completion of this function
decryptMessageResultJs(requestId, message, errorNum, errorMessage)
Q_INVOKABLE void saveRawPrivKey(QString requestId, QString rawPrivKey, QString password);
# Saves private key
# rawPrivKey - unencrypted private key
# javascript is called after completion of this function
saveRawPrivkeyResultJs(requestId, address, errorNum, errorMessage)
Q_INVOKABLE void getRawPrivKey(QString requestId, QString address, QString password);
# Returns unencrypted private key
# javascript is called after completion of this function
getRawPrivkeyResultJs(requestId, result, errorNum, errorMessage)
Q_INVOKABLE void createV8Address(QString requestId, QString address, int nonce);
# Creates v8 contract address based on address and nonce
# javascript is called after completion of this function
createV8AddressResultJs(requestId, result, errorNum, errorMessage)
```
### How to work with MHC Metahash wallets
```shell
Q_INVOKABLE void createWalletMHC(QString requestId, QString password);
# Generates Metahash wallet, puts this generated wallet to ~/.metahash_wallets/ named address
# javascript is called after completion of this function
createWalletMHCResultJs(requestid, publickey, address, exampleMessage, signature, errorNum, errorMessage, fullKeyPath)
Q_INVOKABLE void createWalletWatchMHC(QString requestId, QString address);
# Creates Metahash watch wallet with address, puts this file wallet to ~/.metahash_wallets/ named address with .watch suffix.
# javascript is called after completion of this function
createWalletWatchMHCResultJs(requestid, address, errorNum, errorMessage, fullKeyPath)
Q_INVOKABLE void checkWalletExistsMHC(QString requestId, QString address);
# Checks is wallet (any type) with address exists.
# javascript is called after completion of this function res: true/false
checkWalletExistsMHCResultJs(requestid, res, errorNum, errorMessage)
Q_INVOKABLE void removeWalletWatchMHC(QString requestId, QString address);
# Removes Metahash watch wallet with address, file wallet to ~/.metahash_wallets/ named address with .watch suffix.
# javascript is called after completion of this function
removeWalletWatchMHCResultJs(requestid, address, errorNum, errorMessage)
Q_INVOKABLE void checkWalletPasswordMHC(QString requestId, QString keyName, QString password);
# Проверяет правильность пароля от данного кошелька
# javascript is called after completion of this function
checkWalletPasswordMHCResultJs(requestid, "Ok"/"Not ok", errorNum, errorMessage)
Q_INVOKABLE QString getAllMHCWalletsJson();
# Gets the list of all metahash accounts.
# Result returns as a json array
Q_INVOKABLE QString getAllMHCWalletsAndPathsJson();
# Gets the list of all metahash accounts.
# Result returns as a json array [{"address":"addr","path":"path"}]
Q_INVOKABLE QString getAllMHCWalletsInfoJson();
# Gets the list of all metahash accounts. Result returns as a json array [{"address":"addr", "type":type, "path":"path"}]
# Type 1 - wallet with key
# Type 2 - watch wallet
Q_INVOKABLE void signMessageMHC(QString requestId, QString address, QString text, QString password);
# Message's signing.
# javascript is called after completion of this function
signMessageMHCResultJs(requestId, signature, publicKey, errorNum, errorMessage)
Q_INVOKABLE void signMessageMHCV2(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString dataHex);
# signs the transaction in a new binary format
# value, fee, nonce - a string with decimal number
# Result returns to
signMessageMHCV2ResultJs(requestId, signature, publicKey, txHex, errorNum, errorMessage)
Q_INVOKABLE void signMessageMHCV3(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString dataHex, QString paramsJson);
# Sends transaction with C++ (like signMessageDelegate, but differs because of the data field)
# if nonce empty, then calc nonce
# Result returns to
signMessageMHCV3ResultJs(requestId, "Ok/Not ok", errorNum, errorMessage)
# If Ok returns, events from transactions are to be expected (txsSendedTxJs etc.). Ok status doesn't guarantee that the transaction has been processed correctly on the server.
Q_INVOKABLE void signMessageMHCDelegate(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString valueDelegate, QString paramsJson);
# signs the transaction in a new binary format with delegate data
# if nonce empty, then calc nonce
paramsJson - json of {"countServersSend": 3, "countServersGet": 3, "typeSend": "proxy", "typeGet": "torrent", "timeout_sec": 6} type
# Result returns to
signMessageDelegateMhcResultJs(requestId, "Ok/Not ok", errorNum, errorMessage)
# If Ok returns, events from transactions are to be expected (txsSendedTxJs etc.). Ok status doesn't guarantee that the transaction has been processed correctly on the server.
Q_INVOKABLE void signMessageMHCUnDelegate(QString requestId, QString keyName, QString password, QString toAddress, QString value, QString fee, QString nonce, QString valueDelegate, QString paramsJson);
# signs the transaction in a new binary format with delegate data
# if nonce empty, then calc nonce
paramsJson - json of {"countServersSend": 3, "countServersGet": 3, "typeSend": "proxy", "typeGet": "torrent", "timeout_sec": 6} type
# Result returns to
signMessageUnDelegateMhcResultJs(requestId, "Ok/Not ok", errorNum, errorMessage)
Q_INVOKABLE void checkAddress(QString requestId, QString address);
# To check the address for correctness. The result will return to the function:
checkAddressResultJs(requestId, "ok"/"not valid", errorNum, errorMessage)
Q_INVOKABLE void getOnePrivateKeyMHC(QString requestId, QString keyName, bool isCompact);
# Returns private key to the function
getOnePrivateKeyMHCResultJs(requestId, key, errorNum, errorMessage)
# The isCompact parameter is used if you need a more compact format.
Q_INVOKABLE void createRsaKeyMHC(QString requestId, QString address, QString password);
# Generates rsa key for specified address.
# javascript is called after completion of this function
createRsaKeyMHCResultJs(requestId, publicKeyHex, errorNum, errorMessage)
Q_INVOKABLE void copyRsaKeyMHC(QString requestId, QString address, QString pathPub, QString pathPriv);
# Копирует ключи по указанному пути в свой каталог.
# javascript is called after completion of this function
copyRsaKeyMHCResultJs(requestId, "Ok", errorNum, errorMessage)
Q_INVOKABLE void copyRsaKeyToFolderMHC(QString requestId, QString address, QString path);
# Копирует rsa ключи в указанный каталог.
# javascript is called after completion of this function
copyRsaKeyToFolderMHCResultJs(requestId, "Ok", errorNum, errorMessage)
Q_INVOKABLE void getRsaPublicKeyMHC(QString requestId, QString address);
# Returns public key from rsa key
getRsaPublicKeyMHCResultJs(requestId, publicKeyHex, errorNum, errorMessage)
Q_INVOKABLE void saveRawPrivKeyMHC(QString requestId, QString rawPrivKey, QString password);
# Saves private key
# rawPrivKey - unencrypted private key
# javascript is called after completion of this function
saveRawPrivkeyMHCResultJs(requestId, address, errorNum, errorMessage)
Q_INVOKABLE void getRawPrivKeyMHC(QString requestId, QString address, QString password);
# Returns unencrypted private key
# javascript is called after completion of this function
getRawPrivkeyMHCResultJs(requestId, result, errorNum, errorMessage)
Q_INVOKABLE void createV8AddressMHC(QString requestId, QString address, int nonce);
# Creates v8 contract address based on address and nonce
# javascript is called after completion of this function
createV8AddressMHCResultJs(requestId, result, errorNum, errorMessage)
```
### How to work with Ethereum wallets
```shell
Q_INVOKABLE void createWalletEth(QString requestId, QString password);
# Generates Ethereum wallet, puts the file to ~/.metahash_wallets/eth/
# javascript is called after completion of this function
createWalletEthResultJs(requestId, address, errorNum, errorMessage, fullKeyPath)
Q_INVOKABLE void signMessageEth(QString requestId, QString address, QString password, QString nonce, QString gasPrice, QString gasLimit, QString to, QString value, QString data);
# Generates the signed Ethereum transaction
# Parameters:
# address — address of the account
# password — password of the account
Further parameters are hexadecimal values prefixed with 0x
# When transferring tokens, "to" should be the token address, "value" == 0x0 (commonly), recipient and amount of tokens must be encoded in the data parameter
# Usually data parameter is equal to 0x
# javascript is called after completion of this function
signMessageEthResultJs(requestId, result, errorNum, errorMessage)
Q_INVOKABLE QString getAllEthWalletsJson();
# Gets the list of all ethereum accounts.
# Result returns as a json array
Q_INVOKABLE QString getAllEthWalletsAndPathsJson();
# Gets the list of all metahash accounts.
# Result returns as a json array
[{"address":"addr","path":"path"}]
Q_INVOKABLE void checkAddressEth(QString requestId, QString address);
# To check the address for correctness. The result will return to the function:
checkAddressEthResultJs(requestId, "ok"/"not valid", errorNum, errorMessage)
Q_INVOKABLE void getOnePrivateKeyEth(QString requestId, QString keyName);
# Returns private key to the function
getOnePrivateKeyEthResultJs(requestId, key, errorNum, errorMessage)
```
### How to work with Bitcoin wallet
```shell
Q_INVOKABLE void createWalletBtc(QString requestId);
Q_INVOKABLE void createWalletBtcPswd(QString requestId, QString password);
# Generates Bitcoin wallet, puts file to ~/.metahash_wallets/btc/
# javascript is called after completion of this function
createWalletBtcResultJs(requestId, address, errorNum, errorMessage, fullKeyPath)
Q_INVOKABLE void signMessageBtc(QString requestId, QString address, QString jsonInputs, QString toAddress, QString value, QString estimateComissionInSatoshi, QString fees);
Q_INVOKABLE void signMessageBtcPswd(QString requestId, QString address, QString password, QString jsonInputs, QString toAddress, QString value, QString estimateComissionInSatoshi, QString fees);
# Generating Bitcoin transaction
# Parameters:
# jsonInputs - utxos in the format [{"tx_hash": "string", "tx_index": figure, "scriptPubKey": "string", "value": "figure in the string in decimal format"}]
# value - is needed for sending. Possible variants: "all" or decimal number
# fees - Possible variants: "auto" or decimal number
# estimateComissionInSatoshi if there was "auto", here must be specified a decimal number
# javascript is called after completion of this function
signMessageBtcResultJs(requestId, result, errorNum, errorMessage)
Q_INVOKABLE void signMessageBtcPswdUsedUtxos(QString requestId, QString address, QString password, QString jsonInputs, QString toAddress, QString value, QString estimateComissionInSatoshi, QString fees, QString jsonUsedUtxos);
# Generating Bitcoin transaction
# Parameters:
# jsonInputs - utxos in the format [{"tx_hash": "string", "tx_index": figure, "scriptPubKey": "string", "value": "figure in the string in decimal format"}]
# value - is needed for sending. Possible variants: "all" or decimal number
# fees - Possible variants: "auto" or decimal number
# estimateComissionInSatoshi if there was "auto", here must be specified a decimal number
# jsonUsedUtxos performed transactions. Empty array or value from the previous function call result
# javascript is called after completion of this function
signMessageBtcUsedUtxosResultJs(requestId, transaction, jsonUsedUtxos, transactionHash, errorNum, errorMessage)
Q_INVOKABLE QString getAllBtcWalletsJson();
# Gets the list of all bitcoin accounts.
# Result returns as a json array
Q_INVOKABLE QString getAllBtcWalletsAndPathsJson();
# Gets the list of all metahash accounts.
# Result returns as a json array [{"address":"addr","path":"path"}]
Q_INVOKABLE void checkAddressBtc(QString requestId, QString address);
# To check the address for correctness. The result will return to the function:
checkAddressBtcResultJs(requestId, "ok"/"not valid", errorNum, errorMessage)
Q_INVOKABLE void getOnePrivateKeyBtc(QString requestId, QString keyName);
# Returns private key to the function
getOnePrivateKeyBtcResultJs(requestId, key, errorNum, errorMessage)
```
### General functions
```shell
Q_INVOKABLE void savePrivateKeyAny(QString requestId, QString privateKey, QString password);
# Tries to recognize a key type and saves it to the right place
# After the operation is completed, it calls function
savePrivateKeyAnyResultJs(requestId, "ok", errorNum, errorMessage)
Q_INVOKABLE void savePrivateKey(QString requestId, QString privateKey, QString password);
# Tries to recognize a key type and saves it to the right place
# After the operation is completed, it calls function
savePrivateKeyResultJs(requestId, "ok", errorNum, errorMessage)
Q_INVOKABLE void savePrivateKeyMHC(QString requestId, QString privateKey, QString password);
# Tries to recognize a key type and saves it to the right place
# After the operation is completed, it calls function
savePrivateKeyMHCResultJs(requestId, "ok", errorNum, errorMessage)
Q_INVOKABLE void savePrivateKeyEth(QString requestId, QString privateKey, QString password);
# Tries to recognize a key type and saves it to the right place
# After the operation is completed, it calls function
savePrivateKeyEthResultJs(requestId, "ok", errorNum, errorMessage)
Q_INVOKABLE void savePrivateKeyBtc(QString requestId, QString privateKey, QString password);
# Tries to recognize a key type and saves it to the right place
# After the operation is completed, it calls function
savePrivateKeyBtcResultJs(requestId, "ok", errorNum, errorMessage)
Q_INVOKABLE void updateAndReloadApplication();
# Restarts wallet installing updates
Q_INVOKABLE void qtOpenInBrowser(QString url);
# Opens link in default browser
Q_INVOKABLE void getWalletFolders();
# Function calls javascript
walletFoldersJs(walletDefaultPath, walletCurrentPath, userName, errorNum, errorMessage)
Q_INVOKABLE QString openFolderDialog(QString beginPath, QString caption);
# Shows to user the dialog box providing the ability to select a directory.
beginPath # initial directory location
caption # name of the dialog box
# Returns the path to the selected by user directory or an empty string, if user declines selecting directory.
Q_INVOKABLE bool migrateKeysToPath(QString newPath);
# Moves keys from the previous user's directory (home/user/.metahash_wallets) to the specified directory.
Q_INVOKABLE void exitApplication();
# Stops the app.
Q_INVOKABLE void restartBrowser();
# restart browser
Q_INVOKABLE QString backupKeys(QString caption);
# Backs up keys to the file. Before backup, user is shown a dialog box providing ability to select a path.
caption # name of the dialog
# Returns error description or empty string, if successful.
Q_INVOKABLE QString restoreKeys(QString caption);
# Recovers keys from a file. Before recovery, user is shown a dialog box providing ability to select backup file.
caption # name of the dialog
# Returns error description or empty string, if successful.
Q_INVOKABLE void getMachineUid();
# Returns unique machine ID to the machineUidJs(uid) function.
Q_INVOKABLE void setHasNativeToolbarVariable()
# Sets window.hasNativeToolbar javascript variable to true.
Q_INVOKABLE void openWalletPathInStandartExplorer();
# Open directory containing keys in standard explorer.
Q_INVOKABLE void getIpsServers(QString requestId, QString type, int length, int count);
# Request ip list from top to ping
# type node type: torrent, proxy
# length restriction to the array. Elements will be selected from the range [0, length — 1]
# count - the amount of return elements.
# After completion of this function, response will arrive to getIpsServersJs(requestId, json, errorInt, errorString)
# Json format: "[\"127.0.0.1:9999\", \"127.0.0.1:9999\"]"
Q_INVOKABLE void lineEditReturnPressed(QString text);
# Emulate text input to lineEdit.
Q_INVOKABLE void saveFileFromUrl(QString url, QString saveFileWindowCaption, QString fileName, bool openAfterSave);
# Shows file save dialog, then downloads the file and saves it.
Q_INVOKABLE void chooseFileAndLoad(QString requestId, QString openFileWindowCaption, QString fileName);
# Shows the file selection dialog, then encodes the selected file in base64 and sends it to the function
loadFileResultJs(requestId, result, errorNum, errorMessage)
Q_INVOKABLE void getAppInfo(const QString requestId);
# Returns version of application and other information.
# Result returns to the function:
getAppInfoResultJs(requestId, isProduction, version, gitCommit);
# When changing the contents of one of the directories with keys, the following function will be called
directoryChangedResultJs(path, ethName);
Q_INVOKABLE void qrEncode(QString requestId, QString textHex);
# Encodes text to qr code
# Result returns to the function:
qrEncodeResultJs(requestId, result);
# where result is a png image in base64
Q_INVOKABLE void qrDecode(QString requestId, QString pngBase64);
# Decodes text from qr code
# Result returns to the function:
qrDecodeResultJs(requestId, result);
# where result is a text in base16
Q_INVOKABLE void metaOnline();
# Request for statistics on being application online
# Result returns to the function:
onlineResultJs(jsonResult, errorNum, errorMessage);
Q_INVOKABLE void getAppModules(const QString requestId);
# Returns list of modules
# Result returns to the function:
getAppModulesResultJs(requestId, jsonResult, errorNum, errorMessage);
# result in the form of
# [{"module":"proxy","state":"found"}]
# state == wait, not_found, found
Q_INVOKABLE void clearNsLookup();
# Clean the file with the saved nsLoolup nodes. Reboot is required.
# Result returns to the function:
clearNsLookupResultJs("Ok", errorNum, errorMessage);
Q_INVOKABLE void sendMessageToWss(QString message);
# Послать сообщение в wss
# Result returns to the function:
sendMessageToWssResultJs("Ok", errorNum, errorMessage);
# Отсутствие ошибки не говорит об успешной доставке сообщения
Q_INVOKABLE void setIsForgingActive(bool isActive);
# Установить активным или нет форджинг
# Result returns to the function:
setIsForgingActiveResultJs("Ok", errorNum, errorMessage);
# Отсутствие ошибки не говорит об успешной доставке сообщения
Q_INVOKABLE void getIsForgingActive();
# узнать активен или нет форджинг
# Result returns to the function:
getIsForgingActiveResultJs(bool, errorNum, errorMessage);
Q_INVOKABLE void getNetworkStatus();
# выдать инфу о сети
# Result returns to the function:
getNetworkStatusResultJs(result, errorNum, errorMessage);
# где result json вида
{\"dnsErrors\":{},\"dnsStats\":[{\"bestTime\":51,\"countAll\":21,\"countWorked\":0,\"node\":\"proxy.net-dev.metahashnetwork.com\"},{\"bestTime\":51,\"countAll\":5,\"countWorked\":0,\"node\":\"proxy.net-main.metahashnetwork.com\"},{\"bestTime\":99,\"countAll\":12,\"countWorked\":0,\"node\":\"tor.net-dev.metahashnetwork.com\"},{\"bestTime\":99,\"countAll\":9,\"countWorked\":0,\"node\":\"tor.net-main.metahashnetwork.com\"},{\"bestTime\":51,\"countAll\":1,\"countWorked\":0,\"node\":\"torv8.net-dev.metahashnetwork.com\"}],\"networkTests\":[{\"isTimeout\":false,\"node\":\"www.google.com:80\",\"timeMs\":99},{\"isTimeout\":false,\"node\":\"1.1.1.1:80\",\"timeMs\":48},{\"isTimeout\":false,\"node\":\"echo.metahash.io:7654\",\"timeMs\":110}]}